:root{
    --bg:#f1f5f9;
    --surface:#ffffff;
    --surface-soft:#f8fafc;
    --primary:#1e3a8a;
    --primary-2:#2563eb;
    --primary-3:#1d4ed8;
    --text:#0f172a;
    --muted:#475569;
    --border:#dbe4ee;
    --success-bg:#dcfce7;
    --success-text:#166534;
    --error-bg:#fee2e2;
    --error-text:#991b1b;
    --warning-bg:#fef3c7;
    --warning-text:#92400e;
    --shadow:0 10px 30px rgba(15,23,42,.08);
    --radius:16px;
    --radius-sm:10px;
}

*{
    box-sizing:border-box;
}

html,body{
    margin:0;
    padding:0;
    min-height:100%;
}

body{
    font-family:Arial, Helvetica, sans-serif;
    background:var(--bg);
    color:var(--text);
    min-height:100vh;
    position:relative;
}

/* HEADER */
.topbar{
    background:var(--primary);
    color:#fff;
    min-height:72px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:14px 18px;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.topbar-left,
.topbar-right{
    display:flex;
    align-items:center;
    gap:12px;
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    color:#fff;
    text-decoration:none;
}

.brand-title{
    font-size:20px;
    font-weight:700;
    line-height:1.1;
}

.brand-subtitle{
    font-size:12px;
    opacity:.9;
}



    .logo-mark{
    display:none;
}

/* PAGE */
.page-shell{
    width:100%;
    max-width:1200px;
    margin:0 auto;
    padding:24px 16px 40px;
}

.page-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:20px;
}

.page-title{
    margin:0;
    font-size:28px;
    line-height:1.15;
}

.page-subtitle{
    margin:6px 0 0;
    color:var(--muted);
    font-size:15px;
}

.page-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

/* CARDS */
.card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    overflow:hidden;
}

.card-body{
    padding:22px;
}

.card-header{
    padding:18px 22px;
    border-bottom:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.card-title{
    margin:0;
    font-size:20px;
    line-height:1.2;
}

.card-subtitle{
    margin:6px 0 0;
    color:var(--muted);
    font-size:14px;
}

.stack{
    display:grid;
    gap:18px;
}

.grid-2{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:18px;
}

.grid-3{
    display:grid;
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:18px;
}

/* BUTTONS */
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:42px;
    padding:10px 16px;
    border-radius:10px;
    border:1px solid transparent;
    text-decoration:none;
    font-weight:600;
    font-size:14px;
    cursor:pointer;
    transition:.18s ease;
}

.btn:hover{
    transform:translateY(-1px);
}

.btn-primary{
    background:var(--primary-2);
    color:#fff;
}

.btn-primary:hover{
    background:var(--primary-3);
}

.btn-secondary{
    background:#fff;
    color:var(--primary);
    border-color:#bfdbfe;
}

.btn-secondary:hover{
    background:#eff6ff;
}

.btn-ghost{
    background:transparent;
    color:var(--primary);
    border-color:var(--border);
}

.btn-danger{
    background:#dc2626;
    color:#fff;
}

.btn-full{
    width:100%;
}

/* FORMS */
.form-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:16px;
}

.field{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.field-full{
    grid-column:1 / -1;
}

label{
    font-size:14px;
    font-weight:700;
    color:var(--text);
}

input,
select,
textarea{
    width:100%;
    border:1px solid #cbd5e1;
    border-radius:10px;
    padding:12px 13px;
    font-size:14px;
    background:#fff;
    color:var(--text);
    outline:none;
}

input:focus,
select:focus,
textarea:focus{
    border-color:#93c5fd;
    box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

textarea{
    min-height:120px;
    resize:vertical;
}

.help-text{
    color:var(--muted);
    font-size:13px;
    line-height:1.45;
}

/* ALERT */
.alert{
    padding:14px 16px;
    border-radius:12px;
    margin-bottom:16px;
    font-size:14px;
}

.alert.success{
    background:var(--success-bg);
    color:var(--success-text);
}

.alert.error{
    background:var(--error-bg);
    color:var(--error-text);
}

.alert.warning{
    background:var(--warning-bg);
    color:var(--warning-text);
}

/* TABLE */
.table-wrap{
    width:100%;
    overflow:auto;
}

.table{
    width:100%;
    border-collapse:collapse;
    min-width:720px;
}

.table th,
.table td{
    text-align:left;
    padding:14px 12px;
    border-bottom:1px solid var(--border);
    vertical-align:top;
    font-size:14px;
}

.table th{
    background:var(--surface-soft);
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.03em;
    color:var(--muted);
}

.table tr:hover td{
    background:#fafcff;
}

/* MOBILE CARDS */
.mobile-list{
    display:none;
    gap:14px;
}

.mobile-item{
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    box-shadow:var(--shadow);
    padding:16px;
}

.mobile-item h3{
    margin:0 0 10px;
    font-size:17px;
}

.mobile-meta{
    display:grid;
    gap:8px;
    font-size:14px;
}

.mobile-meta strong{
    color:var(--text);
}

.mobile-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:14px;
}

/* BADGES */
.badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    background:#e2e8f0;
    color:#334155;
}

