/* Halaman Panel Manager */

/* Login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.login-card .b.pri { justify-content: center; padding: 8px 12px; font-size: 13px; }

/* Header */
.top { background: var(--card); border-bottom: 1px solid var(--bd); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.top h1 { font-size: 17px; }
main.w { padding-top: 16px; }

/* Tab proyek & sub-tab */
.tabs .add { color: var(--wip); }
.vtabs { display: flex; gap: 6px; margin: 0 0 14px; flex-wrap: wrap; }
.vtabs button { font: inherit; font-size: 12px; font-weight: 600; border: 1px solid var(--bd); background: var(--card); color: var(--mu); border-radius: 99px; padding: 4px 14px; cursor: pointer; }
.vtabs button.on { background: var(--tx); color: var(--bg); border-color: var(--tx); }

/* Toolbar */
.tb { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.tb input[type="search"] { min-width: 220px; flex: 1; max-width: 340px; }
.tb select { max-width: 190px; }
.stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--mu); margin: 0 0 10px; }
.stats b { color: var(--tx); }

/* Tabel task */
.tw { overflow-x: auto; background: var(--card); border: 1px solid var(--bd); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th, table.t td { padding: 7px 10px; border-bottom: 1px solid var(--bd); text-align: left; vertical-align: top; }
table.t th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--mu); font-weight: 600; background: var(--card); position: sticky; top: 0; white-space: nowrap; }
table.t th[data-sort] { cursor: pointer; user-select: none; }
table.t th[data-sort]:hover { color: var(--tx); }
table.t th .ar { font-size: 10px; margin-left: 3px; }
table.t tbody tr { cursor: pointer; }
table.t tbody tr:hover { background: var(--hover); }
table.t tbody tr.sel { background: color-mix(in srgb, var(--wip) 10%, transparent); }
table.t tr:last-child td { border-bottom: 0; }
table.t td.cb, table.t th.cb { width: 32px; cursor: default; }
td .tn { font-weight: 500; }
td .rm { font-size: 11px; color: var(--mu); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 460px; }
td.nw { white-space: nowrap; }
td.late { color: var(--bad); font-weight: 600; }
.pg { display: flex; align-items: center; gap: 6px; min-width: 90px; }
.pg .tr { flex: 1; height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.pg .tr i { display: block; height: 100%; background: var(--wip); }
.pg span { font-size: 11px; color: var(--mu); width: 32px; text-align: right; }
td.act { white-space: nowrap; text-align: right; }

/* Form grid di modal */
.fg { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px 12px; }
.fg .s2 { grid-column: span 2; } .fg .s3 { grid-column: span 3; } .fg .s4 { grid-column: span 4; } .fg .s6 { grid-column: span 6; }
@media (max-width: 560px) { .fg .s2, .fg .s3, .fg .s4 { grid-column: span 6; } }
.rng { display: flex; align-items: center; gap: 8px; }
.rng input[type="range"] { flex: 1; padding: 0; border: 0; background: none; }
.rng input[type="number"] { width: 70px; }

/* Halaman info & data */
.stack { display: flex; flex-direction: column; gap: 12px; }
.frm { display: grid; gap: 12px; }
.frm textarea { min-height: 80px; }
.radios { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.radios label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 40%, var(--bd)); }
table.bk { width: 100%; border-collapse: collapse; font-size: 12px; }
table.bk td, table.bk th { padding: 6px 8px; border-bottom: 1px solid var(--bd); text-align: left; }
table.bk th { color: var(--mu); font-weight: 600; }
.scroll { max-height: 360px; overflow: auto; }

/* Import & format Excel */
a.att { font-size: 11px; font-weight: 400; white-space: nowrap; }
table.bk input { width: 100%; min-width: 120px; padding: 4px 7px; }
table.bk td.nw { white-space: nowrap; }

.login-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Riwayat perubahan */
#actQ { min-width: 220px; font-size: 12px; padding: 4px 8px; }
table.act-log td { vertical-align: top; }
table.act-log td:last-child { word-break: break-word; }

