/* =========================================================
   MAA INVEST — Design tokens (v2: blue SaaS admin theme)
   Display/body: Inter + Plus Jakarta Sans for headings
   Palette: royal blue primary, soft tinted icon chips,
   near-white app background, white cards, high-contrast text.
   ========================================================= */

:root {
    --blue: #3B5BFF;
    --blue-dark: #2743D9;
    --blue-soft: #EAEDFF;
    --ink: #131A2C;
    --text-main: #1E2432;
    --text-muted: #6B7280;
    --bg: #F5F6FA;
    --card: #FFFFFF;
    --border: #E7E9F1;

    --green: #17A673;
    --green-soft: #E4F8EF;
    --purple: #7C5CFC;
    --purple-soft: #EFEAFF;
    --orange: #F5921E;
    --orange-soft: #FEF0DE;
    --teal: #1BB6C7;
    --teal-soft: #E1F7F9;
    --pink: #F2545B;
    --pink-soft: #FDE7E8;
    --gold: #F5921E;
    --gold-soft: #FEF0DE;
    --ink-soft: #1B2540;
    --danger: #E0483E;

    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-card: 0 1px 2px rgba(19,26,44,0.03), 0 10px 24px -14px rgba(19,26,44,0.14);
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.font-mono, .money {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ---- Topbar ---- */
.topbar {
    height: 68px; background: var(--card); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 26px;
    position: sticky; top: 0; z-index: 20;
}
.topbar .search-box {
    flex: 1; max-width: 480px; display: flex; align-items: center; gap: 10px;
    background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
    padding: 9px 14px; color: var(--text-muted); font-size: 14px; margin: 0 24px;
}
.topbar .icon-btn {
    position: relative; width: 38px; height: 38px; border-radius: 10px; display: flex;
    align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--border);
    color: var(--text-muted); cursor: pointer; text-decoration: none;
}
.topbar .icon-btn .badge {
    position: absolute; top: -5px; right: -5px; background: var(--pink); color: #fff;
    font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 5px; min-width: 16px; text-align: center;
}

/* Layout shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    background: var(--card);
    border-right: 1px solid var(--border);
    color: var(--text-main);
    flex-shrink: 0;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display:flex; align-items:center; gap:10px; padding: 20px 20px 16px; }
.sidebar .brand .mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:14px;
}
.sidebar .group-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: #A0A6B8; padding: 16px 22px 6px;
}
.sidebar a {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    color: #4B5468; font-size: 14px; font-weight: 500;
    text-decoration: none; margin: 2px 12px;
    transition: background .15s ease, color .15s ease;
}
.sidebar a .ico { width:18px; text-align:center; }
.sidebar a:hover { background: var(--bg); color: var(--ink); }
.sidebar a.active {
    background: var(--blue); color: #fff;
    box-shadow: 0 6px 16px -6px rgba(59,91,255,0.55);
}
.sidebar .logout-row { padding: 14px 12px 20px; border-top: 1px solid var(--border); margin-top: 10px; }

.main-content { flex: 1; padding: 26px 30px; max-width: 1440px; }

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 22px;
}

.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-top { display:flex; justify-content:space-between; align-items:flex-start; }
.stat-card .stat-icon {
    width: 44px; height: 44px; border-radius: 12px; display:flex; align-items:center; justify-content:center; font-size:19px;
}
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-top: 14px; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; margin-top: 4px; color: var(--ink); }
.stat-card .stat-delta { font-size: 12.5px; font-weight: 600; margin-top: 8px; }
.stat-card .stat-delta.up { color: var(--green); }
.stat-card .stat-delta.down { color: var(--pink); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px;
    cursor: pointer; border: none; transition: transform .1s ease, opacity .15s ease, background .15s ease;
    text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-gold { background: var(--blue); color: #fff; }
.btn-gold:hover { background: var(--blue-dark); }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.btn-pill { border-radius: 999px; }

/* Forms */
.field label { display:block; font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; background: #fff; color: var(--text-main);
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft);
}
.field { margin-bottom: 16px; }

/* Progress ring */
.ring-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { stroke: var(--border); fill: none; }
.ring-fg { stroke: var(--blue); fill: none; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-center { position: absolute; text-align: center; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; color: var(--ink); }

/* Progress bar */
.progress-track { background: var(--border); border-radius: 999px; height: 8px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, var(--blue), var(--purple)); height: 100%; border-radius: 999px; transition: width .5s ease; }

/* Badges/pills */
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-teal { background: var(--green-soft); color: #0F7A55; }
.pill-gold { background: var(--orange-soft); color: #A15D0A; }
.pill-danger { background: var(--pink-soft); color: var(--danger); }
.pill-muted { background: #EEF0F5; color: var(--text-muted); }
.pill-blue { background: var(--blue-soft); color: var(--blue-dark); }

/* Table */
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }

/* Auth pages */
.auth-shell { min-height: 100vh; display: flex; }
.auth-visual {
    flex: 1; background: radial-gradient(circle at 20% 20%, #2743D9, var(--ink) 75%);
    display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.auth-form-panel { width: 460px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--card); }

.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.flash-error { background: var(--pink-soft); color: var(--danger); }
.flash-success { background: var(--green-soft); color: #0F7A55; }

/* ---- Marketing / landing page ---- */
.nav-public {
    display:flex; align-items:center; justify-content:space-between; padding: 18px 48px;
    background: #fff; border-bottom: 1px solid var(--border); position: sticky; top:0; z-index: 30;
}
.nav-public .links { display:flex; gap: 32px; }
.nav-public .links a { color:#3A4257; text-decoration:none; font-weight:500; font-size:14.5px; padding-bottom:6px; }
.nav-public .links a.active { color: var(--blue); border-bottom:2px solid var(--blue); }

.hero-eyebrow {
    display:inline-flex; align-items:center; gap:8px; background: var(--green-soft); color:#0F7A55;
    padding:6px 14px; border-radius:999px; font-size:13px; font-weight:600; margin-bottom:18px;
}

.feature-strip { display:flex; border:1px solid var(--border); border-radius:18px; background:#fff; box-shadow: var(--shadow-card); overflow:hidden; }
.feature-strip .feature-item { flex:1; display:flex; gap:12px; align-items:flex-start; padding: 22px 18px; border-right:1px solid var(--border); }
.feature-strip .feature-item:last-child { border-right:none; }
.feature-strip .feature-icon { width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }

.step-card { background:#fff; border:1px solid var(--border); border-radius:16px; padding:22px; text-align:left; position:relative; }
.step-num { width:30px; height:30px; border-radius:999px; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; margin-bottom: 14px; }

@media (max-width: 1000px) {
    .sidebar { display: none; }
    .auth-visual { display: none; }
    .auth-form-panel { width: 100%; }
    .nav-public .links { display:none; }
    .feature-strip { flex-direction:column; }
    .feature-strip .feature-item { border-right:none; border-bottom:1px solid var(--border); }
}
