/* ═══════════════════════════════════════════════════════════════
   MACC IT Solutions — Design System v2
   Navy / Teal / White · Inter · Professional business platform
   ═══════════════════════════════════════════════════════════════ */

:root {
    --navy:        #0d2137;
    --navy-mid:    #153a5c;
    --navy-light:  #1d4d78;
    --teal:        #0fa3a0;
    --teal-bright: #17c4c0;
    --teal-soft:   #e6f6f5;
    --white:       #ffffff;
    --off-white:   #f6f9fb;
    --line:        #e2eaf1;
    --text:        #1f2d3d;
    --muted:       #61758a;
    --danger:      #d93636;
    --success:     #1e9e5a;
    --warn:        #c77c0a;
    --radius:      12px;
    --radius-sm:   8px;
    --shadow-1:    0 1px 3px rgba(13,33,55,.07), 0 1px 2px rgba(13,33,55,.05);
    --shadow-2:    0 4px 16px rgba(13,33,55,.09);
    --shadow-3:    0 16px 44px rgba(13,33,55,.16);
    --ease:        cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--off-white);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--navy); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:36px}
.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.text-muted{color:var(--muted)}
.text-small{font-size:.86rem}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 24px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: .93rem; letter-spacing: .01em;
    border: 1.5px solid transparent; cursor: pointer;
    transition: all .18s var(--ease); white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--teal) 0%, #0b8f8c 100%);
    color: var(--white); box-shadow: 0 4px 14px rgba(15,163,160,.28);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0b8f8c 0%, #076f6d 100%);
    color: var(--white); transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15,163,160,.36);
}
.btn-ghost { border-color: rgba(255,255,255,.35); color: var(--white); background: rgba(255,255,255,.06); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: var(--white); }
.btn-outline { border-color: var(--line); color: var(--navy); background: var(--white); box-shadow: var(--shadow-1); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }
.btn-sm { padding: 6px 13px; font-size: .82rem; border-radius: 7px; }
.btn:active { transform: translateY(0); }

/* ── Public header ─────────────────────────────────────────────── */
.top-bar { background: var(--navy); color: rgba(255,255,255,.72); font-size: .82rem; border-bottom: 1px solid rgba(255,255,255,.07); }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.top-bar a { color: rgba(255,255,255,.72); margin-left: 20px; }
.top-bar a:hover { color: var(--white); }

.site-header {
    background: rgba(13,33,55,.97); backdrop-filter: blur(12px);
    color: var(--white); position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 20px rgba(13,33,55,.24);
}
.header-inner { display: flex; align-items: center; gap: 36px; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.brand-mark {
    width: 38px; height: 38px; border-radius: 9px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-bright) 100%);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.05rem; color: var(--white); letter-spacing: -.03em;
    box-shadow: 0 4px 12px rgba(15,163,160,.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.06rem; letter-spacing: .01em; }
.brand-name em { font-style: normal; color: var(--teal-bright); }
.brand-tag { font-size: .66rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .14em; }

.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a {
    color: rgba(255,255,255,.78); font-size: .9rem; font-weight: 500;
    padding: 8px 13px; border-radius: 7px; transition: all .15s var(--ease);
}
.main-nav a:hover, .main-nav a.active { color: var(--white); background: rgba(255,255,255,.09); }
.header-cta { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
    background:
        radial-gradient(ellipse 60% 50% at 85% 10%, rgba(15,163,160,.22) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 10% 90%, rgba(29,77,120,.5) 0%, transparent 55%),
        linear-gradient(160deg, var(--navy) 0%, #081b2e 100%);
    color: var(--white); padding: 110px 0 130px; position: relative; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: center; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(15,163,160,.15); border: 1px solid rgba(23,196,192,.3);
    color: var(--teal-bright); font-size: .78rem; font-weight: 600;
    padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
    letter-spacing: .08em; text-transform: uppercase;
}
.hero h1 { font-size: 3.1rem; font-weight: 750; line-height: 1.14; letter-spacing: -.02em; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--teal-bright); }
.hero .sub { font-size: 1.14rem; color: #9db4c8; max-width: 520px; margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 26px; font-size: .84rem; color: #7c93a8; display: flex; align-items: center; gap: 8px; }

.hero-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.stat-card {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius); padding: 22px 24px; backdrop-filter: blur(8px);
    transition: all .2s var(--ease);
}
.stat-card:hover { background: rgba(255,255,255,.1); border-color: rgba(23,196,192,.35); transform: translateY(-2px); }
.stat-card .num { font-size: 1.9rem; font-weight: 750; color: var(--teal-bright); letter-spacing: -.02em; }
.stat-card .lbl { font-size: .82rem; color: #8ba2b6; margin-top: 2px; }

/* ── Sections ───────────────────────────────────────────────────── */
.section { padding: 84px 0; }
.section-alt { background: var(--white); }
.section-label {
    color: var(--teal); font-size: .78rem; font-weight: 700;
    letter-spacing: .16em; text-transform: uppercase; margin-bottom: 10px;
}
.section h2 { font-size: 2.15rem; font-weight: 720; color: var(--navy); letter-spacing: -.015em; margin-bottom: 14px; }
.section .lead-in { color: var(--muted); max-width: 620px; font-size: 1.05rem; margin-bottom: 44px; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 30px;
    transition: all .22s var(--ease); position: relative; overflow: hidden;
}
.card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--teal-bright));
    opacity: 0; transition: opacity .22s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: #d0dde8; }
