/* ==========================================================
   Example pages: auth, error, profile, settings, pricing, invoice.
   Builds on style.css + components.css.
   ========================================================== */

/* ================= AUTH: split layout (login, register) ================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); }
.auth-main { display: flex; flex-direction: column; padding: 24px 40px; min-width: 0; }
.auth-top, .auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-top .hint { font-size: 12.5px; }
.auth-foot { font-size: 12px; color: var(--text-3); }
.auth-foot a:hover { color: var(--text); }
.auth-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; animation: fadeUp .5s var(--ease-out) both; }
.auth-form h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.auth-form .sub { margin-top: 6px; color: var(--text-2); }
.auth-form .btn.lg { width: 100%; justify-content: center; }
.auth-form .switch-link { text-align: center; font-size: 12.5px; color: var(--text-2); }
.auth-form .switch-link a, .text-link { color: var(--text); font-weight: 600; }
.auth-form .switch-link a:hover, .text-link:hover { text-decoration: underline; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; }

.divider-text { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--text-3); }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-row .btn { justify-content: center; }
.social-row svg { width: 16px; height: 16px; }

/* Brand panel */
.auth-aside {
  position: relative; overflow: hidden;
  margin: 12px; border-radius: 20px; padding: 36px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  background: var(--ink); color: var(--ink-fg);
}
.auth-aside::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 75%);
}
.auth-aside::after {
  content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 160, 107, .35), transparent 65%); pointer-events: none;
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .brand-logo { background: #fff; color: var(--ink); }
.auth-aside h2 { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; max-width: 420px; }
.auth-aside p { color: rgba(255, 255, 255, .65); max-width: 420px; margin-top: 10px; }

.preview { position: relative; height: 250px; }
.float-card {
  position: absolute; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); color: var(--text); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .45);
  animation: float 6s ease-in-out infinite;
}
.float-card small { font-size: 11.5px; color: var(--text-2); }
.float-card strong { display: block; font-size: 22px; letter-spacing: -.02em; }
.float-card.a { left: 0; top: 10px; width: 220px; }
.float-card.b { right: 6%; top: 70px; width: 200px; animation-delay: -2s; }
.float-card.c { left: 16%; bottom: 0; width: 250px; animation-delay: -4s; }
.mini-bars { display: flex; align-items: flex-end; gap: 5px; height: 44px; margin-top: 8px; }
.mini-bars i { flex: 1; border-radius: 3px; background: var(--bar); }
.mini-bars i.on { background: var(--primary); }

.quote { padding: 18px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.quote > p { margin: 0 0 12px; color: rgba(255, 255, 255, .85); max-width: none; }
.quote .cell-user p { margin: 0; color: #fff; }
.quote .cell-user small { color: rgba(255, 255, 255, .5); }

.benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.benefits li { display: flex; gap: 12px; }
.benefits .act-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .1); }
.benefits .act-icon .lucide { width: 16px; height: 16px; }
.benefits strong { font-size: 13.5px; }
.benefits p { margin: 2px 0 0; font-size: 12.5px; }

/* ================= AUTH: centered card (forgot, reset, verify) ================= */
.auth-simple {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: 32px 16px; background: var(--surface-2);
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 22px 22px;
}
.auth-card {
  width: 100%; max-width: 420px; padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: fadeUp .5s var(--ease-out) both;
}
.auth-card .head { text-align: center; }
.auth-card h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.auth-card .sub { margin-top: 6px; color: var(--text-2); }
.auth-card .btn.lg { width: 100%; justify-content: center; }
.icon-badge {
  width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.icon-badge .lucide { width: 22px; height: 22px; }
.icon-badge.success { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green); }
.back-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.back-link:hover { color: var(--text); }
.step-view { display: flex; flex-direction: column; gap: 16px; }
.step-view[hidden] { display: none; }
.step-view.enter { animation: fadeUp .35s var(--ease-out); }

