/* ============================================================
   MortgageCalc.US — Modern Design System
   ============================================================ */

:root {
    --blue-50:   #eff6ff;
    --blue-100:  #dbeafe;
    --blue-500:  #3b82f6;
    --blue-600:  #2563eb;
    --blue-700:  #1d4ed8;
    --blue-900:  #1e3a8a;

    --gray-50:   #f8fafc;
    --gray-100:  #f1f5f9;
    --gray-200:  #e2e8f0;
    --gray-300:  #cbd5e1;
    --gray-400:  #94a3b8;
    --gray-500:  #64748b;
    --gray-600:  #475569;
    --gray-700:  #334155;
    --gray-800:  #1e293b;
    --gray-900:  #0f172a;

    --green-500: #22c55e;
    --amber-400: #fbbf24;
    --red-400:   #f87171;
    --purple-400:#a78bfa;

    --radius-sm: .375rem;
    --radius:    .625rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
    --shadow-xl: 0 20px 25px rgba(0,0,0,.08), 0 8px 10px rgba(0,0,0,.04);

    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --max-w: 1200px;
    --transition: .18s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); font-size: 1rem; line-height: 1.6; color: var(--gray-800); background: var(--gray-50); }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }
img { max-width: 100%; display: block; }

/* ── Layout ── */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 1.5rem; }
.site-wrapper { display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; }

/* ── Navigation ── */
.site-nav {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky; top: 0; z-index: 100;
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.nav-brand {
    font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    display: flex; align-items: center; gap: .5rem;
}
.nav-brand-icon { font-size: 1.25rem; }
.nav-links { display: flex; gap: .25rem; list-style: none; }
.nav-links a {
    font-size: .875rem; font-weight: 500; color: var(--gray-600);
    padding: .4rem .75rem; border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}
.nav-links a:hover { background: var(--gray-100); color: var(--gray-900); }
.nav-links a.active { background: var(--blue-50); color: var(--blue-700); font-weight: 600; }

/* ── Hero ── */
.page-hero {
    background: linear-gradient(135deg, var(--blue-900) 0%, #1e40af 50%, var(--blue-600) 100%);
    padding: 4rem 0 3rem; text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; letter-spacing: -.03em; color: #fff; margin-bottom: .75rem; line-height: 1.1; }
.page-hero p { font-size: 1.1rem; color: rgba(255,255,255,.75); max-width: 500px; margin-inline: auto; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.2);
    border-radius: 9999px; padding: .35rem .85rem; font-size: .8rem;
    color: rgba(255,255,255,.9); font-weight: 500; margin-bottom: 1.25rem;
}

/* ── Cards ── */
.card {
    background: #fff; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--gray-100);
    padding: 1.75rem;
}
.card-sm { padding: 1.25rem; }

/* ── Calculator Grid ── */
.calc-grid { display: grid; gap: 1.5rem; padding: 2.5rem 0 3rem; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1fr 360px; align-items: stretch; } }
.calc-left { align-self: start; }

/* ── Section Label ── */
.section-eyebrow {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--blue-600); margin-bottom: .5rem;
}
.section-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: .25rem; }
.section-sub { color: var(--gray-500); font-size: .9rem; margin-bottom: 1.5rem; }

/* ── Form ── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block; font-size: .8rem; font-weight: 600;
    letter-spacing: .01em; color: var(--gray-600); margin-bottom: .4rem; text-transform: uppercase;
}
.form-group .hint { font-size: .78rem; color: var(--gray-400); margin-top: .3rem; }
.form-group .hint.warn { color: #ef4444; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .symbol {
    position: absolute; left: .85rem; color: var(--gray-400);
    font-size: .9rem; pointer-events: none; font-weight: 500;
}
.input-wrap .suffix {
    position: absolute; right: .85rem; color: var(--gray-400);
    font-size: .9rem; pointer-events: none; font-weight: 500;
}
.input-wrap input { padding-left: 1.85rem; }
.input-wrap input.has-suffix { padding-right: 2rem; }

.form-control {
    width: 100%; padding: .65rem 1rem;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius);
    font-size: .95rem; color: var(--gray-800); background: var(--gray-50);
    font-family: var(--font); transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    appearance: none;
}
.form-control:hover { border-color: var(--gray-300); }
.form-control:focus {
    outline: none; border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
    background: #fff;
}
select.form-control { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.25rem; }

.form-divider { border: none; border-top: 1px solid var(--gray-100); margin: 1.25rem 0; }

/* ── Loan Term Tabs ── */
.term-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .375rem; }
.term-tab {
    padding: .55rem .25rem; border-radius: var(--radius-sm);
    border: 1.5px solid var(--gray-200); background: var(--gray-50);
    font-size: .82rem; font-weight: 600; color: var(--gray-500);
    cursor: pointer; text-align: center; transition: all var(--transition);
    user-select: none;
}
.term-tab:hover { border-color: var(--gray-300); color: var(--gray-700); }
.term-tab.active { border-color: var(--blue-500); background: var(--blue-50); color: var(--blue-700); }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.5rem; border-radius: var(--radius); font-size: .95rem;
    font-weight: 600; cursor: pointer; border: none; font-family: var(--font);
    transition: all var(--transition); letter-spacing: -.01em;
}
.btn:active { transform: scale(.98); }