.card:hover::before { opacity: 1; }
.card h3 { color: var(--navy); font-size: 1.13rem; font-weight: 680; margin-bottom: 9px; letter-spacing: -.008em; }
.card p { color: var(--muted); font-size: .92rem; line-height: 1.6; }
.card .icon {
    width: 50px; height: 50px; border-radius: 11px; margin-bottom: 16px;
    background: var(--teal-soft); display: flex; align-items: center; justify-content: center;
    font-size: 1.45rem;
}
.card-cta { margin-top: 16px; font-weight: 650; font-size: .9rem; color: var(--teal); display: inline-flex; align-items: center; gap: 5px; }
.card-cta::after { content: '→'; transition: transform .18s var(--ease); }
a.card:hover .card-cta::after { transform: translateX(3px); }

/* ── Steps ──────────────────────────────────────────────────────── */
.step { text-align: center; padding: 26px 16px; position: relative; }
.step .num {
    width: 52px; height: 52px; border-radius: 15px; margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: var(--teal-bright); display: flex; align-items: center; justify-content: center;
    font-weight: 750; font-size: 1.2rem; box-shadow: var(--shadow-1);
    transition: all .2s var(--ease);
}
.step:hover .num { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-bright) 100%); color: var(--white); transform: translateY(-3px); }
.step h3 { color: var(--navy); margin-bottom: 7px; font-size: 1.05rem; }
.step p { color: var(--muted); font-size: .89rem; }

/* ── Forms ──────────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 620; font-size: .86rem; color: var(--navy); letter-spacing: .01em; }
input, select, textarea {
    padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    font-family: inherit; font-size: .94rem; color: var(--text);
    background: var(--white); transition: all .15s var(--ease); width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,163,160,.14);
}
input::placeholder, textarea::placeholder { color: #a3b3c2; }
textarea { resize: vertical; }
.checkbox-group { display: flex; align-items: center; gap: 10px; }
.checkbox-group input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--teal); }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer { background: #081828; color: #8ba2b6; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 44px; padding-bottom: 44px; }
.footer-grid a { color: #8ba2b6; font-size: .92rem; transition: color .15s; }
.footer-grid a:hover { color: var(--teal-bright); }
.footer-grid strong { color: var(--white); display: block; margin-bottom: 14px; font-size: .95rem; letter-spacing: .01em; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 9px; }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.footer-desc { font-size: .9rem; line-height: 1.65; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 28px; font-size: .8rem; text-align: center; color: #5a7186; }

/* ── Sticky mobile bar ─────────────────────────────────────────── */
.sticky-mobile { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; background: var(--navy); box-shadow: 0 -4px 20px rgba(13,33,55,.3); }
.sticky-btn { flex: 1; text-align: center; color: var(--white); padding: 15px 0; font-weight: 650; font-size: .92rem; border-right: 1px solid rgba(255,255,255,.1); }
.sticky-btn:last-child { border-right: none; }
.sticky-btn:hover { text-decoration: none; background: rgba(15,163,160,.2); }

/* ── ADMIN: sidebar layout ─────────────────────────────────────── */
.admin-body { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-sidebar {
    background: var(--navy); color: var(--white);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .brand { padding: 20px 22px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.admin-nav { padding: 18px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.admin-nav .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.38); padding: 16px 12px 6px; font-weight: 700; }
.admin-nav a {
    color: rgba(255,255,255,.75); padding: 10px 14px; border-radius: 9px;
    font-size: .9rem; font-weight: 520; display: flex; align-items: center; gap: 11px;
    transition: all .15s var(--ease);
}
.admin-nav a .ni { width: 20px; text-align: center; opacity: .8; }
.admin-nav a:hover { background: rgba(255,255,255,.08); color: var(--white); }
.admin-nav a.active { background: linear-gradient(135deg, var(--teal) 0%, #0b8f8c 100%); color: var(--white); box-shadow: 0 4px 14px rgba(15,163,160,.3); }
.admin-sidebar .sidebar-footer { padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.08); font-size: .78rem; color: rgba(255,255,255,.45); }

.admin-main { padding: 0 36px 60px; min-width: 0; }
.admin-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0; margin-bottom: 26px; border-bottom: 1px solid var(--line);
}
.admin-topbar h1 { font-size: 1.55rem; font-weight: 720; color: var(--navy); letter-spacing: -.015em; }
.admin-user { display: flex; align-items: center; gap: 12px; }
.admin-user .avatar {
    width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--navy-mid));
    color: var(--teal-bright); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem;
}
.admin-user .u-name { font-weight: 650; font-size: .9rem; color: var(--navy); }
.admin-user .u-role { font-size: .75rem; color: var(--muted); }