/* Password strength */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.strength i { height: 4px; border-radius: 99px; background: var(--surface-3); transition: background .25s; }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--red); }
.strength[data-score="2"] i:nth-child(-n+2) { background: var(--orange); }
.strength[data-score="3"] i:nth-child(-n+3) { background: #d4b106; }
.strength[data-score="4"] i { background: var(--green); }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12px; color: var(--text-3); }
.req-list li { display: flex; align-items: center; gap: 6px; transition: color .2s; }
.req-list li .lucide { width: 13px; height: 13px; }
.req-list li.ok { color: var(--green); }

/* OTP */
.otp { display: flex; justify-content: center; gap: 8px; }
.otp input {
  width: 46px; height: 54px; text-align: center;
  font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border-strong); border-radius: 10px; outline: 0; background: var(--surface);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.otp input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.otp input.filled { border-color: var(--primary); }
.otp .dash { align-self: center; color: var(--text-3); }
.otp.error input { border-color: var(--red); animation: shake .35s; }
.otp.success input { border-color: var(--green); background: var(--green-soft); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ================= ERROR / UTILITY PAGES ================= */
.error-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px; text-align: center; position: relative; overflow: hidden;
  background: var(--surface);
}
.error-page::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 65%);
}
.error-page > * { position: relative; }
.error-page .brand { position: absolute; top: 24px; left: 28px; }
.error-code {
  font-size: clamp(96px, 20vw, 168px); font-weight: 700; letter-spacing: -.06em; line-height: 1;
  background: linear-gradient(180deg, var(--text) 30%, var(--text-3)); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fadeUp .6s var(--ease-out) both;
}
.error-page h1 { margin-top: 8px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.error-page .lead { max-width: 420px; margin-top: 8px; color: var(--text-2); }
.error-page .actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.error-page .search { width: 100%; max-width: 360px; margin: 24px auto 0; height: 40px; }
.quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 560px; margin-top: 28px; }
.quick-links a {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; text-align: left;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.quick-links a:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.quick-links strong { font-size: 13px; }
.quick-links small { font-size: 12px; color: var(--text-2); }
.error-id { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 12px; color: var(--text-2); }
.error-id code { font-family: ui-monospace, Menlo, monospace; color: var(--text); }

.big-icon { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.big-icon .lucide { width: 32px; height: 32px; }
.big-icon.spin .lucide { animation: spin 6s linear infinite; }
.countdown { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }
.countdown div { min-width: 72px; padding: 12px 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.countdown strong { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.status-list { width: 100%; max-width: 380px; margin-top: 24px; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.status-list div { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 12.5px; }
.status-list div + div { border-top: 1px solid var(--border); }
.notify-form { display: flex; gap: 8px; width: 100%; max-width: 380px; margin-top: 16px; }
.notify-form .input-group { flex: 1; }

/* ================= PROFILE ================= */
.profile-cover {
  height: 150px; border-radius: 14px 14px 0 0; position: relative; overflow: hidden;
  background: var(--ink);
}
.profile-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.profile-cover::after { content: ""; position: absolute; width: 360px; height: 360px; right: 8%; top: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(139, 92, 246, .45), transparent 65%); }
.profile-cover .btn { position: absolute; right: 14px; top: 14px; z-index: 1; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .15); color: #fff; box-shadow: none; }
.profile-cover .btn .lucide { color: currentColor; }
.profile-header { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 12px 20px 18px; position: relative; }
.profile-header .avatar-wrap { margin-top: -56px; } /* only the avatar overlaps the cover */
.profile-header .avatar-wrap .avatar { width: 88px; height: 88px; font-size: 28px; box-shadow: 0 0 0 4px var(--surface); }
.profile-header .presence { border-width: 3px; }
.profile-header .who { flex: 1; min-width: 200px; padding-bottom: 4px; }
.profile-header h1 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.profile-header .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.profile-header .meta span { display: inline-flex; align-items: center; gap: 5px; }
.profile-header .meta .lucide { width: 14px; height: 14px; color: var(--text-3); }
.profile-shell { padding: 0; overflow: hidden; background: var(--surface); }
.profile-shell .tab-list { padding: 0 16px; }
.profile-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.kv { display: flex; flex-direction: column; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 12.5px; }
.kv div + div { border-top: 1px solid var(--border); }
.kv span:first-child { color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.kv .lucide { width: 14px; height: 14px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.member-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; text-align: center; border: 1px solid var(--border); border-radius: 12px; transition: box-shadow .15s, transform .15s; }
.member-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.member-card small { color: var(--text-3); font-size: 12px; }
.member-card .demo-row { margin-top: 8px; }

/* ================= SETTINGS ================= */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.tabs.vertical .tab-list { position: sticky; top: calc(72px + var(--hnav-h)); flex-direction: column; gap: 2px; border: 0; }
.tabs.vertical .tab { width: 100%; height: 34px; justify-content: flex-start; border-radius: var(--radius-sm); padding: 0 10px; }
.tabs.vertical .tab:hover { background: var(--surface-2); }
.tabs.vertical .tab-ink { left: 0; top: 0; bottom: auto; width: 100%; height: 34px; border-radius: var(--radius-sm); background: var(--surface-3); transition: transform .3s var(--ease), height .3s var(--ease); }
.tabs.vertical .tab-panel { padding-top: 0; color: var(--text); }
.settings-section { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; padding: 24px 0; }
.settings-section + .settings-section { border-top: 1px solid var(--border); }
.settings-section:first-child { padding-top: 4px; }
.settings-section h3 { font-size: 14px; font-weight: 600; }
.settings-section > div:first-child p { margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.settings-section .form-grid { gap: 14px; }
.avatar-edit { display: flex; align-items: center; gap: 14px; }
.avatar-edit .avatar { width: 56px; height: 56px; font-size: 18px; }
.session { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.session + .session { border-top: 1px solid var(--border); }
.session .act-icon { width: 36px; height: 36px; border-radius: 10px; }
.session .grow { flex: 1; min-width: 0; }
.session small { display: block; color: var(--text-3); font-size: 12px; }
.notif-matrix td:not(:first-child), .notif-matrix th:not(:first-child) { text-align: center; width: 90px; }
.notif-matrix td { white-space: normal; }
.notif-matrix td small { display: block; color: var(--text-3); font-size: 11.5px; }
.plan-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px; border-radius: 12px; background: var(--ink); color: var(--ink-fg); }
.plan-card .grow { flex: 1; min-width: 180px; }
.plan-card small { color: rgba(255, 255, 255, .6); }
.plan-card strong { display: block; font-size: 18px; }
.plan-card .progress { background: rgba(255, 255, 255, .15); margin-top: 8px; }
.plan-card .progress-bar { background: #fff; }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.card-brand { width: 42px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-3); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--danger-bg); }
.danger-zone .grow { flex: 1; min-width: 200px; }
.danger-zone p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

/* Unsaved changes bar */
.save-bar {
  position: fixed; left: 50%; bottom: 20px; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px; border-radius: 12px;
  background: var(--ink); color: var(--ink-fg); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, 16px);
  transition: opacity .2s, transform .25s var(--ease-out), visibility .2s;
}
.save-bar.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.save-bar span { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.save-bar .btn.ghost { color: rgba(255, 255, 255, .8); }
.save-bar .btn.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.save-bar .btn.light { background: #fff; color: var(--ink); border-color: #fff; }

/* ================= PRICING ================= */
.pricing-head { text-align: center; max-width: 560px; margin: 8px auto 0; }
.pricing-head .t-caption { display: block; margin-bottom: 8px; }
.pricing-head h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.pricing-head p { margin-top: 10px; color: var(--text-2); }
.billing-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; }
.billing-toggle .segmented { width: 220px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; max-width: 1040px; width: 100%; margin: 8px auto 0; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.plan h3 { font-size: 15px; font-weight: 600; }
.plan .desc { font-size: 12.5px; color: var(--text-2); margin-top: 4px; min-height: 36px; }
.price { display: flex; align-items: baseline; gap: 4px; }
.price strong { font-size: 38px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.price span { color: var(--text-2); font-size: 12.5px; }
.price-note { font-size: 12px; color: var(--text-3); min-height: 18px; margin-top: -10px; }
.plan .btn { width: 100%; justify-content: center; }
.features { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; font-size: 12.5px; }
.features li { display: flex; gap: 8px; }
.features .lucide { width: 15px; height: 15px; color: var(--green); margin-top: 1px; }
.plan.featured { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); box-shadow: 0 24px 48px -16px rgba(16, 24, 40, .45); }
.plan.featured .desc, .plan.featured .price span, .plan.featured .price-note { color: rgba(255, 255, 255, .6); }
.plan.featured .features { border-color: rgba(255, 255, 255, .12); }
.plan.featured .features .lucide { color: #7ee2b0; }
.plan.featured .btn.primary { background: #fff; color: var(--ink); border-color: #fff; }
.plan .ribbon { position: absolute; top: 20px; right: 20px; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare .lucide.yes { color: var(--green); width: 16px; height: 16px; }
.compare .lucide.no { color: var(--text-3); width: 16px; height: 16px; }
.compare .group-row td { font-weight: 600; font-size: 12px; color: var(--text-2); }
.faq { max-width: 720px; width: 100%; margin: 0 auto; }
.section-title { text-align: center; font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 16px 0 4px; }
.section-sub { text-align: center; color: var(--text-2); margin-bottom: 12px; }

/* ================= INVOICE ================= */
.invoice-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.invoice { max-width: 860px; width: 100%; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; padding: 28px 32px; border-bottom: 1px solid var(--border); }
.inv-head .brand { font-size: 17px; }
.inv-head .addr { margin-top: 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.inv-title { text-align: right; }
.inv-title h2 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; }
.inv-title p { color: var(--text-2); margin: 2px 0 8px; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.inv-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 24px 32px; }
.inv-meta small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.inv-meta p { font-size: 12.5px; line-height: 1.6; }
.inv-items { padding: 0 32px; }
.inv-items .table { border: 1px solid var(--border); border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.inv-items .table tbody tr:last-child td { border-bottom: 0; }
.inv-items td small { display: block; color: var(--text-3); font-size: 11.5px; }
.inv-items .table td { white-space: normal; }
.inv-summary { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 24px 32px; }
.inv-notes { max-width: 360px; font-size: 12.5px; color: var(--text-2); }
.inv-notes h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--text); }
.inv-totals { min-width: 260px; }
.inv-totals div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.inv-totals div span:first-child { color: var(--text-2); }
.inv-totals .grand { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 16px; font-weight: 700; }
.inv-totals .grand span:first-child { color: var(--text); }
.inv-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 32px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; font-size: 12px; color: var(--text-2); }


/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-section { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .tabs.vertical .tab-list { position: static; flex-direction: row; overflow-x: auto; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
  .tabs.vertical .tab { width: auto; }
  .tabs.vertical .tab-ink { display: none; }
  .tabs.vertical .tab.active { background: var(--surface-3); }
}
@media (max-width: 760px) {
  .auth-main { padding: 20px; }
  .auth-card { padding: 24px 20px; }
  .otp { gap: 6px; }
  .otp input { width: 40px; height: 48px; font-size: 19px; }
  .quick-links { grid-template-columns: minmax(0, 1fr); }
  .inv-head, .inv-meta, .inv-items, .inv-summary, .inv-foot { padding-left: 18px; padding-right: 18px; }
  .inv-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-title { text-align: left; }
  .countdown div { min-width: 60px; }
  .save-bar { left: 16px; right: 16px; transform: translateY(16px); }
  .save-bar.show { transform: none; }
  .save-bar span { flex: 1; }
}

@media print {
  body { background: #fff; }
  .main .topbar, .invoice-actions, .page-head .page-actions, .save-bar { display: none !important; }
  .content { padding: 0; }
  .invoice { border: 0; box-shadow: none; max-width: none; }
  .content > * { animation: none !important; }
}
