@font-face {
    font-family:"A1Sorter";
    src:url("/static/fonts/Poppins-Bold.ttf") format("ttf");
    font-weight:400;
    font-style:normal;
    font-display:swap;
}
:root {
    --navy: #11134f;
    --navy-2: #1b1e61;
    --cyan: #1fb2e5;
    --cyan-soft: #e8f8fd;
    --ink: #131722;
    --muted: #707789;
    --line: #e5e8ef;
    --surface: #ffffff;
    --bg: #f5f7fa;
    --danger: #bb2b38;
    --success: #087b5b;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(17, 19, 79, .08);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font-family: Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.brand-mark { font-family: "A1Sorter", sans-serif; font-size: 25px; font-weight: 900; letter-spacing: .08em; font-style: normal; }
.brand-a1 { color: var(--cyan); }
.brand-time { color: var(--navy); }
.topbar .brand-time { color: #fff; }
.brand-sub { margin-top: 7px; color: var(--cyan); font-size: 8px; letter-spacing: .35em; font-weight: 800; }

.topbar { height: 76px; padding: 0 clamp(22px, 4vw, 64px); display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 30px; color: #fff; background: var(--navy); position: sticky; top: 0; z-index: 50; box-shadow: 0 8px 24px rgba(17,19,79,.15); }
.topnav { height: 100%; display: flex; align-items: stretch; justify-content: center; gap: 8px; }
.topnav a { display: flex; align-items: center; padding: 0 18px; text-decoration: none; color: rgba(255,255,255,.72); font-size: 14px; font-weight: 650; border-bottom: 3px solid transparent; transition: .2s; }
.topnav a:hover, .topnav a.is-active { color: #fff; border-color: var(--cyan); }
.user-menu { position: relative; }
.user-trigger { display: flex; align-items: center; gap: 11px; border: 0; color: #fff; background: transparent; cursor: pointer; padding: 8px; border-radius: 12px; }
.user-trigger:hover { background: rgba(255,255,255,.08); }
.avatar { width: 36px; height: 36px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--navy); background: var(--cyan); font-weight: 900; }
.user-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.user-copy strong { font-size: 13px; }
.user-copy small { color: rgba(255,255,255,.58); font-size: 11px; }
.chevron { opacity: .6; }
.user-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 190px; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.user-dropdown.is-open { display: block; }
.user-dropdown a, .user-dropdown button { width: 100%; display: block; padding: 11px 12px; border: 0; border-radius: 8px; text-align: left; color: var(--ink); background: transparent; text-decoration: none; cursor: pointer; }
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--bg); }
.mobile-menu { display: none; }

.page-shell { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 70px; }
.footer { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.section-kicker { display: block; color: var(--cyan); font-size: 11px; font-weight: 900; letter-spacing: .18em; margin-bottom: 10px; }
.hero-row, .page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 36px; }
.hero-row h1, .page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(34px, 4vw, 55px); line-height: 1.03; letter-spacing: -.045em; }
.hero-row p, .page-heading p { margin: 12px 0 0; color: var(--muted); font-size: 16px; }
.hero-status { min-width: 220px; display: flex; align-items: center; gap: 12px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.hero-status div { display: flex; flex-direction: column; gap: 3px; }
.hero-status strong { font-size: 13px; }
.hero-status small { color: var(--muted); font-size: 11px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #15a77e; box-shadow: 0 0 0 5px rgba(21,167,126,.11); }

.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.module-card { min-height: 292px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; box-shadow: 0 1px 0 rgba(17,19,79,.02); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; overflow: hidden; position: relative; }
.module-card::after { content: ""; width: 110px; height: 110px; border: 18px solid rgba(31,178,229,.05); position: absolute; right: -48px; bottom: -55px; transform: rotate(45deg); }
a.module-card:hover { transform: translateY(-5px); border-color: rgba(31,178,229,.45); box-shadow: var(--shadow); }
.module-top { display: flex; align-items: center; justify-content: space-between; }
.module-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--navy); background: var(--cyan-soft); border-radius: 12px; font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.module-arrow { width: 38px; height: 38px; display: grid; place-items: center; color: var(--navy); border: 1px solid var(--line); border-radius: 50%; font-size: 19px; }
.module-copy small { color: var(--cyan); font-weight: 850; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }
.module-copy h2 { margin: 8px 0 10px; color: var(--navy); font-size: 25px; letter-spacing: -.03em; }
.module-copy p { max-width: 310px; margin: 0; color: var(--muted); line-height: 1.58; font-size: 14px; }
.module-link { color: var(--navy); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.module-link b { margin-left: 7px; color: var(--cyan); font-size: 16px; }
.module-card.is-soon { background: #f9fafc; }
.module-state { padding: 7px 9px; border-radius: 7px; color: var(--muted); background: #eef0f4; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.module-link.muted { color: #a0a6b4; }

.content-section { margin-top: 58px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; }
.section-head h2 { margin: 0; color: var(--navy); font-size: 28px; letter-spacing: -.03em; }
.text-link { color: var(--navy); font-size: 12px; font-weight: 800; text-decoration: none; }
.text-link:hover { color: var(--cyan); }

.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 9px; font-size: 11px; font-weight: 900; letter-spacing: .09em; text-decoration: none; cursor: pointer; transition: .18s; }
.btn-primary { color: #fff; background: var(--navy); }
.btn-primary:hover { background: var(--navy-2); box-shadow: 0 10px 25px rgba(17,19,79,.16); }
.btn-secondary { color: var(--navy); background: #fff; border-color: var(--line); }
.btn-secondary:hover { border-color: #cbd0dc; }
.btn-danger { color: var(--danger); background: #fff; border-color: rgba(187,43,56,.25); }
.btn-danger:hover { background: #fff4f5; }
.btn-wide { width: 100%; min-height: 52px; justify-content: space-between; padding: 0 22px; }

.filter-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 25px; }
.filter-tabs a { white-space: nowrap; padding: 11px 15px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; text-decoration: none; font-size: 12px; font-weight: 700; }
.filter-tabs a:hover, .filter-tabs a.is-active { color: #fff; background: var(--navy); border-color: var(--navy); }
.report-list { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.report-row { min-height: 82px; display: grid; grid-template-columns: 58px minmax(0, 1fr) 170px 100px 30px; align-items: center; gap: 18px; padding: 12px 22px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); transition: .15s; }
.report-row:last-child { border-bottom: 0; }
.report-row:hover { background: #fafcff; }
.report-type { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 11px; color: var(--navy); background: var(--cyan-soft); font-size: 10px; font-weight: 900; }
.report-main, .report-user { display: flex; flex-direction: column; gap: 5px; }
.report-main strong { color: var(--navy); font-size: 15px; }
.report-main small, .report-user small { color: var(--muted); font-size: 11px; }
.report-user { font-size: 12px; }
.report-meta { color: var(--muted); font-size: 12px; }
.report-go { color: var(--cyan); font-size: 19px; }
.compact-list .report-row { grid-template-columns: 58px minmax(0, 1fr) 100px 30px; }

.form-card, .table-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 0 rgba(17,19,79,.02); }
.narrow-card { max-width: 820px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid.single-column { grid-template-columns: 1fr; }
.span-2 { grid-column: span 2; }
.stack-form label { display: flex; flex-direction: column; gap: 8px; }
.stack-form label > span { color: var(--navy); font-size: 12px; font-weight: 750; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; border: 1px solid #dfe3eb; border-radius: 9px; color: var(--ink); background: #fff; outline: none; padding: 13px 14px; transition: .15s; }
.stack-form textarea { resize: vertical; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(31,178,229,.1); }
.stack-form label small { color: var(--muted); font-size: 10px; }
.file-drop { padding: 22px; border: 1px dashed #cdd3df; border-radius: 12px; background: #fafbfc; }
.file-drop input { padding: 10px; background: #fff; }
.check-label { flex-direction: row !important; align-items: center; padding: 8px 0; }
.check-label input { width: 18px; height: 18px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 26px; margin-top: 26px; border-top: 1px solid var(--line); }

.table-card { padding: 0; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 15px 20px; color: var(--muted); background: #fafbfc; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; text-align: left; }
.data-table td { padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.data-table tr:last-child td { border-bottom: 0; }
.table-user { display: flex; align-items: center; gap: 12px; }
.table-user .avatar { width: 34px; height: 34px; }
.role-badge, .status-label { display: inline-flex; padding: 6px 9px; border-radius: 7px; font-size: 10px; font-weight: 800; }
.role-admin { color: var(--navy); background: #e9eafb; }
.role-analysis { color: #036787; background: var(--cyan-soft); }
.role-manager { color: #6c5210; background: #fff6d9; }
.role-employee { color: #525a69; background: #eef0f4; }
.status-label.active { color: var(--success); background: #e8f7f2; }
.status-label.inactive { color: #7b8290; background: #eef0f4; }
.align-right { text-align: right; }
.table-link { color: var(--navy); font-weight: 800; text-decoration: none; }
.table-link:hover { color: var(--cyan); }

.report-description { margin-bottom: 20px; padding: 18px 20px; border-left: 3px solid var(--cyan); color: #4e5565; background: #fff; line-height: 1.6; }
.heading-actions { display: flex; gap: 10px; }
.preview-shell { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.preview-bar { min-height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 0 18px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; }
.preview-bar a { color: var(--navy); font-weight: 800; text-decoration: none; }
.preview-shell iframe { width: 100%; height: 72vh; display: block; border: 0; background: #eef0f4; }
.danger-zone { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px; border: 1px solid rgba(187,43,56,.18); border-radius: 13px; background: #fff; }
.danger-zone strong { color: var(--danger); font-size: 13px; }
.danger-zone p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

.empty-state, .error-page { padding: 80px 25px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.empty-state > span, .error-page > span { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 15px; color: var(--navy); background: var(--cyan-soft); font-size: 13px; font-weight: 900; }
.empty-state h2, .error-page h1 { margin: 0; color: var(--navy); }
.empty-state p, .error-page p { margin: 10px auto 22px; max-width: 520px; color: var(--muted); }
.file-state .btn { margin-top: 6px; }

.flash-stack { position: fixed; right: 24px; top: 92px; z-index: 100; display: grid; gap: 8px; width: min(390px, calc(100% - 48px)); }
.flash { padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); font-size: 13px; animation: flash-in .25s ease; }
.flash-error { color: var(--danger); border-left: 4px solid var(--danger); }
.flash-success { color: var(--success); border-left: 4px solid var(--success); }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

.login-body { background: #fff; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.18fr .82fr; }
.login-visual { min-height: 100vh; padding: clamp(40px, 7vw, 110px); display: flex; align-items: center; color: #fff; background: var(--navy); position: relative; overflow: hidden; }
.login-visual::before { content: ""; position: absolute; width: 620px; height: 620px; right: -300px; top: -260px; border: 80px solid rgba(31,178,229,.08); transform: rotate(45deg); }
.login-visual::after { content: ""; position: absolute; width: 440px; height: 440px; left: -260px; bottom: -250px; border: 60px solid rgba(255,255,255,.035); transform: rotate(45deg); }
.login-visual-inner { position: relative; z-index: 2; max-width: 700px; }
.visual-badge { display: inline-flex; padding: 8px 11px; border: 1px solid rgba(255,255,255,.17); border-radius: 7px; color: var(--cyan); font-size: 10px; font-weight: 850; letter-spacing: .18em; }
.login-visual h1 { margin: 28px 0 22px; font-size: clamp(50px, 6vw, 88px); line-height: .98; letter-spacing: -.055em; }
.login-visual h1 span { color: var(--cyan); }
.login-visual p { max-width: 540px; margin: 0; color: rgba(255,255,255,.64); font-size: 17px; line-height: 1.7; }
.visual-lines { display: flex; gap: 9px; margin-top: 52px; }
.visual-lines i { height: 4px; display: block; background: var(--cyan); }
.visual-lines i:nth-child(1) { width: 90px; }
.visual-lines i:nth-child(2) { width: 28px; opacity: .55; }
.visual-lines i:nth-child(3) { width: 12px; opacity: .3; }
.login-panel { display: grid; place-items: center; padding: 45px; background: #fff; }
.login-card { width: min(420px, 100%); }
.brand-login { margin-bottom: 78px; }
.brand-login .brand-mark { font-size: 31px; }
.login-heading h2 { margin: 0; color: var(--navy); font-size: 40px; letter-spacing: -.04em; }
.login-heading p { margin: 10px 0 30px; color: var(--muted); }
.login-card .stack-form { display: grid; gap: 19px; }
.password-field { position: relative; }
.password-field input { padding-right: 74px; }
.password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; color: var(--navy); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.login-note { margin: 22px 0 0; color: #a0a6b3; font-size: 10px; text-align: center; }

@media (max-width: 980px) {
    .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-layout { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; }
    .brand-login { margin-bottom: 60px; }
    .topbar { grid-template-columns: 1fr auto auto; padding: 0 22px; }
    .mobile-menu { display: block; border: 0; color: #fff; background: transparent; font-size: 20px; cursor: pointer; }
    .topnav { display: none; position: absolute; left: 16px; right: 16px; top: 68px; height: auto; padding: 8px; flex-direction: column; align-items: stretch; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: var(--navy); box-shadow: var(--shadow); }
    .topnav.is-open { display: flex; }
    .topnav a { padding: 13px; border: 0; border-radius: 8px; }
    .topnav a:hover, .topnav a.is-active { background: rgba(255,255,255,.08); }
    .report-row { grid-template-columns: 58px minmax(0, 1fr) 90px 25px; }
    .report-user { display: none; }
}

@media (max-width: 680px) {
    .page-shell, .footer { width: min(100% - 28px, 1380px); }
    .page-shell { padding-top: 34px; }
    .user-copy, .chevron { display: none; }
    .tile-grid { grid-template-columns: 1fr; }
    .hero-row, .page-heading { align-items: flex-start; flex-direction: column; }
    .hero-status { width: 100%; }
    .module-card { min-height: 260px; }
    .page-heading .btn, .heading-actions { width: 100%; }
    .heading-actions .btn { flex: 1; }
    .form-card { padding: 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .report-row, .compact-list .report-row { grid-template-columns: 50px minmax(0, 1fr) 22px; gap: 12px; padding: 12px 14px; }
    .report-type { width: 44px; height: 44px; }
    .report-meta, .report-user { display: none; }
    .preview-shell iframe { height: 65vh; }
    .danger-zone { align-items: stretch; flex-direction: column; }
    .danger-zone .btn { width: 100%; }
    .login-panel { padding: 28px; }
    .login-heading h2 { font-size: 34px; }
}
