/* ============================================================
   MeetNGuru web app — design system
   ============================================================ */
:root {
  --bg:        #0B0B12;
  --bg-2:      #101019;
  --surface:   #15151F;
  --ink:       #F5F5FA;
  --ink-soft:  #A6A6BC;
  --ink-mute:  #6A6A82;
  --violet:    #7C5CFF;
  --indigo:    #5B8DEF;
  --cyan:      #38E1D6;
  --success:   #3DDC97;
  --warning:   #FFB454;
  --danger:    #FF5C7A;
  --line:      rgba(255,255,255,0.09);
  --glass:     rgba(255,255,255,0.04);
  --grad:      linear-gradient(115deg, #7C5CFF, #5B8DEF 52%, #38E1D6);
  --r-sm: 12px; --r-md: 18px; --r-lg: 24px; --r-pill: 999px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Spline Sans', -apple-system, sans-serif;
  font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
::selection { background: rgba(124,92,255,.4); }
.serif { font-family: 'Fraunces', Georgia, serif; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: #26263a; border-radius: 99px; }

/* ---- boot splash ---- */
.boot { display: grid; place-items: center; height: 100vh; }
.boot-mark {
  width: 60px; height: 60px; border-radius: 16px;
  background: var(--grad);
  animation: pulse 1.1s ease-in-out infinite alternate;
}
@keyframes pulse { to { transform: scale(1.12); opacity: .7; } }

/* ---- ambient background ---- */
.ambient {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(closest-side, rgba(124,92,255,.20), transparent 70%) -10% -10%/700px 700px no-repeat,
    radial-gradient(closest-side, rgba(56,225,214,.14), transparent 70%) 110% 110%/700px 700px no-repeat,
    var(--bg);
}

/* ---- gradient text ---- */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   AUTH SCREEN
   ============================================================ */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 40px 36px;
}
.brand {
  display: flex; align-items: center; gap: 11px; margin-bottom: 28px;
}
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.auth-card h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -.6px; margin-bottom: 6px;
}
.auth-card .sub { color: var(--ink-soft); margin-bottom: 26px; font-size: 14px; }

.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 12.5px; color: var(--ink-soft);
  margin-bottom: 6px; font-weight: 500;
}
.field input {
  width: 100%; padding: 13px 15px;
  background: var(--glass); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 15px; outline: none; transition: border-color .2s var(--ease);
}
.field input:focus { border-color: var(--violet); }

.btn {
  width: 100%; padding: 14px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 700; color: #fff;
  background: var(--grad);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(124,92,255,.6);
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-ghost {
  background: var(--glass); border: 1px solid var(--line); color: var(--ink);
}
.btn-ghost:hover:not(:disabled) { box-shadow: none; border-color: var(--ink-mute); }
.btn-danger { background: none; color: var(--danger); }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--ink-mute); font-size: 12.5px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.auth-switch {
  text-align: center; margin-top: 18px; font-size: 14px; color: var(--ink-soft);
}
.auth-switch button {
  background: none; color: var(--cyan); font-size: 14px; font-weight: 600;
}
.form-error {
  background: rgba(255,92,122,.12); border: 1px solid rgba(255,92,122,.3);
  color: #ff97a9; border-radius: var(--r-sm);
  padding: 10px 13px; font-size: 13px; margin-bottom: 14px;
}
#gsi-button { display: flex; justify-content: center; margin-bottom: 4px; }
.auth-legal {
  margin-top: 20px; text-align: center;
  color: var(--ink-mute); font-size: 12px; line-height: 1.55;
}
.auth-legal p + p { margin-top: 4px; }
.auth-legal a { color: var(--ink-soft); text-decoration: underline; }

/* ============================================================
   APP SHELL
   ============================================================ */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  background: rgba(11,11,18,.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { margin-bottom: 0; }
.topbar .spacer { flex: 1; }
.topbar .user {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--ink-soft);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad); display: grid; place-items: center;
  font-weight: 800; color: #fff; font-size: 14px;
}
.icon-btn {
  background: var(--glass); border: 1px solid var(--line);
  color: var(--ink-soft); border-radius: var(--r-sm);
  width: 38px; height: 38px; display: grid; place-items: center;
  font-size: 16px; transition: color .2s var(--ease);
}
.icon-btn:hover { color: var(--ink); }

.content { flex: 1; max-width: 920px; width: 100%; margin: 0 auto; padding: 32px 28px 80px; }
.app-foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  padding: 18px 24px 28px; border-top: 1px solid var(--line);
  font-size: 12.5px;
}
.app-foot a { color: var(--ink-mute); text-decoration: underline; }
.app-foot a:hover { color: var(--ink-soft); }