.badge.success{
    background:#dcfce7;
    color:#166534;
}

.badge.warning{
    background:#fef3c7;
    color:#92400e;
}

.badge.error{
    background:#fee2e2;
    color:#991b1b;
}

/* LOGIN / PUBLIC PAGES */
.auth-shell{
    min-height:calc(100vh - 72px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:28px 16px 40px;
}

.auth-card{
    width:100%;
    max-width:460px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:20px;
    box-shadow:var(--shadow);
    overflow:hidden;
}

.auth-card .card-body{
    padding:26px;
}

.auth-title{
    margin:0 0 8px;
    font-size:28px;
}

.auth-text{
    margin:0 0 18px;
    color:var(--muted);
    line-height:1.5;
}

.auth-links{
    margin-top:16px;
    font-size:14px;
    color:var(--muted);
}

.auth-links a{
    color:var(--primary-2);
    text-decoration:none;
}

.auth-links a:hover{
    text-decoration:underline;
}

/* FOOTER */
.site-footer{
    margin-top:24px;
    text-align:center;
    font-size:13px;
    color:var(--muted);
}

.site-footer a{
    color:var(--primary-2);
    text-decoration:none;
}

.site-footer a:hover{
    text-decoration:underline;
}

.dev-block{
    margin-top:9px;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
}

.dev-logo{
    max-height:100px;
    width:auto;
    display:block;
}

/* SIMPLE DROPDOWN / MENU */
.menu-toggle{
    width:42px;
    height:42px;
    border:1px solid rgba(255,255,255,.18);
    background:rgba(255,255,255,.12);
    color:#fff;
    border-radius:12px;
    cursor:pointer;
    font-size:18px;
}

.menu-panel{
    position:absolute;
    top:64px;
    right:16px;
    min-width:220px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:14px;
    box-shadow:var(--shadow);
    padding:8px;
    display:none;
    z-index:50;
}

.menu-panel.open{
    display:block;
}

.menu-panel a,
.menu-panel button{
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    padding:11px 12px;
    background:transparent;
    border:none;
    border-radius:10px;
    text-align:left;
    text-decoration:none;
    color:var(--text);
    cursor:pointer;
    font-size:14px;
}

.menu-panel a:hover,
.menu-panel button:hover,
.menu-panel a.active{
    background:#eff6ff;
    color:var(--primary);
}

/* UTILITIES */
.text-muted{ color:var(--muted); }
.text-center{ text-align:center; }
.mt-0{ margin-top:0; }
.mt-1{ margin-top:8px; }
.mt-2{ margin-top:12px; }
.mt-3{ margin-top:18px; }
.mt-4{ margin-top:24px; }
.mb-0{ margin-bottom:0; }
.hidden{ display:none !important; }

/* RESPONSIVE */
@media (max-width: 920px){
    .grid-3{
        grid-template-columns:1fr 1fr;
    }

    .form-grid,
    .grid-2{
        grid-template-columns:1fr;
    }
}

@media (max-width: 760px){
    .topbar{
        padding:12px 14px;
        min-height:64px;
    }

    .brand-title{
        font-size:18px;
    }

    .page-shell{
        padding:18px 12px 28px;
    }

    .page-header{
        flex-direction:column;
        align-items:stretch;
    }

    .page-title{
        font-size:24px;
    }

    .card-header,
    .card-body{
        padding:16px;
    }

    .table-wrap{
        display:none;
    }

    .mobile-list{
        display:grid;
    }

    .auth-shell{
        align-items:flex-start;
        padding-top:20px;
    }

    .auth-card .card-body{
        padding:20px 16px;
    }

    .auth-title{
        font-size:24px;
    }

    .btn,
    .btn-full-mobile{
        width:100%;
    }

    .page-actions{
        width:100%;
    }

    .page-actions .btn{
        width:100%;
    }
}
.drawer-backdrop{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
    z-index:80;
}

.drawer-backdrop.open{
    opacity:1;
    pointer-events:auto;
}

.drawer{
    position:fixed;
    top:0;
    right:-320px;
    width:300px;
    max-width:90vw;
    height:100vh;
    background:#fff;
    box-shadow:-4px 0 18px rgba(0,0,0,.12);
    transition:right .25s ease;
    z-index:90;
    display:flex;
    flex-direction:column;
}

.drawer.open{
    right:0;
}

.drawer-header{
    background:var(--primary);
    color:#fff;
    padding:18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.drawer-title{
    font-size:18px;
    font-weight:700;
}

.drawer-close{
    background:transparent;
    border:0;
    color:#fff;
    cursor:pointer;
    font-size:24px;
    line-height:1;
}

.drawer-nav{
    padding:14px 18px 24px;
}

.drawer-nav a{
    display:block;
    padding:12px 0;
    text-decoration:none;
    color:var(--text);
    border-bottom:1px solid var(--border);
    font-size:15px;
}

.drawer-nav a:hover,
.drawer-nav a.active{
    color:var(--primary);
}
.auth-card button.btn{
    margin-top:10px;
}