.btn-primary {
    background: var(--blue-600); color: #fff; width: 100%;
    box-shadow: 0 1px 3px rgba(37,99,235,.4), 0 4px 12px rgba(37,99,235,.2);
}
.btn-primary:hover { background: var(--blue-700); box-shadow: 0 2px 6px rgba(37,99,235,.5), 0 8px 20px rgba(37,99,235,.25); transform: translateY(-1px); }

.btn-ghost {
    background: transparent; border: 1.5px solid var(--gray-200);
    color: var(--gray-600); width: 100%;
}
.btn-ghost:hover { border-color: var(--gray-300); background: var(--gray-50); color: var(--gray-800); }

.btn-download {
    background: var(--gray-900); color: #fff;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.2), 0 4px 12px rgba(0,0,0,.1);
}
.btn-download:hover { background: var(--gray-700); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,.25), 0 8px 20px rgba(0,0,0,.12); }
.btn-download svg { flex-shrink: 0; }

/* ── Results Panel ── */
.results-section { display: none; margin-top: 1.5rem; }

.result-hero {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
    border-radius: var(--radius-lg); padding: 1.75rem; text-align: center;
    color: #fff; margin-bottom: 1.25rem; position: relative; overflow: hidden;
}
.result-hero::before {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 140px; height: 140px; border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.result-hero::after {
    content: ''; position: absolute; bottom: -50px; left: -30px;
    width: 160px; height: 160px; border-radius: 50%;
    background: rgba(255,255,255,.04);
}
.result-hero .label { font-size: .8rem; color: rgba(255,255,255,.65); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.result-hero .amount { font-size: 3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.result-hero .per-month { font-size: .8rem; color: rgba(255,255,255,.55); margin-top: .25rem; }

/* ── Donut Chart ── */
#payment-chart { width: 100%; max-width: 180px; margin: 1.25rem auto; }

/* ── Breakdown ── */
.breakdown-list { list-style: none; }
.breakdown-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: .6rem 0; border-bottom: 1px solid var(--gray-100);
    font-size: .9rem;
}
.breakdown-item:last-child { border-bottom: none; }
.breakdown-item .item-label { display: flex; align-items: center; gap: .6rem; color: var(--gray-600); }
.breakdown-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.breakdown-item .item-value { font-weight: 700; color: var(--gray-800); }

.summary-box {
    background: var(--gray-50); border-radius: var(--radius); padding: 1rem;
    margin-top: 1rem; border: 1px solid var(--gray-100);
}
.summary-row { display: flex; justify-content: space-between; align-items: center; font-size: .875rem; padding: .3rem 0; }
.summary-row .label { color: var(--gray-500); }
.summary-row .val { font-weight: 600; color: var(--gray-800); }
.summary-row.total { border-top: 1px solid var(--gray-200); margin-top: .3rem; padding-top: .6rem; font-size: .95rem; }
.summary-row.total .label { color: var(--gray-700); font-weight: 600; }
.summary-row.total .val { color: var(--blue-700); font-size: 1.05rem; font-weight: 800; }

/* ── Amortization Table ── */
.amortization-section { margin-top: 1.5rem; }
.amort-toggle-wrap { text-align: center; }
.amortization-table-wrap { margin-top: 1.25rem; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.amortization-table-wrap table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.amortization-table-wrap th {
    background: var(--gray-50); padding: .65rem .85rem; text-align: right;
    font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--gray-500); border-bottom: 1px solid var(--gray-200); white-space: nowrap;
}
.amortization-table-wrap th:first-child { text-align: center; }
.amortization-table-wrap td { padding: .55rem .85rem; text-align: right; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.amortization-table-wrap td:first-child { text-align: center; color: var(--gray-400); font-size: .8rem; }
.amortization-table-wrap tr:last-child td { border-bottom: none; }
.amortization-table-wrap tr:hover td { background: var(--blue-50); }

/* ── Tips Card ── */
.tips-card { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border: 1px solid #bae6fd; }
.tips-card h3 { font-size: .95rem; font-weight: 700; color: #0369a1; margin-bottom: .85rem; }
.tips-list { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.tips-list li { font-size: .84rem; color: #0c4a6e; display: flex; gap: .5rem; line-height: 1.5; }
.tips-list li::before { content: '→'; color: var(--blue-500); font-weight: 700; flex-shrink: 0; margin-top: .05rem; }

/* ── Stats Strip ── */
.stats-strip {
    background: var(--gray-900); padding: 1.5rem 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat-item { text-align: center; }
.stat-item .val { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.03em; }
.stat-item .lbl { font-size: .78rem; color: var(--gray-400); margin-top: .15rem; }

/* ── Educational Content ── */
.edu-section { background: #fff; padding: 5rem 0; border-top: 1px solid var(--gray-100); }
.edu-section .container { max-width: 780px; }
.edu-section h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 1rem; }
.edu-section h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; margin: 2rem 0 .6rem; color: var(--gray-700); }
.edu-section p { color: var(--gray-600); line-height: 1.8; margin-bottom: 1rem; }
.edu-section ul { color: var(--gray-600); padding-left: 1.25rem; line-height: 1.9; }
.edu-section li { margin-bottom: .3rem; }
.edu-section strong { color: var(--gray-800); }
.code-block {
    background: var(--gray-900); color: #e2e8f0;
    border-radius: var(--radius); padding: 1.25rem 1.5rem;
    font-family: 'Fira Code', 'Cascadia Code', monospace; font-size: .82rem;
    line-height: 1.8; overflow-x: auto; margin: 1rem 0;
}

/* ── Blog Grid ── */
.blog-page { padding: 2.5rem 0 4rem; }
.blog-grid { display: grid; gap: 1.5rem; }
@media (min-width: 680px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
    display: flex; flex-direction: column; background: #fff;
    border-radius: var(--radius-lg); border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm); overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.post-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card .post-placeholder {
    aspect-ratio: 16/9; background: linear-gradient(135deg, var(--blue-900), var(--blue-600));
    display: flex; align-items: center; justify-content: center; font-size: 2.25rem;
}
.post-card .card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.post-card .cat-tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--blue-600); }
.post-card h2 { font-size: 1rem; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; }
.post-card h2 a { color: var(--gray-800); }
.post-card h2 a:hover { color: var(--blue-600); }
.post-card p { font-size: .875rem; color: var(--gray-500); flex: 1; line-height: 1.6; }
.post-card .post-meta { font-size: .75rem; color: var(--gray-400); display: flex; gap: .75rem; margin-top: .25rem; }

/* ── Single Post ── */
.post-layout { display: grid; gap: 2.5rem; padding: 2.5rem 0 4rem; }
@media (min-width: 900px) { .post-layout { grid-template-columns: 1fr 280px; align-items: start; } }
.post-body { font-size: 1.05rem; line-height: 1.8; color: var(--gray-700); }
.post-body h2 { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); margin: 2rem 0 .75rem; letter-spacing: -.02em; }
.post-body h3 { font-size: 1.15rem; font-weight: 700; color: var(--gray-800); margin: 1.5rem 0 .5rem; }
.post-body p { margin-bottom: 1.1rem; }
.post-body ul, .post-body ol { margin: .75rem 0 1rem 1.5rem; }
.post-body li { margin-bottom: .4rem; }
.post-body blockquote { border-left: 3px solid var(--blue-500); padding: .75rem 1.25rem; color: var(--gray-600); margin: 1.5rem 0; font-style: italic; background: var(--blue-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.post-body img { border-radius: var(--radius-lg); margin: 1.5rem 0; }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-sticky { position: sticky; top: 5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.cta-card { background: linear-gradient(135deg, var(--blue-600), var(--blue-900)); border: none; color: #fff; }
.cta-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.cta-card p { font-size: .85rem; color: rgba(255,255,255,.75); margin-bottom: 1rem; }
.btn-white { background: #fff; color: var(--blue-700); font-weight: 700; border: none; border-radius: var(--radius-sm); padding: .6rem 1rem; cursor: pointer; font-family: var(--font); font-size: .875rem; width: 100%; display: block; text-align: center; transition: all var(--transition); }
.btn-white:hover { background: var(--blue-50); color: var(--blue-700); text-decoration: none; }

/* ── Breadcrumb ── */
.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--gray-400); padding: 1.25rem 0 0; flex-wrap: wrap; }
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--gray-800); }
.breadcrumb .sep { color: var(--gray-300); }

/* ── Post Header ── */
.post-header { margin-bottom: 2rem; }
.post-header .cat-tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue-600); display: inline-block; margin-bottom: .75rem; }
.post-header h1 { font-size: clamp(1.65rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; color: var(--gray-900); margin-bottom: .75rem; }
.post-meta { display: flex; gap: 1rem; font-size: .825rem; color: var(--gray-400); flex-wrap: wrap; }

/* ── Footer ── */
.site-footer { background: var(--gray-900); color: var(--gray-400); padding: 4rem 0 2rem; margin-top: auto; }
.footer-grid { display: grid; gap: 2.5rem; margin-bottom: 3rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: .75rem; letter-spacing: -.02em; }
.footer-desc { font-size: .84rem; line-height: 1.7; color: var(--gray-500); }
.site-footer h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-400); margin-bottom: 1rem; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.site-footer a { color: var(--gray-500); font-size: .875rem; transition: color var(--transition); }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--gray-800); padding-top: 2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; font-size: .8rem; color: var(--gray-600); }

/* ── Pagination ── */
.pagination { display: flex; gap: .5rem; justify-content: center; padding: 2rem 0 1rem; flex-wrap: wrap; }
.pagination a, .pagination span {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-size: .875rem; border: 1.5px solid var(--gray-200); color: var(--gray-600);
    transition: all var(--transition);
}
.pagination a:hover { background: var(--blue-50); border-color: var(--blue-300); color: var(--blue-700); text-decoration: none; }
.pagination .current { background: var(--blue-600); color: #fff; border-color: var(--blue-600); font-weight: 700; }

/* ── Admin ── */
.admin-layout { display: grid; min-height: 100vh; grid-template-columns: 240px 1fr; }
.admin-sidebar { background: var(--gray-900); color: var(--gray-400); padding: 0; display: flex; flex-direction: column; }
.admin-sidebar-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-800); }
.admin-brand { font-size: .95rem; font-weight: 800; color: #fff; letter-spacing: -.02em; display: flex; align-items: center; gap: .5rem; }
.admin-nav { list-style: none; padding: .75rem; flex: 1; }
.admin-nav li { margin-bottom: .15rem; }
.admin-nav a { display: flex; align-items: center; gap: .65rem; padding: .6rem .85rem; border-radius: var(--radius-sm); color: var(--gray-400); font-size: .875rem; font-weight: 500; transition: all var(--transition); }
.admin-nav a:hover { background: var(--gray-800); color: #fff; text-decoration: none; }
.admin-nav a.active { background: var(--gray-800); color: #fff; }
.admin-nav .nav-icon { width: 16px; text-align: center; }
.admin-sidebar-footer { padding: .75rem; border-top: 1px solid var(--gray-800); }

.admin-main { background: var(--gray-50); overflow-y: auto; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--gray-200); padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.admin-topbar h1 { font-size: 1.15rem; font-weight: 700; color: var(--gray-800); letter-spacing: -.02em; }
.admin-content { padding: 2rem; }

.stat-card { background: #fff; border: 1px solid var(--gray-100); border-radius: var(--radius-lg); padding: 1.25rem; display: flex; align-items: flex-start; gap: 1rem; }
.stat-icon { width: 42px; height: 42px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.stat-val { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat-lbl { font-size: .78rem; color: var(--gray-500); margin-top: .2rem; }

.table-admin { width: 100%; border-collapse: collapse; font-size: .875rem; background: #fff; }
.table-admin th { background: var(--gray-50); padding: .7rem 1rem; text-align: left; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
.table-admin td { padding: .75rem 1rem; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: middle; }
.table-admin tr:last-child td { border-bottom: none; }
.table-admin tr:hover td { background: var(--gray-50); }

.badge { display: inline-flex; align-items: center; padding: .2rem .65rem; border-radius: 9999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-secondary { background: var(--gray-100); color: var(--gray-500); }

.alert { padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .875rem; display: flex; align-items: center; gap: .6rem; }
.alert-danger { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gray-50); }
.login-card { width: 100%; max-width: 400px; }
.login-header { text-align: center; margin-bottom: 2rem; }
.login-header h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; }
.login-header p { color: var(--gray-500); font-size: .875rem; margin-top: .35rem; }

/* ── Utility ── */
.text-muted { color: var(--gray-500); }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ── Mobile ── */
@media (max-width: 640px) {
    .nav-links { gap: 0; }
    .calc-grid { padding: 1.5rem 0 2rem; }
    .card { padding: 1.25rem; }
    .result-hero .amount { font-size: 2.5rem; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
}