/* ---- page headers ---- */
.page-head { margin-bottom: 26px; }
.page-head h1 {
  font-size: 32px; font-weight: 800; letter-spacing: -1px;
}
.page-head p { color: var(--ink-soft); margin-top: 4px; }

/* ---- record button (top of meetings list) ---- */
.record-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--r-pill);
  background: var(--grad); color: #fff; font-weight: 700; font-size: 14.5px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.record-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(124,92,255,.6);
}

/* ============================================================
   MEETINGS LIST
   ============================================================ */
.meeting-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 12px;
  cursor: pointer; transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.meeting-card:hover { border-color: rgba(124,92,255,.4); transform: translateX(3px); }
.meeting-icon {
  width: 48px; height: 48px; border-radius: var(--r-sm); flex-shrink: 0;
  background: var(--grad); display: grid; place-items: center;
}
.meeting-icon svg { width: 24px; height: 24px; }
.meeting-card .info { flex: 1; min-width: 0; }
.meeting-card .title {
  font-weight: 700; font-size: 15.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meeting-card .meta { font-size: 12.5px; color: var(--ink-mute); margin-top: 3px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}

/* ---- empty / loading / error states ---- */
.state {
  text-align: center; padding: 70px 24px; color: var(--ink-soft);
}
.state .big { font-size: 46px; margin-bottom: 14px; }
.state h3 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.skeleton {
  height: 80px; background: var(--glass);
  border-radius: var(--r-md); margin-bottom: 12px;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 50% { opacity: .45; } }

/* ============================================================
   MEETING DETAIL
   ============================================================ */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-soft); font-size: 14px; margin-bottom: 20px;
}
.back-link:hover { color: var(--ink); }
.detail-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.detail-head .meeting-icon { width: 56px; height: 56px; }
.detail-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.detail-actions { display: flex; gap: 8px; margin-left: auto; }

.tabs {
  display: flex; gap: 4px; margin: 24px 0 20px;
  border-bottom: 1px solid var(--line); overflow-x: auto;
}
.tab {
  padding: 10px 16px; background: none; color: var(--ink-mute);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .2s var(--ease);
}
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--ink); border-bottom-color: var(--cyan); }

.note-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 20px;
}
.note-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.note-card p { color: var(--ink-soft); }
.section-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 1px;
  color: var(--cyan); text-transform: uppercase; margin-bottom: 10px;
}

/* markdown-ish minutes */
.minutes { color: var(--ink-soft); }
.minutes h1, .minutes h2, .minutes h3 { color: var(--ink); margin: 16px 0 8px; }
.minutes h1 { font-size: 20px; } .minutes h2 { font-size: 17px; }
.minutes ul { margin: 8px 0 8px 20px; }
.minutes li { margin-bottom: 4px; }
.minutes p { margin-bottom: 10px; }

/* action items */
.action-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 10px;
  cursor: pointer;
}
.action-check {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 2px solid var(--ink-mute); display: grid; place-items: center;
  margin-top: 1px;
}
.action-item.done .action-check { background: var(--grad); border-color: transparent; }
.action-item.done .action-desc { text-decoration: line-through; color: var(--ink-mute); }
.action-desc { font-weight: 600; font-size: 14.5px; }
.action-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--glass); border: 1px solid var(--line);
  padding: 3px 9px; border-radius: var(--r-pill);
  font-size: 11.5px; color: var(--ink-soft);
}

/* decisions */
.decision {
  display: flex; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 10px;
}
.decision .dot {
  width: 32px; height: 32px; border-radius: var(--r-sm); flex-shrink: 0;
  background: rgba(124,92,255,.15); display: grid; place-items: center;
}

/* transcript */
.segment {
  display: flex; gap: 12px; margin-bottom: 16px;
}
.segment .rail { width: 3px; border-radius: 2px; flex-shrink: 0; }
.segment .speaker { font-size: 12.5px; font-weight: 700; }
.segment .ts { font-size: 11px; color: var(--ink-mute); margin-left: 8px; }
.segment .text { color: var(--ink-soft); font-size: 14px; margin-top: 3px; }

/* processing state */
.processing {
  text-align: center; padding: 60px 24px;
}
.proc-orb {
  width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 22px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 38px; animation: pulse 1.2s ease-in-out infinite alternate;
}

