:root {
    --ink: #162238;
    --muted: #6d788b;
    --line: #e7ebf0;
    --surface: #ffffff;
    --soft: #f5f7fa;
    --navy: #0f2847;
    --navy-2: #15375e;
    --gold: #cda54d;
    --green: #1d805e;
    --danger-bg: #fff0f0;
    --danger-text: #a93434;
    --shadow: 0 18px 48px rgba(15, 40, 71, .10);
    --radius: 20px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--soft); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
.eyebrow { margin: 0 0 10px; font-size: 12px; letter-spacing: .16em; font-weight: 800; color: #d7e8ff; }
.eyebrow.dark { color: #60708a; }
.muted { color: var(--muted); }

/* Login */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, .95fr) minmax(480px, 1.05fr); }
.brand-panel { position: relative; overflow: hidden; display: flex; align-items: center; padding: 64px clamp(40px, 6vw, 92px); background: linear-gradient(145deg, #0a203c 0%, #12365d 56%, #0e2948 100%); color: #fff; }
.brand-panel::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(to bottom, black, transparent 88%); }
.brand-glow { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .22; }
.brand-glow-one { width: 400px; height: 400px; background: #d2ab51; right: -190px; top: -160px; }
.brand-glow-two { width: 320px; height: 320px; background: #4992d0; left: -160px; bottom: -130px; }
.brand-content { position: relative; z-index: 1; max-width: 620px; }
.brand-logo { width: 150px; height: 150px; object-fit: contain; margin-bottom: 34px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.2)); background: rgba(255,255,255,.96); border-radius: 50%; padding: 8px; }
.brand-content h1 { margin: 0; max-width: 620px; font-size: clamp(36px, 4vw, 62px); line-height: 1.02; letter-spacing: -.035em; }
.brand-copy { max-width: 580px; margin: 22px 0 38px; color: #d8e4f1; font-size: 17px; line-height: 1.7; }
.brand-meta { display: grid; gap: 8px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.16); color: #c1cede; font-size: 13px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px; background: #fff; }
.login-card { width: min(440px, 100%); }
.login-card h2 { margin: 0 0 10px; font-size: 38px; letter-spacing: -.035em; }
.login-card > .muted { margin: 0 0 32px; line-height: 1.6; }
.mobile-brand { display: none; }
.alert { margin: 0 0 22px; padding: 13px 15px; background: var(--danger-bg); color: var(--danger-text); border: 1px solid #ffd5d5; border-radius: 12px; font-size: 14px; }
.login-form { display: grid; gap: 20px; }
.login-form label { display: grid; gap: 8px; }
.login-form label > span { font-size: 13px; font-weight: 700; }
.login-form input { width: 100%; height: 50px; border: 1px solid #d9e0e8; border-radius: 12px; padding: 0 14px; outline: none; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.login-form input:focus { border-color: #2b5c8b; box-shadow: 0 0 0 4px rgba(43, 92, 139, .10); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 70px; }
.password-toggle { position: absolute; right: 8px; top: 8px; height: 34px; border: 0; background: #eef3f7; color: #3e536d; border-radius: 8px; padding: 0 12px; font-size: 12px; font-weight: 800; }
.primary-button { height: 52px; border: 0; border-radius: 12px; background: var(--navy); color: white; font-weight: 800; box-shadow: 0 10px 24px rgba(15,40,71,.17); transition: transform .15s, background .15s; }
.primary-button:hover { background: var(--navy-2); transform: translateY(-1px); }
.primary-button.inline, .secondary-button.inline { display: inline-flex; width: auto; align-items: center; justify-content: center; padding: 0 20px; }
.security-note { margin: 22px 0 0; color: #8a94a4; font-size: 12px; text-align: center; }

/* Application shell */
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; display: flex; flex-direction: column; z-index: 40; padding: 24px 18px; background: #0c2340; color: white; }
.sidebar-brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 25px; border-bottom: 1px solid rgba(255,255,255,.10); }
.sidebar-brand img { width: 48px; height: 48px; object-fit: contain; border-radius: 50%; padding: 3px; background: #fff; }
.sidebar-brand div { display: grid; gap: 2px; }
.sidebar-brand strong { letter-spacing: .03em; font-size: 14px; }
.sidebar-brand span { color: #aebdcd; font-size: 11px; }
.sidebar-nav { display: grid; gap: 7px; margin-top: 26px; }
.nav-link { min-height: 48px; display: flex; align-items: center; gap: 12px; border-radius: 11px; padding: 0 13px; color: #c8d5e1; font-size: 13px; font-weight: 650; transition: background .15s, color .15s; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.09); color: white; }
.nav-icon, .nav-badge { width: 27px; min-width: 27px; height: 27px; display: inline-grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.09); font-size: 11px; font-weight: 800; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 9px; color: #a9b9c8; font-size: 11px; padding: 18px 8px 4px; border-top: 1px solid rgba(255,255,255,.10); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #54d59b; box-shadow: 0 0 0 4px rgba(84,213,155,.10); }
.app-main { grid-column: 2; min-width: 0; }
.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(24px, 4vw, 54px); background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-left { display: flex; align-items: center; gap: 18px; }
.topbar .eyebrow { margin-bottom: 2px; font-size: 9px; }
.topbar h1 { margin: 0; font-size: 22px; }
.menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: white; border-radius: 10px; }
.admin-menu { display: flex; align-items: center; gap: 10px; }
.admin-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #edf2f7; color: var(--navy); font-weight: 800; }
.admin-copy { display: grid; gap: 1px; min-width: 95px; }
.admin-copy strong { font-size: 12px; }
.admin-copy span { font-size: 10px; color: var(--muted); }
.logout-button { margin-left: 8px; height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: white; color: #44536a; font-size: 11px; font-weight: 750; }
.dashboard-content { padding: 34px clamp(24px, 4vw, 54px) 24px; }
.welcome-card { position: relative; overflow: hidden; min-height: 210px; display: flex; align-items: center; justify-content: space-between; border-radius: 22px; padding: 36px clamp(26px, 4vw, 48px); background: linear-gradient(120deg, #113359, #174c77); color: white; box-shadow: var(--shadow); }
.welcome-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 30%, rgba(205,165,77,.25), transparent 28%); }
.welcome-card > div { position: relative; z-index: 1; max-width: 720px; }
.welcome-card h2 { margin: 12px 0 10px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; }
.welcome-card p { max-width: 700px; margin: 0; color: #d6e3ef; line-height: 1.65; font-size: 14px; }
.welcome-card img { position: relative; z-index: 1; width: 130px; height: 130px; object-fit: contain; border-radius: 50%; padding: 7px; background: white; opacity: .96; box-shadow: 0 16px 32px rgba(0,0,0,.18); }
.pill { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.13); color: #e4eef8; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 34px; }
.summary-card { min-height: 126px; display: grid; align-content: center; gap: 7px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.summary-card > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.summary-card strong { font-size: 23px; letter-spacing: -.02em; }
.summary-card small { color: #8c96a5; font-size: 10px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 0 14px; }
.section-heading .eyebrow { margin-bottom: 4px; font-size: 9px; }
.section-heading h2 { margin: 0; font-size: 23px; }
.integration-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.module-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 24px; transition: transform .16s, box-shadow .16s, border-color .16s; }
.module-card:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(15,40,71,.08); border-color: #d9e0e8; }
.module-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 19px; }
.module-mark { width: 45px; height: 45px; display: inline-grid; place-items: center; border-radius: 12px; background: #eef3f7; color: var(--navy); font-size: 12px; font-weight: 850; }
.ready-badge { padding: 6px 9px; border-radius: 999px; background: #eaf7f1; color: var(--green); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.module-card h3 { margin: 0 0 8px; font-size: 18px; }
.module-card > p { min-height: 44px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.module-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 20px 0; }
.module-metrics div { padding: 12px; background: #f7f9fb; border-radius: 10px; }
.module-metrics span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 700; }
.module-metrics strong { font-size: 16px; }
.module-button { min-height: 42px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 15px; color: #244e78; font-size: 11px; font-weight: 800; }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 34px; padding: 20px 2px 5px; border-top: 1px solid var(--line); color: #8b95a3; font-size: 10px; }
.sidebar-overlay { display: none; }

/* Module placeholder */
.module-page { background: #f4f6f9; }
.module-topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 12px clamp(20px,4vw,54px); background: white; border-bottom: 1px solid var(--line); }
.module-brand { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; }
.module-brand img { width: 44px; height: 44px; object-fit: contain; }
.module-actions { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.module-actions a { color: var(--navy); font-weight: 800; }
.module-shell { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 36px 20px; }
.placeholder-panel { width: min(760px,100%); padding: clamp(28px,5vw,54px); background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); text-align: center; }
.placeholder-panel .module-mark { margin-bottom: 22px; }
.placeholder-panel h1 { margin: 0 0 12px; font-size: clamp(28px,4vw,40px); }
.placeholder-panel > p:not(.eyebrow) { max-width: 610px; margin: 0 auto; color: var(--muted); line-height: 1.7; font-size: 13px; }
.placeholder-notes { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 30px 0; text-align: left; }
.placeholder-notes div { padding: 15px; background: #f7f9fb; border-radius: 12px; }
.placeholder-notes strong, .placeholder-notes span { display: block; }
.placeholder-notes strong { margin-bottom: 5px; font-size: 11px; }
.placeholder-notes span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.secondary-button { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--navy); font-size: 11px; font-weight: 800; }

@media (max-width: 1050px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
    .login-shell { grid-template-columns: 1fr; }
    .brand-panel { display: none; }
    .login-panel { min-height: 100vh; padding: 28px 20px; }
    .mobile-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 14px;
        margin-bottom: 40px;
        color: var(--navy);
        text-align: center;
    }
    .mobile-brand img,
    .mobile-brand-logo {
        width: 150px !important;
        height: 150px !important;
        min-width: 150px !important;
        min-height: 150px !important;
        max-width: 150px !important;
        max-height: 150px !important;
        flex: 0 0 150px !important;
        object-fit: contain;
    }
    .mobile-brand strong {
        display: block;
        font-size: 20px;
        line-height: 1.25;
        letter-spacing: .02em;
    }
    .app-layout { display: block; }
    .app-main { margin-left: 0; }
    .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: 16px 0 40px rgba(0,0,0,.18); }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 30; background: rgba(5,20,35,.45); }
    .sidebar-open .sidebar-overlay { display: block; }
    .menu-button { display: grid; place-items: center; }
    .module-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .topbar { height: 74px; padding: 0 15px; }
    .topbar .eyebrow, .admin-copy { display: none; }
    .topbar h1 { font-size: 18px; }
    .admin-avatar { width: 34px; height: 34px; }
    .logout-button { margin-left: 0; padding: 0 10px; }
    .dashboard-content { padding: 20px 14px; }
    .welcome-card { padding: 26px 22px; min-height: 230px; }
    .welcome-card img { display: none; }
    .welcome-card h2 { font-size: 26px; }
    .summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px; }
    .summary-card { min-height: 110px; padding: 15px; }
    .summary-card strong { font-size: 19px; }
    .module-card { padding: 20px; }
    .app-footer { display: grid; }
    .placeholder-notes { grid-template-columns: 1fr; }
    .module-brand span, .module-actions span { display: none; }
}

.integrated-badge { background:#e8f6ef; color:#17734f; }
