/* ASARI Payroll — PT Dikari Tata Udara Indonesia */
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Segoe UI',Arial,sans-serif;font-size:14px;background:#f0f4f8;color:#1a2332}
a{text-decoration:none;color:inherit}

/* TOPBAR */
.topbar{background:#1B2A6B;color:#fff;height:52px;padding:0 1.5rem;display:flex;align-items:center;justify-content:space-between;position:fixed;top:0;left:0;right:0;z-index:100;box-shadow:0 2px 10px rgba(27,42,107,.4)}
.topbar-logo{display:flex;align-items:center;gap:12px}
.topbar-logo img{height:34px;width:auto;filter:brightness(0) invert(1)}
.topbar-div{width:1px;height:26px;background:rgba(255,255,255,.25)}
.topbar-sub{font-size:12px;opacity:.7;letter-spacing:.03em}
.topbar-right{display:flex;align-items:center;gap:10px}
.period-pill{background:rgba(201,168,76,.3);border:1px solid rgba(201,168,76,.5);color:#f5d98a;padding:3px 12px;border-radius:20px;font-size:12px;font-weight:600}
.uchip{font-size:12px;opacity:.8}
.btn-out{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);color:#fff;padding:5px 12px;border-radius:6px;cursor:pointer;font-size:12px;font-family:inherit}
.btn-out:hover{background:rgba(255,255,255,.22)}

/* SIDEBAR */
.sidebar{position:fixed;top:52px;left:0;bottom:0;width:215px;background:#fff;border-right:1px solid #e2e8f0;display:flex;flex-direction:column;overflow-y:auto;z-index:50}
.sb-brand{padding:.75rem 1.2rem .5rem;border-bottom:1px solid #f1f5f9}
.sb-brand img{height:26px;width:auto;opacity:.85}
.nav-sec{font-size:10px;font-weight:700;color:#94a3b8;padding:8px 18px 3px;letter-spacing:.08em;text-transform:uppercase}
.nav-item{display:flex;align-items:center;gap:9px;padding:9px 18px;font-size:13px;color:#475569;border-left:3px solid transparent;transition:all .12s}
.nav-item:hover{background:#f0f4ff;color:#1B2A6B}
.nav-item.active{background:#EEF2FF;color:#1B2A6B;font-weight:600;border-left-color:#C9A84C}
.sb-user{margin-top:auto;padding:10px 14px;border-top:1px solid #e2e8f0;display:flex;align-items:center;gap:8px}
.sb-av{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#1B2A6B,#2d44a8);color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex-shrink:0}
.sb-name{font-size:13px;font-weight:600}
.sb-role{font-size:11px;color:#94a3b8}

/* MAIN */
.main{margin-left:215px;padding-top:52px;min-height:100vh}
.content{padding:1.5rem}

/* CARDS */
.card{background:#fff;border-radius:12px;border:1px solid #e2e8f0;padding:1.25rem 1.5rem;margin-bottom:1.25rem;box-shadow:0 1px 4px rgba(0,0,0,.04)}
.page-title{font-size:20px;font-weight:700;color:#1B2A6B;margin-bottom:1.25rem}
.card-title{font-size:15px;font-weight:600;color:#1a2332;margin-bottom:1rem}
.sh{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.2rem;flex-wrap:wrap;gap:8px}
.gold-bar{height:3px;background:linear-gradient(90deg,#C9A84C,#f5d98a,#C9A84C);border-radius:2px;margin-bottom:1.25rem}
.sec-accent{border-left:4px solid #C9A84C;padding-left:10px;margin-bottom:1rem}
.sec-accent h3{font-size:15px;font-weight:700;color:#1B2A6B}
.sec-accent p{font-size:12px;color:#94a3b8;margin-top:2px}

/* METRICS */
.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:1.25rem}
.mc{background:#fff;border-radius:10px;border:1px solid #e2e8f0;padding:.9rem 1.1rem;position:relative;overflow:hidden}
.mc::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,#1B2A6B,#C9A84C)}
.mc-label{font-size:11px;font-weight:600;color:#94a3b8;text-transform:uppercase;letter-spacing:.05em;margin-bottom:5px}
.mc-val{font-size:20px;font-weight:700}
.mc-val.navy{color:#1B2A6B}.mc-val.g{color:#0a5c45}.mc-val.r{color:#991b1b}.mc-val.a{color:#92400e}

/* TABLE */
.tw{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:13px}
th{text-align:left;padding:9px 10px;font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em;border-bottom:2px solid #e2e8f0;white-space:nowrap;background:#fafbff}
td{padding:8px 10px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
tr:last-child td{border-bottom:none}
tr:hover td{background:#f8faff}

/* FORM */
.fg{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.fg3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}
.fr{margin-bottom:9px}
.fr label,.fg>div>label,.fg3>div>label{display:block;font-size:12px;font-weight:600;color:#64748b;margin-bottom:3px}
.fr input,.fr select,.fr textarea,.fg input,.fg select,.fg3 input,.fg3 select{width:100%;padding:7px 10px;border:1.5px solid #e2e8f0;border-radius:7px;font-size:13px;background:#f8fafc;font-family:inherit;color:#1a2332;transition:border .15s}
.fr input:focus,.fg input:focus,.fg select:focus,.fg3 input:focus,.fg3 select:focus{border-color:#1B2A6B;outline:none;background:#fff;box-shadow:0 0 0 3px rgba(27,42,107,.08)}
input[type=number]{-moz-appearance:textfield}
input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none}

/* BUTTONS */
.btn{padding:7px 13px;border-radius:7px;font-size:13px;cursor:pointer;border:1.5px solid #e2e8f0;background:#fff;color:#1a2332;font-family:inherit;font-weight:500;display:inline-flex;align-items:center;gap:5px;transition:all .12s}
.btn:hover{background:#f1f5f9}
.bp{background:#1B2A6B;color:#fff;border-color:#14206a}.bp:hover{background:#14206a}
.bgold{background:#C9A84C;color:#fff;border-color:#b8892e}.bgold:hover{background:#b8892e}
.ba{background:#fef3c7;color:#92400e;border-color:#fbbf24}
.bd{background:#fee2e2;color:#991b1b;border-color:#fca5a5}
.bs{padding:5px 10px;font-size:12px}
.flex{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.fb{display:flex;align-items:center;justify-content:space-between}

/* BADGES */
.badge{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:600}
.b-tetap{background:#d1fae5;color:#065f46}
.b-kontrak{background:#fef3c7;color:#92400e}
.b-percobaan{background:#fee2e2;color:#991b1b}
.b-approved{background:#d1fae5;color:#065f46}
.b-draft{background:#fef3c7;color:#92400e}
.b-finalized{background:#e0e7ff;color:#3730a3}

/* ALERTS */
.alert{padding:9px 13px;border-radius:8px;font-size:13px;margin-bottom:12px;display:flex;align-items:center;gap:8px}
.as{background:#f0fdf4;color:#14532d;border:1px solid #bbf7d0}
.ae{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
.aw{background:#fffbeb;color:#78350f;border:1px solid #fde68a}
.ai{background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe}

/* TABS */
.tabs{display:flex;border-bottom:2px solid #e2e8f0;margin-bottom:1.1rem}
.tab{padding:8px 18px;font-size:13px;cursor:pointer;color:#64748b;border-bottom:3px solid transparent;margin-bottom:-2px;font-weight:500;transition:all .12s}
.tab:hover{color:#1B2A6B}
.tab.active{color:#1B2A6B;border-bottom-color:#C9A84C;font-weight:700}
.tc{display:none}.tc.active{display:block}

/* TAGS */
.tag{display:inline-flex;align-items:center;gap:4px;background:#EEF2FF;color:#1B2A6B;border:1px solid #c7d2fe;padding:3px 10px;border-radius:20px;font-size:12px;margin:2px}
.tag-del{cursor:pointer;color:#94a3b8;font-size:15px;line-height:1;text-decoration:none;font-weight:700}
.tag-del:hover{color:#991b1b}
.tag-row{display:flex;gap:6px;margin-top:6px}
.tag-row input{flex:1;padding:5px 9px;border:1.5px solid #e2e8f0;border-radius:6px;font-size:13px}

/* HELPERS */
.g{color:#0a5c45}.r{color:#991b1b}.navy{color:#1B2A6B}
.muted{color:#94a3b8}.sm{font-size:12px}.bold{font-weight:700}
.divider{height:1px;background:#e2e8f0;margin:.75rem 0}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.mb1{margin-bottom:1rem}

/* LOGIN */
.login-page{display:flex;align-items:center;justify-content:center;min-height:100vh;background:linear-gradient(135deg,#0d1940 0%,#1B2A6B 55%,#2d44a8 100%);position:relative}
.login-card{background:#fff;border-radius:20px;padding:2.5rem 2rem;width:380px;box-shadow:0 20px 60px rgba(0,0,0,.35);position:relative;z-index:1}
.login-logo{text-align:center;margin-bottom:2rem;padding-bottom:1.5rem;border-bottom:1px solid #f1f5f9}
.login-logo img{height:55px;width:auto}
.login-logo p{font-size:12px;color:#94a3b8;margin-top:6px}
.login-card label{display:block;font-size:12px;font-weight:700;color:#64748b;margin:14px 0 4px;text-transform:uppercase;letter-spacing:.04em}
.login-card input{width:100%;padding:10px 13px;border:1.5px solid #e2e8f0;border-radius:8px;font-size:14px;background:#f8fafc;font-family:inherit;color:#1a2332}
.login-card input:focus{border-color:#1B2A6B;outline:none;background:#fff;box-shadow:0 0 0 3px rgba(27,42,107,.1)}
.btn-login{width:100%;margin-top:20px;padding:12px;background:linear-gradient(135deg,#1B2A6B,#2d44a8);color:#fff;border:none;border-radius:8px;font-size:15px;font-weight:700;cursor:pointer;font-family:inherit}
.btn-login:hover{opacity:.9}

/* INSTALL */
.install-wrap{min-height:100vh;background:linear-gradient(135deg,#0d1940,#1B2A6B);display:flex;align-items:center;justify-content:center;padding:2rem}
.install-card{background:#fff;border-radius:16px;padding:2.5rem;max-width:640px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.install-logo{text-align:center;margin-bottom:2rem;padding-bottom:1.5rem;border-bottom:1px solid #f1f5f9}
.install-logo img{height:55px;width:auto}
.step-row{display:flex;gap:12px;margin-bottom:.85rem;padding:.75rem 1rem;background:#f8faff;border-radius:8px;border-left:3px solid #C9A84C}
.step-num{width:26px;height:26px;border-radius:50%;background:#1B2A6B;color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px}
.log-box{background:#0d1117;border-radius:8px;padding:1rem;margin-top:1rem;font-family:monospace;font-size:12.5px;line-height:1.9}
.log-ok{color:#58d68d}.log-warn{color:#f5d98a}.log-err{color:#ff6b6b}
code{background:#f1f5f9;padding:2px 7px;border-radius:4px;font-size:12px;color:#1B2A6B;font-family:monospace}
.btn-install{width:100%;margin-top:1.5rem;padding:13px;background:linear-gradient(135deg,#1B2A6B,#2d44a8);color:#fff;border:none;border-radius:8px;font-size:15px;font-weight:700;cursor:pointer;font-family:inherit}
.btn-install:hover{opacity:.9}

/* SLIP PRINT */
.slip-page{background:#fff;padding:.55cm .75cm;font-size:10.5px;max-width:21cm;margin:0 auto 1.5rem;border:1px solid #e2e8f0;border-radius:8px}
.slip-kop{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #1B2A6B;padding-bottom:.35cm;margin-bottom:.35cm}
.slip-kop-logo img{height:30px;width:auto}
.slip-kop-text{text-align:center;flex:1;padding:0 .5cm}
.slip-kop-text h1{font-size:11px;font-weight:800;color:#1B2A6B;text-transform:uppercase;letter-spacing:.04em}
.slip-kop-text p{font-size:9.5px;color:#64748b;margin-top:1px}
.slip-kop-per{text-align:right;font-size:10px;color:#64748b;min-width:90px}
.slip-kop-per strong{display:block;font-size:11px;color:#1B2A6B;font-weight:700}
.slip-2c{display:grid;grid-template-columns:1fr 1fr;gap:.4cm}
.srow{display:flex;justify-content:space-between;padding:1.5px 0;font-size:10px;border-bottom:1px dotted #e2e8f0}
.srow:last-child{border:none}
.stitle{font-size:9px;font-weight:800;color:#1B2A6B;text-transform:uppercase;letter-spacing:.06em;border-bottom:1.5px solid #C9A84C;padding-bottom:2px;margin:6px 0 3px}
.stotal{background:#EEF2FF;padding:3px 7px;border-radius:4px;display:flex;justify-content:space-between;font-weight:700;font-size:10.5px;margin-top:3px;color:#1B2A6B}
.sthp{background:linear-gradient(135deg,#1B2A6B,#2d44a8);color:#fff;padding:7px 12px;border-radius:7px;display:flex;justify-content:space-between;align-items:center;margin-top:7px}
.sthp-l{font-size:11px;font-weight:700}
.sthp-v{font-size:17px;font-weight:800}
.sconf{font-size:8.5px;color:#94a3b8;font-style:italic;margin-top:4px;line-height:1.5}
.si{display:flex;font-size:10px;padding:1.5px 0}
.si-label{color:#64748b;min-width:120px;flex-shrink:0}
.kpi-tbl{width:100%;border-collapse:collapse;font-size:9.5px;margin-top:3px}
.kpi-tbl th,.kpi-tbl td{border:1px solid #e2e8f0;padding:2px 5px;text-align:center}
.kpi-tbl th{background:#EEF2FF;color:#1B2A6B;font-weight:700}
.slip-sign{display:flex;justify-content:flex-end;margin-top:.4cm}
.slip-sign-box{text-align:center;font-size:10px;color:#64748b}
.slip-sign-line{border-bottom:1px solid #1a2332;width:120px;margin:.7cm auto .2cm}

/* RESUME */
.resume-hdr{background:linear-gradient(135deg,#1B2A6B,#2d44a8);color:#fff;padding:1.4rem 1.5rem;border-radius:12px;margin-bottom:1.25rem;display:flex;align-items:center;gap:1.5rem}
.resume-hdr img{height:40px;filter:brightness(0) invert(1);opacity:.9}
.resume-hdr-text h2{font-size:17px;font-weight:800;margin-bottom:3px}
.resume-hdr-text p{font-size:12px;opacity:.8}

@media print{
  .no-print,.topbar,.sidebar{display:none!important}
  .main{margin-left:0!important}
  .content{padding:0!important}
  body{background:#fff!important}
  .slip-page{page-break-after:always;box-shadow:none!important;border:1px solid #ccc!important}
  .slip-page:last-child{page-break-after:avoid}
  @page{size:A4;margin:1cm}
}

@media(max-width:768px){
  .fg,.fg3,.grid2{grid-template-columns:1fr}
  .sidebar{width:195px}.main{margin-left:195px}
  .metrics{grid-template-columns:1fr 1fr}
  .slip-2c{grid-template-columns:1fr}
  .slip-kop{flex-direction:column;text-align:center;gap:.2cm}
}
@media(max-width:640px){.sidebar{display:none}.main{margin-left:0}}

/* Utilities */
.hidden{display:none!important}
.mb{margin-bottom:1.25rem}
.nav-icon{font-size:15px;min-width:20px;text-align:center}

/* Slip page for new design */
.slip-page{background:#fff;padding:.5cm .65cm;font-size:10px;max-width:19cm;margin:0 auto 1.5rem;border:1px solid #e2e8f0;border-radius:6px;page-break-after:always}
.slip-page:last-child{page-break-after:avoid}
.si{display:flex;padding:1px 0;font-size:9.5px}
.si-label{color:#64748b;min-width:115px;flex-shrink:0;font-size:9px}
.srow{display:flex;justify-content:space-between;padding:1px 0;font-size:9.5px;border-bottom:1px dotted #e2e8f0}
.srow:last-child{border:none}
.stitle{font-size:8.5px;font-weight:800;color:#1B2A6B;text-transform:uppercase;letter-spacing:.06em;border-bottom:1.5px solid #C9A84C;padding-bottom:2px;margin:5px 0 3px}
.stotal{background:#EEF2FF;padding:3px 6px;border-radius:4px;display:flex;justify-content:space-between;font-weight:700;font-size:10px;margin-top:3px;color:#1B2A6B}
.sthp{background:linear-gradient(135deg,#1B2A6B,#2d44a8);color:#fff;padding:6px 12px;border-radius:7px;display:flex;justify-content:space-between;align-items:center;margin-top:6px}
.sthp-l{font-size:10px;font-weight:700}
.sthp-v{font-size:16px;font-weight:800}
.sconf{font-size:7.5px;color:#94a3b8;font-style:italic;margin-top:4px;line-height:1.6}
.kpi-tbl{width:100%;border-collapse:collapse;font-size:8.5px;margin-top:3px}
.kpi-tbl th,.kpi-tbl td{border:1px solid #e2e8f0;padding:2px 4px;text-align:center}
.kpi-tbl th{background:#EEF2FF;color:#1B2A6B;font-weight:700}
.slip-2c{display:grid;grid-template-columns:1fr 1fr;gap:.4cm;margin-bottom:.2cm}
.slip-kop{display:flex;align-items:center;justify-content:space-between;border-bottom:2.5px solid #1B2A6B;padding-bottom:.3cm;margin-bottom:.3cm}
.slip-kop-logo img{height:38px;width:auto}
.slip-kop-text{text-align:center;flex:1;padding:0 .4cm}
.slip-kop-text h1{font-size:10px;font-weight:800;color:#1B2A6B;text-transform:uppercase;letter-spacing:.03em}
.slip-kop-text p{font-size:9px;color:#CC0000;font-weight:700;margin-top:2px}
.slip-kop-per{text-align:right;font-size:9px;color:#64748b;min-width:80px}
.slip-kop-per strong{display:block;font-size:10px;color:#1B2A6B;font-weight:700}

@media print{
  .no-print,.topbar,.sidebar,.tabs{display:none!important}
  .main{margin-left:0!important}
  .content{padding:0!important}
  body{background:#fff!important}
  #tab-dashboard,#tab-rincian{display:none!important}
  #tab-slip{display:block!important}
  .slip-page{margin:0;border:none;border-radius:0;box-shadow:none}
  @page{size:A4 portrait;margin:1cm}
}