/* ---------- Task: tampilan spreadsheet ---------- */
.stats .sp { flex: 1; }
.stats .hintk { font-size: 11px; }
.xlw { max-height: calc(100vh - 250px); min-height: 220px; overflow: auto; outline: none; border-radius: 6px; }
.xlw:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--wip) 45%, transparent); }
table.xl { table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; width: max-content; user-select: none; }
table.xl th, table.xl td { height: 28px; padding: 0 8px; border-right: 1px solid var(--bd); border-bottom: 1px solid var(--bd); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; vertical-align: middle; }
table.xl thead th { position: sticky; background: var(--field); color: var(--mu); font-size: 11px; font-weight: 600; z-index: 3; }
table.xl thead tr.ltr th { top: 0; height: 18px; text-align: center; font-weight: 500; letter-spacing: 0; text-transform: none; }
table.xl thead tr.nm th { top: 18px; text-transform: none; letter-spacing: 0; cursor: pointer; }
table.xl thead tr.nm th:hover { color: var(--tx); }
table.xl thead tr.nm th.srt { color: var(--wip); }
table.xl th .ar { font-size: 9px; margin-left: 4px; }
table.xl th.rn { position: sticky; left: 0; z-index: 2; width: 52px; background: var(--field); color: var(--mu); text-align: center; font-weight: 500; padding: 0; cursor: pointer; }
table.xl thead th.rn { z-index: 4; }
table.xl th.rn .no { display: inline-block; }
table.xl th.rn .rf { display: none; position: absolute; right: 2px; top: 3px; height: 22px; width: 22px; padding: 0; font-size: 12px; line-height: 1; border: 1px solid var(--bd); border-radius: 5px; background: var(--card); color: var(--mu); cursor: pointer; }
table.xl tr:hover th.rn .rf { display: block; }
table.xl tr:hover th.rn .no { margin-right: 14px; }
table.xl th.rn .rf:hover { color: var(--wip); }
table.xl th.corner span { opacity: .45; font-size: 13px; }
table.xl th.corner span.on { opacity: 1; color: var(--wip); }
table.xl tbody td { cursor: cell; background: var(--card); }
table.xl tbody tr:hover td { background: var(--hover); }
table.xl tbody tr.sel td { background: color-mix(in srgb, var(--wip) 10%, var(--card)); }
table.xl tbody tr.sel th.rn { background: color-mix(in srgb, var(--wip) 22%, var(--field)); color: var(--wip); }
table.xl td.cs { outline: 2px solid var(--wip); outline-offset: -2px; position: relative; z-index: 1; }
table.xl td.cs { scroll-margin: 52px 60px 12px 60px; }
table.xl td.editing { padding: 0; overflow: visible; }
table.xl td .ce { width: 100%; height: 100%; min-height: 26px; box-sizing: border-box; border: 0; border-radius: 0; outline: 2px solid var(--wip); outline-offset: -2px; padding: 0 8px; font: inherit; background: var(--card); color: var(--tx); }
table.xl td.late { color: var(--bad); font-weight: 600; }
table.xl td.k-pct { display: table-cell; }
table.xl .pbar { display: inline-block; vertical-align: middle; width: 34px; height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; margin-right: 6px; }
table.xl .pbar i { display: block; height: 100%; background: var(--wip); }
table.xl .pn { font-size: 12px; color: var(--mu); vertical-align: middle; }
table.xl td.k-task { font-weight: 500; }
table.xl tr.ghost td, table.xl tr.ghost th.rn { color: var(--mu); }
table.xl tr.ghost .hintx { font-weight: 400; font-style: italic; opacity: .8; }
table.xl tr.ghost th.rn { cursor: default; }
@media (max-width: 700px) { .xlw { max-height: calc(100vh - 200px); } }
table.xl tbody td.mg, table.xl tbody tr:hover td.mg, table.xl tbody tr.sel td.mg { background: var(--card); vertical-align: middle; font-weight: 500; }

table.xl .hc { display: none; }
/* Tab sheet di bawah tabel, seperti Excel */
.stabs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin: 6px 0 0; padding: 4px 4px 0; border-top: 0; }
.stabs .sp { flex: 1; }
.stab { font: inherit; font-size: 12px; padding: 5px 14px; border: 1px solid var(--bd); border-top: 0; border-radius: 0 0 8px 8px; background: var(--field); color: var(--mu); cursor: pointer; }
.stab:hover { color: var(--tx); background: var(--hover); }
.stab.on { background: var(--card); color: var(--tx); font-weight: 600; box-shadow: inset 0 -2px 0 var(--wip); }
.stab.add { padding: 5px 11px; font-weight: 600; }
