:root{
    --bg:#fafafa;
    --card:#ffffff;
    --border:#e5e7eb;
    --text:#09090b;
    --muted:#71717a;
    --dark:#0f75bd;
    --brand:#0f75bd;
    --soft:#f4f4f5;
    --radius:12px;
}

*{box-sizing:border-box}
body{background:var(--bg); color:var(--text); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
a{text-decoration:none}

.auth-body{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff;
}
.auth-card{
    width:min(450px, calc(100% - 32px));
    padding:32px;
}
.auth-logo{width:100px;height:100px;object-fit:contain}
.auth-card h1{font-size:24px;font-weight:650;letter-spacing:-.02em}
.auth-card p{font-size:14px;color:var(--muted)}
.form-control,.form-select{
    border-radius:8px;
    border-color:var(--border);
}
.form-control:focus,.form-select:focus{
    border-color:var(--brand);
    box-shadow:0 0 0 .2rem rgba(15,117,189,.12);
}
.btn{border-radius:8px;font-weight:500}
.btn-dark{background:var(--brand);border-color:var(--brand)}
.btn-dark:hover,.btn-dark:focus{background:#0a5f9a;border-color:#0a5f9a}
.btn-outline-dark{color:var(--brand);border-color:var(--brand)}
.btn-outline-dark:hover,.btn-outline-dark:focus{background:var(--brand);border-color:var(--brand);color:#fff}

.app-header{
    position:fixed;
    top:0;left:0;right:0;
    height:56px;
    background:rgba(255,255,255,.95);
    border-bottom:1px solid var(--border);
    z-index:1020;
    backdrop-filter:blur(10px);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 16px;
}
.header-left,.header-actions{display:flex;align-items:center;gap:10px}
.brand-mini{display:flex;align-items:center;color:var(--text);font-weight:650}
.brand-mini img{width:40px;height:40px;object-fit:contain;margin-right:10px}
.shell{display:flex}
.sidebar{
    width:288px;
    min-height:100vh;
    border-right:1px solid var(--border);
    background:#fff;
    position:fixed;
    left:0;top:0;bottom:0;
    z-index:1010;
    overflow-y:auto;
}
.sidebar-spacer{height:64px}
.sidebar .nav{padding:16px 12px}
.sidebar .nav-link{
    display:flex;
    align-items:center;
    gap:10px;
    color:#52525b;
    border-radius:8px;
    padding:10px 12px;
    font-size:14px;
    font-weight:500;
    margin-bottom:4px;
}
.sidebar .nav-link:hover{background:#e8f3fb;color:var(--brand)}
.sidebar .nav-link.active{background:var(--brand);color:#fff}
.main{
    margin-left:288px;
    width:calc(100% - 288px);
    padding-top:56px;
}
.page-wrap{padding:32px}
.page-title{display:none}
.section-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    margin-bottom:28px;
}
.section-head h2{font-size:24px;font-weight:700;letter-spacing:-.02em;margin:0}
.section-head p{margin:6px 0 0;color:var(--muted)}
.app-card{
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:0 1px 2px rgba(0,0,0,.03);
    overflow:hidden;
}
.card-header{border-bottom:1px solid var(--border)}
.metric-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:22px;
    display:flex;
    justify-content:space-between;
    min-height:118px;
}
.metric-card small{
    display:block;
    font-size:14px;
    font-weight:500;
    color:#3f3f46;
    margin-bottom:10px;
}
.metric-card strong{
    display:block;
    font-size:28px;
    font-weight:700;
    letter-spacing:-.03em;
}
.metric-card i{color:#71717a}
.table{font-size:14px}
.table thead th{
    font-size:13px;
    font-weight:600;
    color:#52525b;
    background:#fff;
}
.table td,.table th{padding:13px 14px}
.badge{border-radius:999px}
.form-card{max-width:920px;margin:auto}
.info-box{
    border:1px solid var(--border);
    border-radius:10px;
    padding:14px;
    background:#fff;
}
.info-box small{display:block;color:var(--muted);font-size:12px;margin-bottom:5px}
.info-box strong{display:block;font-weight:600}
.app-tabs .nav-link{
    color:#52525b;
    border-radius:8px 8px 0 0;
    font-weight:500;
}
.app-tabs .nav-link.active{
    color:var(--brand);
    font-weight:650;
}
.timeline{display:flex;flex-direction:column;gap:14px}
.timeline-item{display:flex;gap:12px;align-items:flex-start}
.timeline-item span{
    width:14px;height:14px;border-radius:50%;
    border:2px solid var(--brand);
    margin-top:3px;
    background:#fff;
}
.timeline-item.done span{background:var(--brand)}
.timeline-item.current span{background:#f59e0b;border-color:#f59e0b}
.timeline-item.current strong{color:#92400e}
.timeline-item small{display:block;color:var(--muted)}
.summary-line{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 0;
    border-bottom:1px solid var(--border);
}
.summary-line:last-child{border-bottom:0}
.permissions-grid{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.permission-pill{
    display:flex;
    align-items:center;
    gap:7px;
    border:1px solid var(--border);
    border-radius:8px;
    padding:8px 10px;
    background:#fff;
    cursor:pointer;
    font-size:13px;
}
@media(max-width:991px){
    .sidebar{left:-300px;transition:left .2s}
    body.sidebar-open .sidebar{left:0}
    .main{margin-left:0;width:100%}
    .page-wrap{padding:20px}
    .section-head{flex-direction:column}
}
@media print{
    .app-header,.sidebar,.section-head .btn,.btn,.nav-tabs{display:none!important}
    .main{margin-left:0;width:100%;padding-top:0}
    .page-wrap{padding:0}
    .card{border:0!important;box-shadow:none!important}
}