/* ── Tables ─────────────────────────────────────────────────────── */
table.data {
    width: 100%; border-collapse: separate; border-spacing: 0;
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow-1); border: 1px solid var(--line);
    overflow: hidden; display: table;
}
table.data th {
    background: var(--off-white); color: var(--muted); text-align: left;
    padding: 13px 18px; font-size: .74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .09em; border-bottom: 1px solid var(--line);
}
table.data td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .91rem; vertical-align: middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #fafcfe; }
table.data tbody tr:last-child td { border-bottom: none; }

/* ── Badges / pills ─────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; padding: 4px 11px;
    border-radius: 999px; font-size: .74rem; font-weight: 650;
    letter-spacing: .02em; white-space: nowrap;
}
.badge-new          { background: #e0f7f5; color: #076f6d; }
.badge-contacted    { background: #e8f0fe; color: #1a5fb4; }
.badge-qualified    { background: #fff4e0; color: #b45309; }
.badge-demobooked   { background: #f3e8fd; color: #7b1fa2; }
.badge-quotesent    { background: #e3f2fd; color: #1565c0; }
.badge-won, .badge-paid, .badge-sent, .badge-delivered, .badge-accepted
                    { background: #e6f9ed; color: #1e7e34; }
.badge-lost, .badge-overdue, .badge-failed
                    { background: #fdecea; color: #b91c1c; }
.badge-draft        { background: #eef1f5; color: #64748b; }
.badge-issued       { background: #e3f2fd; color: #1565c0; }
.badge-partiallypaid{ background: #fff8e1; color: #9e7200; }
.badge-void         { background: #eef1f5; color: #8a97a5; }
.badge-simulated    { background: #f0f4f8; color: #5a7186; }
.badge-queued       { background: #eef1f5; color: #64748b; }

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert { padding: 15px 20px; border-radius: var(--radius-sm); margin-bottom: 22px; font-size: .93rem; display: flex; gap: 10px; align-items: flex-start; border: 1px solid; }
.alert-success { background: #e9f9ef; color: #166534; border-color: #bbe7cb; }
.alert-error   { background: #fdecea; color: #b91c1c; border-color: #f5c6c6; }
.alert-info    { background: #eff6fd; color: #1e5f9e; border-color: #bcd8f5; }

/* ── Stat tiles (dashboard) ─────────────────────────────────────── */
.stat-tile {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 24px 26px; display: flex; align-items: center; gap: 18px;
    transition: all .2s var(--ease); box-shadow: var(--shadow-1);
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.stat-tile .st-icon {
    width: 52px; height: 52px; border-radius: 13px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.st-teal  { background: var(--teal-soft); }
.st-navy  { background: #e8eef5; }
.st-green { background: #e6f9ed; }
.st-red   { background: #fdecea; }
.stat-tile .st-num { font-size: 1.85rem; font-weight: 750; color: var(--navy); line-height: 1.1; letter-spacing: -.02em; }
.stat-tile .st-lbl { font-size: .84rem; color: var(--muted); font-weight: 520; }

/* ── Invoice document ───────────────────────────────────────────── */
.invoice-doc { padding: 52px; background: var(--white); }

/* ── Print ──────────────────────────────────────────────────────── */
@media print {
    .site-header, .site-footer, .sticky-mobile, .admin-sidebar, .admin-topbar, .no-print { display: none !important; }
    .admin-body { display: block; } .admin-main { padding: 0; }
    body { background: white; }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1080px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-body { grid-template-columns: 76px 1fr; }
    .admin-sidebar .brand-text, .admin-nav a span:not(.ni), .admin-nav .nav-section, .admin-sidebar .sidebar-footer { display: none; }
    .admin-nav a { justify-content: center; padding: 12px; }
}
@media (max-width: 900px) {
    .top-bar { display: none; }
    .main-nav, .header-cta .btn-ghost { display: none; }
    body.nav-open .main-nav { display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: var(--navy); padding: 18px 24px; gap: 4px; border-top: 1px solid rgba(255,255,255,.08); }
    .nav-toggle { display: block; margin-left: auto; }
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero h1 { font-size: 2.25rem; }
    .sticky-mobile { display: flex; }
    .form-grid { grid-template-columns: 1fr; }
    body { padding-bottom: 54px; }
    .section { padding: 56px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .admin-main { padding: 0 18px 40px; }
}
