*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f5f5f7; color: #1a1a1a; height: 100vh; display: flex; }

.hidden { display: none !important; }

/* Auth overlay */
.auth-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(30, 27, 58, 0.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  background: white; border-radius: 20px; padding: 36px 40px; max-width: 420px; width: 100%;
  box-shadow: 0 24px 80px rgba(30, 27, 58, 0.2);
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.auth-logo .logo-icon { width: 36px; height: 36px; border-radius: 10px; background: #6c63ff; }
.auth-logo .logo-text { font-size: 20px; font-weight: 600; color: #1e1b3a; }
.auth-title { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.auth-desc { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 24px; }
.auth-label { display: block; font-size: 12px; font-weight: 600; color: #666; margin-bottom: 6px; }
.auth-input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #ddd;
  font-size: 15px; margin-bottom: 16px;
}
.auth-input:focus { outline: none; border-color: #6c63ff; box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15); }
.auth-submit { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }

.app { display: flex; width: 100%; height: 100vh; }

.sidebar { width: 220px; background: #1e1b3a; color: white; padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }

.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 24px; }
.logo-icon { width: 32px; height: 32px; border-radius: 10px; background: #6c63ff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-text { font-size: 18px; font-weight: 600; color: white; letter-spacing: -0.5px; }
.logo-it { color: #a89fff; }

.nav-section { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.3); letter-spacing: 0.08em; padding: 12px 10px 6px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: rgba(255,255,255,0.55); text-decoration: none; transition: background 0.15s; border: none; background: none; width: 100%; text-align: left; font-family: inherit; }
.nav-item.active { background: rgba(108,99,255,0.25); color: #a89fff; }
.nav-item:hover:not(.active) { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.8); }
.nav-item-btn { margin-top: 4px; }

.sidebar-bottom { margin-top: auto; border-top: 0.5px solid rgba(255,255,255,0.1); padding-top: 12px; }

.quota-pill {
  font-size: 11px; padding: 8px 10px; border-radius: 10px;
  background: rgba(108, 99, 255, 0.2); color: #d4ceff; margin-bottom: 10px;
  border: 1px solid rgba(168, 159, 255, 0.35);
}
.quota-label { display: block; font-weight: 600; color: #a89fff; margin-bottom: 2px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.quota-value { font-weight: 600; }

.user-email { font-size: 11px; color: rgba(255,255,255,0.45); padding: 0 10px 8px; word-break: break-all; }

.main { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

.view { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.view.active { display: flex; }

.content { flex: 1; overflow-y: auto; padding: 32px; display: flex; flex-direction: column; gap: 24px; }

.top-bar { display: flex; align-items: center; justify-content: space-between; }
.page-title { font-size: 16px; font-weight: 600; color: #1a1a1a; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 0.5px solid #ddd; font-size: 13px; cursor: pointer; background: white; color: #1a1a1a; transition: background 0.15s; }
.btn:hover { background: #f5f5f7; }
.btn-primary { background: #6c63ff; color: white; border-color: #6c63ff; font-weight: 500; }
.btn-primary:hover { background: #5a52e0; }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-outline { background: white; border: 1px solid #6c63ff; color: #6c63ff; }
.btn-outline:hover { background: #f5f4ff; }
.btn-outline:disabled { opacity: 0.55; cursor: not-allowed; }

.upload-card { background: white; border: 2px dashed #d8d8e0; border-radius: 16px; padding: 48px 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.upload-card:hover { border-color: #6c63ff; background: #fafaff; box-shadow: 0 8px 32px rgba(108, 99, 255, 0.08); }
.upload-card.drag-over { border-color: #6c63ff; background: #f0eeff; border-style: solid; }
.upload-icon { width: 56px; height: 56px; border-radius: 50%; background: #f0eeff; display: flex; align-items: center; justify-content: center; }
.upload-card h2 { font-size: 15px; font-weight: 600; }
.upload-hint { font-size: 13px; color: #888; }
.formats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 20px; background: #f0eeff; color: #534AB7; font-weight: 500; }
.upload-limit { font-size: 12px; color: #6c63ff; margin-top: 8px; font-weight: 500; background: #f0eeff; padding: 3px 10px; border-radius: 20px; }

.progress-area { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px; }
.spinner { width: 40px; height: 40px; border: 3px solid #eee; border-top-color: #6c63ff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.section-title { font-size: 13px; font-weight: 500; color: #888; margin-bottom: 8px; }

.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item { background: white; border: 0.5px solid #eee; border-radius: 12px; padding: 14px 18px; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: border-color 0.15s; }
.file-item:hover { border-color: #6c63ff; }
.file-thumb { width: 38px; height: 38px; border-radius: 10px; background: #f0eeff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12px; color: #888; margin-top: 2px; }
.status-done { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #0F6E56; background: #E1F5EE; padding: 3px 10px; border-radius: 20px; flex-shrink: 0; }

/* Pricing */
.pricing { margin-top: 16px; padding-top: 32px; border-top: 1px solid #e8e8ed; }
.pricing-heading { font-size: 18px; font-weight: 700; color: #1e1b3a; margin-bottom: 6px; }
.pricing-lead { margin-bottom: 16px; font-size: 13px; color: #888; }
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px;
  align-items: stretch;
}
.price-card {
  background: white; border: 1px solid #e8e8ed; border-radius: 16px; padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px; position: relative;
}
.price-card-featured {
  border-color: #6c63ff; box-shadow: 0 12px 40px rgba(108, 99, 255, 0.12);
}
.price-badge {
  position: absolute; top: -10px; right: 16px;
  background: linear-gradient(135deg, #6c63ff, #534ab7); color: white;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 4px 10px; border-radius: 20px;
}
.price-name { font-size: 14px; font-weight: 700; color: #1e1b3a; }
.price-tag { font-size: 26px; font-weight: 800; color: #1a1a1a; letter-spacing: -0.5px; }
.price-period { font-size: 14px; font-weight: 600; color: #666; }
.price-alt { font-size: 13px; color: #555; }
.save-pill {
  display: inline-block; font-size: 10px; font-weight: 700; color: #0F6E56;
  background: #E1F5EE; padding: 2px 8px; border-radius: 20px; margin-left: 4px; vertical-align: middle;
}
.price-note { font-size: 12px; color: #666; line-height: 1.45; }
.price-features { list-style: none; font-size: 12px; color: #444; line-height: 1.6; margin: 4px 0 12px; flex: 1; }
.price-features li { padding-left: 16px; position: relative; }
.price-features li::before { content: "✓"; position: absolute; left: 0; color: #6c63ff; font-weight: 700; font-size: 11px; }

/* Transcript view */
#view-transcript { background: #eef0f4; }

.transcript-brand-strip {
  flex-shrink: 0;
  background: linear-gradient(135deg, #1e1b3a 0%, #2d2852 50%, #3d3470 100%);
  border-bottom: 4px solid #6c63ff;
  padding: 0 24px;
  min-height: 56px;
  display: flex; align-items: center;
}
.transcript-brand-inner {
  display: flex; align-items: center; gap: 12px; min-width: 0; width: 100%;
}
.transcript-strip-icon {
  color: #a89fff; flex-shrink: 0; display: flex; align-items: center;
}
.transcript-strip-title {
  font-size: 15px; font-weight: 600; color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.transcript-toolbar-card {
  flex-shrink: 0;
  margin: 16px 24px 0;
  padding: 12px 16px;
  background: white;
  border-radius: 14px;
  border: 1px solid #e4e6eb;
  box-shadow: 0 4px 24px rgba(30, 27, 58, 0.06);
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
}

.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 10px;
  border: 1px solid #e0e2e8;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  background: #f8f9fb;
  color: #1e1b3a;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.back-btn:hover {
  background: white;
  border-color: #6c63ff;
  box-shadow: 0 2px 12px rgba(108, 99, 255, 0.12);
}
.back-btn-icon { display: flex; align-items: center; color: #6c63ff; }
.back-btn-text { color: #333; }

.transcript-toolbar-divider { width: 1px; height: 28px; background: #e8e8ed; }

.ts-section {
  display: flex; flex-direction: column; gap: 4px;
}
.ts-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #888;
}

.ts-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid #e0e2e8;
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  background: #f8f9fb;
  color: #333;
  transition: background 0.15s, border-color 0.15s;
}
.ts-btn:hover { background: #f0eeff; border-color: #c4b8ff; }
.ts-btn.active { background: #fff8f0; border-color: #e8a045; color: #8a5a00; }

.transcript-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.btn-transcript { border-color: #e0e2e8; background: white; }
.btn-transcript:hover { background: #fafaff; border-color: #6c63ff; }
.btn-transcript-primary { background: #6c63ff; color: white; border-color: #6c63ff; }
.btn-transcript-primary:hover { background: #5a52e0; }

.transcript-view {
  flex: 1; overflow-y: auto;
  margin: 16px 24px 24px;
  padding: 28px 32px 40px;
  background: white;
  border-radius: 14px;
  border: 1px solid #e8e8ed;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
  display: flex; flex-direction: column;
}

.speaker-block { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid #f0f0f0; }
.speaker-block:last-child { border-bottom: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; margin-top: 2px; }
.av-0 { background: #EEEDFE; color: #3C3489; }
.av-1 { background: #E1F5EE; color: #085041; }
.av-2 { background: #FAECE7; color: #712B13; }
.av-3 { background: #E6F1FB; color: #0C447C; }
.av-4 { background: #FBEAF0; color: #72243E; }
.speaker-name { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.speaker-time { font-size: 11px; color: #6c63ff; background: #f0eeff; padding: 2px 8px; border-radius: 20px; margin-left: 8px; font-weight: 500; }
.speaker-text { font-size: 14px; line-height: 1.8; color: #444; margin-top: 6px; }

.seg-block { padding: 20px 0; border-bottom: 1px solid #f0f0f0; }
.seg-block:last-child { border-bottom: none; }
.seg-time { display: inline-block; font-size: 11px; color: #6c63ff; background: #f0eeff; padding: 2px 8px; border-radius: 20px; margin-bottom: 8px; font-weight: 500; }
.seg-text { font-size: 14px; line-height: 1.8; color: #444; }

@media (max-width: 720px) {
  .transcript-toolbar-card { margin: 12px 16px 0; }
  .transcript-view { margin: 12px 16px 16px; padding: 20px; }
  .transcript-actions { margin-left: 0; width: 100%; }
  .transcript-toolbar-divider { display: none; }
}

.file-item-loading { opacity: 0.7; cursor: not-allowed; pointer-events: none; }
.spinner-small { width: 20px; height: 20px; border: 2px solid #eee; border-top-color: #6c63ff; border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
.billing-toggle { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; }
.billing-btn { padding: 8px 20px; border-radius: 8px; border: 0.5px solid #ddd; font-size: 13px; cursor: pointer; background: white; color: #888; transition: all 0.15s; display: flex; align-items: center; gap: 6px; }
.billing-btn.active { background: #1e1b3a; color: white; border-color: #1e1b3a; }
.settings-wrap { max-width: 680px; margin: 0 auto; padding: 32px 32px 48px; }
.settings-title { font-size: 18px; font-weight: 600; color: #1a1a1a; margin-bottom: 20px; }
.settings-tabs { display: flex; gap: 0; border-bottom: 1.5px solid #e5e5e5; margin-bottom: 28px; }
.stab { padding: 10px 18px; font-size: 13px; font-weight: 500; color: #888; cursor: pointer; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1.5px; transition: all 0.15s; }
.stab.active { color: #6c63ff; border-bottom-color: #6c63ff; }
.stab:hover:not(.active) { color: #444; }
.stab-content { display: none; flex-direction: column; gap: 20px; }
.stab-content.active { display: flex; }
.settings-card { background: white; border: 0.5px solid #eee; border-radius: 12px; overflow: hidden; }
.scard-header { padding: 16px 20px; border-bottom: 0.5px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.scard-title { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.scard-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.avatar-row { display: flex; align-items: center; gap: 16px; }
.avatar-circle { width: 52px; height: 52px; border-radius: 50%; background: #EEEDFE; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; color: #3C3489; flex-shrink: 0; }
.avatar-info { flex: 1; }
.avatar-name { font-size: 14px; font-weight: 500; color: #1a1a1a; }
.avatar-sub { font-size: 12px; color: #aaa; margin-top: 2px; }
.field-row { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12px; font-weight: 500; color: #888; }
.field-input { height: 36px; border: 0.5px solid #ddd; border-radius: 8px; padding: 0 12px; font-size: 13px; color: #1a1a1a; background: #fafafa; width: 100%; }
.field-input:focus { outline: none; border-color: #6c63ff; background: white; }
.field-hint { font-size: 11px; color: #aaa; }
.btn-save { background: #6c63ff; color: white; border: none; padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-save:hover { background: #5a52e0; }
.plan-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 0.5px solid #f5f5f5; }
.plan-row:last-child { border-bottom: none; padding-bottom: 0; }
.plan-label { font-size: 13px; color: #888; }
.plan-value { font-size: 13px; font-weight: 500; color: #1a1a1a; }
.plan-badge { font-size: 11px; background: #EEEDFE; color: #534AB7; padding: 3px 10px; border-radius: 20px; font-weight: 500; }
.danger-zone { border: 0.5px solid #fde8e8; border-radius: 12px; padding: 18px 20px; background: #fffafa; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.danger-text { font-size: 13px; font-weight: 500; color: #1a1a1a; }
.danger-sub { font-size: 12px; color: #aaa; margin-top: 3px; }
.btn-danger { background: white; color: #E24B4A; border: 0.5px solid #E24B4A; padding: 8px 18px; border-radius: 8px; font-size: 13px; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.btn-danger:hover { background: #fff5f5; }
.progress-bar-wrap { height: 3px; background: #eee; border-radius: 2px; margin-top: 6px; }
.progress-bar { height: 100%; border-radius: 2px; background: #6c63ff; transition: width 0.3s; }
.btn-delete-file { background: none; border: none; cursor: pointer; color: #ccc; padding: 4px; border-radius: 6px; display: flex; align-items: center; }
.btn-delete-file:hover { color: #E24B4A; background: #fff0f0; }
.auth-switch { font-size: 13px; color: #888; text-align: center; margin-top: 16px; }
.auth-switch a { color: #6c63ff; font-weight: 500; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.btn-restore { display: inline-flex; align-items: center; gap: 5px; background: #f0eeff; color: #6c63ff; border: 1px solid #c4b8ff; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; }
.btn-restore:hover { background: #e0d8ff; }
.auth-switch { font-size: 13px; color: #888; text-align: center; margin-top: 16px; }
.auth-switch a { color: #6c63ff; font-weight: 500; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(30,27,58,0.55); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card { background: white; border-radius: 16px; padding: 28px 32px; max-width: 380px; width: 100%; box-shadow: 0 24px 80px rgba(30,27,58,0.2); text-align: center; }
.modal-icon { font-size: 32px; margin-bottom: 12px; }
.modal-title { font-size: 16px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.modal-message { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.modal-actions .btn { min-width: 100px; justify-content: center; }
.btn-danger-modal { background: #E24B4A; color: white; border-color: #E24B4A; }
.btn-danger-modal:hover { background: #c73b3a; }
.auth-input-code { font-size: 24px; font-weight: 700; letter-spacing: 8px; text-align: center; }
.google-btn-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; color: #ccc; font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #eee; }
.price-card-business { border: 2px solid #1e1b3a; background: linear-gradient(135deg, #fafaff 0%, #f0eeff 100%); }
.price-badge-business { position: absolute; top: -10px; right: 16px; background: #1e1b3a; color: white; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 20px; }