/* ============================================================
   RECORDING MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(5,5,9,.7); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px;
}
.modal {
  width: 100%; max-width: 460px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 32px; text-align: center;
}
.modal h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.modal .sub { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 24px; }
.rec-timer {
  font-size: 56px; font-weight: 300; font-variant-numeric: tabular-nums;
  letter-spacing: 2px; margin-bottom: 8px;
}
.rec-status {
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.wave {
  display: flex; align-items: center; justify-content: center;
  gap: 3px; height: 72px; margin-bottom: 26px;
}
.wave i {
  width: 4px; border-radius: 2px; background: var(--grad);
  transition: height .1s linear;
}
.rec-controls { display: flex; gap: 12px; justify-content: center; }
.rec-circle {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  transition: transform .15s var(--ease);
}
.rec-circle:hover { transform: scale(1.06); }
.rec-circle.idle { background: var(--grad); }
.rec-circle.recording { background: var(--danger); }
.modal-x {
  position: absolute; top: 18px; right: 18px;
  background: none; color: var(--ink-mute); font-size: 22px;
}
.upload-bar {
  height: 6px; background: var(--glass); border-radius: 99px;
  overflow: hidden; margin: 16px 0;
}
.upload-bar > div { height: 100%; background: var(--grad); transition: width .2s; }

/* dialog (rename / confirm) */
.dialog input {
  width: 100%; padding: 12px 14px; margin: 14px 0;
  background: var(--glass); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 15px; outline: none;
}
.dialog-actions { display: flex; gap: 10px; }
.dialog-actions .btn { flex: 1; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--line);
  padding: 12px 20px; border-radius: var(--r-md);
  font-size: 14px; z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: toastIn .3s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ============================================================
   AI CREDITS
   ============================================================ */
.credits-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--glass); border: 1px solid var(--line);
  color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: border-color .2s var(--ease);
}
.credits-pill:hover { border-color: var(--violet); }
.credits-pill .bolt { color: var(--cyan); }
.credits-pill.low { border-color: rgba(255,180,84,.5); }
.credits-pill.low .bolt { color: var(--warning); }

.balance-card { display: flex; align-items: center; gap: 18px; }
.balance-num { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.balance-card .meta { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }

.banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding: 13px 16px; border-radius: var(--r-md);
  background: rgba(255,180,84,.10); border: 1px solid rgba(255,180,84,.35);
  font-size: 14px; color: var(--ink);
}
.banner.info {
  margin: 20px 0 0; background: rgba(56,225,214,.08);
  border-color: rgba(56,225,214,.3); color: var(--ink-soft);
}

.packs {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.pack {
  position: relative; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 26px 18px 18px;
}
.pack.best { border-color: rgba(124,92,255,.55); }
.pack-tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
.pack-credits { font-size: 36px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.pack-label { color: var(--ink-soft); font-size: 13px; }
.pack-hint { color: var(--ink-mute); font-size: 12px; margin: 10px 0 16px; }
.pack-lira { color: var(--ink-mute); font-size: 11.5px; line-height: 1.45; margin-top: 10px; }
.fine { color: var(--ink-mute); font-size: 12.5px; margin: 14px 0 26px; }
.fine strong { color: var(--ink-soft); font-weight: 600; }
.billing-country { max-width: 340px; margin-bottom: 18px; }
.field select {
  width: 100%; padding: 12px 15px;
  background: var(--glass); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md);
  font: inherit; font-size: 15px; outline: none; transition: border-color .2s var(--ease);
}
.field select:focus { border-color: var(--violet); }
.field select option { background: var(--surface); color: var(--ink); }
.how ul { margin-left: 18px; color: var(--ink-soft); font-size: 14px; }
.how li { margin-bottom: 4px; }

.chip-soft {
  color: var(--ink-soft); background: var(--glass); border: 1px solid var(--line);
}
.dialog-actions a.btn { display: block; }

/* tier picker (recording modal) */
.tier-picker { text-align: left; margin-bottom: 16px; }
.tier-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier-opt {
  text-align: left; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--glass); border: 1px solid var(--line); color: var(--ink);
  transition: border-color .2s var(--ease);
}
.tier-opt.active { border-color: var(--violet); background: rgba(124,92,255,.12); }
.tier-name { font-weight: 700; font-size: 14.5px; }
.tier-price { color: var(--cyan); font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.tier-desc { color: var(--ink-mute); font-size: 12px; margin-top: 4px; }
.tier-cost { color: var(--ink-soft); font-size: 12.5px; margin-top: 10px; }
.tier-cost.warn { color: var(--warning); margin-top: 4px; }

@media (max-width: 560px) {
  .content { padding: 24px 18px 70px; }
  .topbar { padding: 12px 18px; gap: 10px; }
  .topbar .user span { display: none; }
  .page-head h1 { font-size: 26px; }
  .auth-card { padding: 32px 24px; }
}
