/* ============================================================
   Posynt — Client dashboard styles
   ============================================================ */
:root {
  --bg:        #f6f7f4;
  --surface:   #ffffff;
  --surface-2: #f1f3ef;
  --border:    #ecedea;
  --border-2:  #e1e3de;
  --text:      #0d0e0c;
  --muted:     #6b7280;
  --muted-2:   #9aa0a0;
  --blue:      #2f7ff9;
  --black:     #0d0e0c;
  --mint-bg:   #dceae2;
  --mint-2:    #e9f3ee;
  --lime:      #7bc043;
  --peach-bg:  #fbe3d7;
  --green:     #34c759;
  --radius:    20px;
  --shadow-sm: 0 1px 2px rgba(20,24,20,.04), 0 2px 8px rgba(20,24,20,.05);
  --shadow:    0 16px 44px -18px rgba(20,24,20,.16);
  --shadow-lg: 0 30px 70px -24px rgba(20,24,20,.22);
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', var(--font);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  scrollbar-width: thin;
  scrollbar-color: #cfd4cf transparent;
}
/* Custom scrollbar (same as the landing) */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d7dbd6; border-radius: 999px; border: 3px solid var(--bg); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #bcc2bc; background-clip: padding-box; }
::selection { background: #cfe6d9; }

body { font-family: var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.55; }
a { color: var(--blue); text-decoration: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---- brand ---- */
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--black); }
.brand__logo { display: inline-flex; color: var(--black); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font); font-weight: 600; font-size: 15px; border: 1px solid transparent; border-radius: 999px; padding: 12px 22px; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--black); color: #fff; }
.btn--primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--ghost { background: #fff; color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { background: var(--surface-2); }

/* ---- inputs ---- */
.input { width: 100%; font-family: var(--font); font-size: 15px; color: var(--text); background: #fff; border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,127,249,.14); }

/* ============ LOGIN ============ */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login__card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); padding: 36px 32px; text-align: center; }
.login__card .brand { margin-bottom: 20px; font-size: 20px; }
.login__card h1 { font-family: var(--font-display); font-size: 26px; letter-spacing: -.8px; }
.login__card p { color: var(--muted); margin: 8px 0 22px; }
.login__card .input { text-align: center; margin-bottom: 14px; }
.login__err { color: #b3261e; font-size: 14px; min-height: 20px; margin-top: 10px; }
.login__hint { display: block; color: var(--muted-2); font-size: 13px; margin-top: 16px; }

/* ============ NAV (floating island) ============ */
.nav { position: sticky; top: 18px; z-index: 30; margin-top: 18px; padding: 0 20px; }
.nav__inner {
  max-width: 1060px; margin: 0 auto; padding: 12px 14px 12px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm);
  transition: box-shadow .3s ease, border-color .3s ease;
}
.nav.is-scrolled .nav__inner { box-shadow: var(--shadow); border-color: var(--border-2); }
.nav__sep { color: var(--muted-2); font-weight: 400; }
.nav__title { font-family: var(--font); font-weight: 500; color: var(--muted); font-size: 15px; }
.nav__right { display: flex; align-items: center; gap: 12px; }
.nav__email { color: var(--muted); font-size: 14px; }
.plan-badge { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; background: var(--mint-bg); color: #2f7a56; border: 1px solid #d6e7dd; padding: 6px 12px; border-radius: 999px; }

/* ============ LAYOUT ============ */
.wrap { max-width: 1020px; margin: 0 auto; padding: 30px 24px 70px; }
.head { margin-bottom: 22px; }
.hello { font-family: var(--font-display); font-size: 28px; letter-spacing: -1px; }
.sub { color: var(--muted); font-size: 16px; margin-top: 4px; }

/* ---- tabs (segmented) ---- */
.tabs { display: inline-flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px; margin-bottom: 26px; }
.tab { border: none; background: transparent; font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--muted); padding: 9px 20px; border-radius: 999px; cursor: pointer; transition: color .2s, background .2s, box-shadow .2s; }
.tab:hover { color: var(--text); }
.tab.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

/* ---- panels ---- */
.panel { display: none; }
.panel.is-active { display: block; animation: fadeUp .32s cubic-bezier(.22,.61,.36,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- cards ---- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dcard { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px 26px; }
.dcard--wide { grid-column: 1 / -1; }
.dcard__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dcard__head h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.dcard__hint { color: var(--muted); font-size: 14px; margin: -6px 0 18px; }
.muted { color: var(--muted-2); font-size: 14px; }
.chip { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.chip--mint { background: var(--mint-2); color: #2f7a56; border: 1px solid #d6e7dd; }

/* ---- API key ---- */
.keyrow { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.keyrow__key { flex: 1; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn { background: #fff; border: 1px solid var(--border-2); border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); transition: background .2s; }
.iconbtn:hover { background: var(--surface-2); }
.meta { display: flex; gap: 40px; margin-top: 18px; flex-wrap: wrap; }
.meta__label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted-2); margin-bottom: 4px; }
.meta code, .meta a { font-size: 14px; }

/* ---- usage ---- */
.usage__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.usage__row strong { color: var(--text); font-size: 15px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.bar span { display: block; height: 100%; background: var(--blue); border-radius: 999px; transition: width .5s cubic-bezier(.22,.61,.36,1); }
.bar span.bar--lime { background: var(--lime); }

/* ---- plan box ---- */
.planbox { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.planbox__name { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.6px; color: var(--black); }
.planbox__status { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #2f7a56; background: var(--mint-2); border: 1px solid #d6e7dd; padding: 5px 12px; border-radius: 999px; }
.planbox__link { font-size: 14px; margin-top: 4px; }

/* ---- hashtags ---- */
.addrow { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 6px 8px 6px 14px; margin-bottom: 16px; }
.addrow__hash { color: var(--muted-2); font-weight: 700; font-size: 16px; }
.input--flush { border: none; background: transparent; padding: 8px 4px; }
.input--flush:focus { box-shadow: none; }
.tracklist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.track { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; animation: rise .3s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.track__hash { font-weight: 600; color: var(--text); }
.track__hash .h { color: var(--blue); }
.track__meta { color: var(--muted-2); font-size: 13px; margin-left: 2px; }
.track__status { margin-left: auto; font-size: 12px; font-weight: 600; color: #2f7a56; background: var(--mint-2); border: 1px solid #d6e7dd; padding: 4px 10px; border-radius: 999px; }
.track__del { background: none; border: none; cursor: pointer; color: var(--muted-2); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 8px; transition: background .2s, color .2s; }
.track__del:hover { background: #fbe3e0; color: #b3261e; }
.empty { color: var(--muted-2); font-size: 14px; text-align: center; padding: 18px; }

/* ---- notifications ---- */
.notif { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---- toast ---- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--black); color: #fff; padding: 13px 20px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); z-index: 100; transition: transform .35s ease; max-width: 90vw; }
.toast.is-visible { transform: translateX(-50%) translateY(0); }
.toast.is-error { background: #b3261e; }

/* ---- responsive ---- */
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .nav__email, .nav__sep, .nav__title { display: none; }
  .meta { gap: 24px; }
  .tabs { display: flex; width: 100%; overflow-x: auto; }
  .tab { flex: 1; white-space: nowrap; }
}
@media (max-width: 460px) {
  .nav__inner { padding: 10px 10px 10px 16px; }
  .hello { font-size: 24px; }
}
