/* ── Reset & base ──────────────────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
:root{
  --bg:#04050a;--bg2:#0d0f18;--bg3:#141622;--bg4:#1a1d2a;
  --border:rgba(255,255,255,.08);--border2:rgba(255,255,255,.04);
  --gold:#d4a853;--gold2:rgba(212,168,83,.15);--gold3:rgba(212,168,83,.08);
  --text:#e8e9f0;--muted:rgba(232,233,240,.45);
  --green:#3ec97e;--green2:rgba(62,201,126,.14);
  --red:#f07070;--red2:rgba(240,112,112,.13);
  --amber:#f0b040;--amber2:rgba(240,176,64,.14);
  --radius:12px;--shadow:0 4px 32px rgba(0,0,0,.6);
  font-family:'Outfit',system-ui,sans-serif;
}
html,body{background:var(--bg);color:var(--text);min-height:100vh;}
#root{min-height:100vh;}
button{font-family:inherit;cursor:pointer;border:none;background:none;}
input,select,textarea{font-family:inherit;}
a{color:var(--gold);text-decoration:none;}
::-webkit-scrollbar{width:5px;height:5px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.1);border-radius:99px;}

/* ── Topbar ────────────────────────────────────────────────────────────────── */
.topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:12px;padding:0 20px;height:54px;background:rgba(4,5,10,.94);backdrop-filter:blur(14px);border-bottom:1px solid var(--border);}
.nav{display:flex;gap:2px;flex:1;overflow-x:auto;}
.nav-btn{padding:6px 12px;border-radius:8px;font-size:13px;font-weight:500;color:var(--muted);white-space:nowrap;transition:all .15s;}
.nav-btn:hover{background:var(--bg3);color:var(--text);}
.nav-btn.active{background:var(--gold2);color:var(--gold);}
.user-menu{display:flex;align-items:center;gap:8px;margin-left:auto;flex-shrink:0;}
.user-name{font-size:13px;color:var(--muted);}

/* ── Brand ─────────────────────────────────────────────────────────────────── */
.brand{display:flex;align-items:center;gap:10px;}
.brand-badge{width:38px;height:38px;border-radius:10px;background:var(--gold2);color:var(--gold);font-weight:700;font-size:12px;display:grid;place-items:center;flex-shrink:0;box-shadow:0 0 14px rgba(212,168,83,.18);}
.brand-badge.sm{width:30px;height:30px;border-radius:8px;font-size:9px;}
.brand-sm{gap:8px;}
.brand-sm strong{font-size:14px;}

/* ── Main ──────────────────────────────────────────────────────────────────── */
.main{max-width:1120px;margin:0 auto;padding:24px 20px;}

/* ── Login / Auth ──────────────────────────────────────────────────────────── */
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:20px;}
.login-card{width:100%;max-width:420px;padding:36px;background:var(--bg2);border:1px solid var(--border);border-radius:20px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:16px;}
.login-card h1{font-size:22px;font-weight:600;}

/* ── Form fields ───────────────────────────────────────────────────────────── */
.field{display:flex;flex-direction:column;gap:6px;}
.field>span,label>span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.field input,.field select,.field textarea,
.form-input{background:rgba(255,255,255,.04);border:1px solid var(--border);border-radius:10px;padding:10px 14px;color:var(--text);font-size:14px;outline:none;transition:border .15s;width:100%;}
.field input:focus,.field select:focus,.form-input:focus{border-color:rgba(212,168,83,.4);}
.field select option{background:var(--bg2);}
.field textarea{resize:vertical;}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary{background:var(--gold);color:#04050a;font-weight:600;font-size:15px;padding:12px 20px;border-radius:10px;width:100%;transition:opacity .15s;}
.btn-primary:disabled{opacity:.5;cursor:default;}
.btn-primary:hover:not(:disabled){opacity:.88;}
.btn-secondary{background:var(--bg3);color:var(--text);font-weight:500;font-size:14px;padding:8px 16px;border-radius:8px;border:1px solid var(--border);transition:background .15s;}
.btn-secondary:hover{background:rgba(255,255,255,.08);}
.btn-danger{background:var(--red2);color:var(--red);font-weight:500;font-size:13px;padding:7px 14px;border-radius:8px;border:1px solid rgba(240,112,112,.2);}
.btn-danger:hover{background:rgba(240,112,112,.22);}
.btn-ghost{background:transparent;color:var(--muted);font-size:13px;padding:6px 10px;border-radius:8px;}
.btn-ghost:hover{background:var(--bg3);color:var(--text);}
.btn-icon{background:var(--bg3);border:1px solid var(--border);border-radius:8px;padding:6px 10px;font-size:13px;color:var(--muted);}
.btn-icon:hover{color:var(--text);background:rgba(255,255,255,.08);}
.btn-sm{font-size:12px!important;padding:5px 10px!important;}
.btn-clockin{background:var(--green);color:#04050a;font-weight:700;font-size:17px;padding:16px 48px;border-radius:14px;letter-spacing:.4px;transition:opacity .15s;border:none;}
.btn-clockin:hover{opacity:.88;}
.btn-clockout{background:var(--red2);color:var(--red);font-weight:600;font-size:15px;padding:12px 32px;border-radius:12px;border:1px solid rgba(240,112,112,.25);}
.btn-copy{background:var(--gold2);color:var(--gold);font-weight:600;font-size:14px;padding:10px 24px;border-radius:10px;border:1px solid rgba(212,168,83,.3);transition:opacity .15s;width:100%;}
.btn-copy:hover{opacity:.85;}

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;padding:3px 8px;border-radius:99px;}
.badge.admin{background:var(--gold2);color:var(--gold);}
.badge.staff{background:rgba(255,255,255,.07);color:var(--muted);}
.badge.on-time{background:var(--green2);color:var(--green);}
.badge.late{background:var(--amber2);color:var(--amber);}
.badge.absent{background:var(--red2);color:var(--red);}

/* ── Layout helpers ────────────────────────────────────────────────────────── */
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;gap:12px;flex-wrap:wrap;}
.section-head h2{font-size:18px;font-weight:600;}
.chip-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.panel{background:var(--bg2);border:1px solid var(--border);border-radius:14px;padding:20px;}
.panel-title{font-size:14px;font-weight:600;margin-bottom:14px;color:var(--text);}
.mb-12{margin-bottom:12px!important;}
.mb-20{margin-bottom:20px!important;}
.muted{color:var(--muted)!important;}
.small{font-size:12px!important;}
.text-center{text-align:center;}
.ok{color:var(--green);}
.err{color:var(--red);font-size:13px;}
.flex-col{display:flex;flex-direction:column;}
.gap-12{gap:12px;}
.w-full{width:100%;}
.empty-state{padding:48px 20px;text-align:center;color:var(--muted);}
.empty-state .emoji{font-size:36px;margin-bottom:10px;}
.spinner{display:inline-block;width:20px;height:20px;border:2px solid var(--border);border-top-color:var(--gold);border-radius:50%;animation:spin .6s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}
.divider{border:none;border-top:1px solid var(--border);margin:16px 0;}
code{font-family:'IBM Plex Mono',monospace;font-size:12px;background:rgba(255,255,255,.07);padding:2px 6px;border-radius:4px;color:var(--gold);}

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-wrap{overflow-x:auto;border-radius:12px;border:1px solid var(--border);}
table{width:100%;border-collapse:collapse;font-size:13px;}
thead{background:rgba(255,255,255,.04);}
th{padding:10px 14px;text-align:left;font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:600;}
td{padding:10px 14px;border-top:1px solid var(--border);vertical-align:middle;}
tr:hover td{background:rgba(255,255,255,.018);}

/* ── Attendance page ───────────────────────────────────────────────────────── */
.att-page{display:flex;flex-direction:column;gap:20px;max-width:600px;margin:0 auto;}
.att-clock-panel{background:var(--bg2);border:1px solid var(--border);border-radius:16px;padding:28px;text-align:center;}
.att-date{font-size:13px;color:var(--muted);margin-bottom:4px;}
.att-time{font-size:52px;font-weight:200;letter-spacing:4px;line-height:1.1;font-family:'IBM Plex Mono',monospace;}
.att-shift-name{font-size:14px;color:var(--gold);margin-top:8px;}
.shift-info{display:flex;align-items:center;gap:10px;margin-top:16px;font-size:12px;color:var(--muted);}
.shift-bar-wrap{flex:1;height:6px;background:rgba(255,255,255,.08);border-radius:99px;overflow:hidden;}
.shift-bar{height:100%;border-radius:99px;background:var(--gold);transition:width .5s ease;}
.att-status-panel{background:var(--bg2);border:1px solid var(--border);border-radius:16px;padding:24px;display:flex;flex-direction:column;gap:16px;align-items:center;}
.status-row{display:flex;gap:24px;flex-wrap:wrap;justify-content:center;width:100%;}
.status-item{display:flex;flex-direction:column;align-items:center;gap:4px;}
.status-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);}
.status-value{font-size:22px;font-weight:600;font-family:'IBM Plex Mono',monospace;}
.att-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;width:100%;}
.att-pre-clock{text-align:center;color:var(--muted);font-size:14px;line-height:1.6;}

/* Attendance summary stats */
.att-summary{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:4px;}
.att-stat{background:var(--bg3);border:1px solid var(--border);border-radius:12px;padding:12px 20px;flex:1;min-width:100px;text-align:center;}
.att-stat-num{display:block;font-size:26px;font-weight:700;line-height:1.1;}
.att-stat-lbl{display:block;font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;margin-top:2px;}

/* ── OTP Request page ──────────────────────────────────────────────────────── */
.otp-req-layout{display:grid;grid-template-columns:1fr 1fr;gap:20px;}
@media(max-width:700px){.otp-req-layout{grid-template-columns:1fr;}}
.cat-header{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--gold);margin-bottom:6px;padding:0 2px;}
.otp-pick-btn{display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 14px;background:var(--bg3);border:1px solid var(--border);border-radius:10px;margin-bottom:6px;transition:border-color .15s;text-align:left;}
.otp-pick-btn:hover{border-color:rgba(212,168,83,.3);background:var(--bg4);}
.otp-pick-name{font-size:14px;font-weight:600;color:var(--text);}
.otp-pick-issuer{font-size:12px;color:var(--muted);}

/* Request cards */
.req-card{background:var(--bg3);border:1px solid var(--border);border-radius:12px;padding:14px 16px;margin-bottom:10px;display:flex;flex-direction:column;gap:8px;}
.req-card.approved{border-color:rgba(62,201,126,.25);}
.req-card.rejected,.req-card.expired{border-color:rgba(240,112,112,.2);}
.req-top{display:flex;align-items:baseline;gap:8px;}
.req-name{font-size:15px;font-weight:600;}
.req-cat{font-size:11px;color:var(--muted);background:var(--bg2);border-radius:4px;padding:2px 6px;}
.req-time{font-size:11px;color:var(--muted);}
.req-status{font-size:13px;font-weight:500;}
.pending-badge{color:var(--amber);}
.rejected-badge{color:var(--red);}
.req-code-wrap{background:var(--bg2);border-radius:10px;padding:12px;text-align:center;}
.req-code{font-family:'IBM Plex Mono',monospace;font-size:34px;font-weight:700;letter-spacing:6px;color:var(--green);}
.req-exp{font-size:11px;color:var(--muted);margin-top:4px;}
.req-retry{background:transparent;color:var(--muted);font-size:12px;border:1px solid var(--border);border-radius:8px;padding:5px 12px;transition:all .15s;}
.req-retry:hover{color:var(--text);background:var(--bg3);}

/* ── Admin approve buttons ─────────────────────────────────────────────────── */
.btn-approve{background:var(--green2);color:var(--green);font-weight:600;font-size:13px;padding:7px 16px;border-radius:8px;border:1px solid rgba(62,201,126,.3);transition:opacity .15s;}
.btn-approve:hover{opacity:.82;}
.btn-approve:disabled{opacity:.5;cursor:default;}
.btn-reject{background:var(--red2);color:var(--red);font-weight:500;font-size:13px;padding:7px 12px;border-radius:8px;border:1px solid rgba(240,112,112,.2);}

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.72);display:grid;place-items:center;z-index:100;padding:16px;}
.modal{background:var(--bg2);border:1px solid var(--border);border-radius:20px;padding:28px;max-width:520px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:var(--shadow);}
.modal h2{font-size:18px;font-weight:600;margin-bottom:4px;}
.modal .sub{font-size:13px;color:var(--muted);margin-bottom:16px;}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:4px;}

/* ── QR scanner ────────────────────────────────────────────────────────────── */
#qr-preview-wrap{position:relative;border-radius:12px;overflow:hidden;background:#000;aspect-ratio:1;max-width:280px;margin:0 auto;border:1px solid var(--border);}
#qr-preview{width:100%;height:100%;object-fit:cover;display:block;}
.qr-crosshair{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;}
.qr-crosshair::before{content:'';position:absolute;width:50%;height:50%;top:50%;left:50%;transform:translate(-50%,-50%);border:2px solid var(--gold);border-radius:6px;opacity:.7;}
.qr-hint{font-size:12px;color:var(--muted);text-align:center;margin-top:8px;}

/* ── Toast ─────────────────────────────────────────────────────────────────── */
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--bg3);border:1px solid var(--border);border-radius:10px;padding:10px 22px;font-size:14px;box-shadow:var(--shadow);z-index:200;white-space:nowrap;animation:fadeUp .2s ease;}
@keyframes fadeUp{from{opacity:0;transform:translateX(-50%) translateY(8px);}}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media(max-width:600px){
  .topbar{padding:0 12px;}
  .main{padding:16px 12px;}
  .login-card{padding:24px 18px;}
  .att-time{font-size:36px;}
  .req-code{font-size:26px;letter-spacing:3px;}
  .nav-btn{font-size:12px;padding:5px 8px;}
}

/* ── OTP Live Cell (admin dashboard) ──────────────────────────────────────── */
.otp-live-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}
.otp-live-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--green);
  line-height: 1;
}
.otp-live-code.expiring {
  color: var(--red);
  animation: codeblink .5s step-end infinite;
}
@keyframes codeblink { 50% { opacity: .35; } }

.otp-live-timer {
  display: flex;
  align-items: center;
  gap: 6px;
}
.otp-live-sec {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  min-width: 28px;
  font-family: 'IBM Plex Mono', monospace;
}
.otp-live-sec.expiring { color: var(--red); }
.otp-live-warn {
  font-size: 11px;
  color: var(--red);
  font-weight: 600;
  animation: codeblink .6s step-end infinite;
}

/* ── OTP Search (staff request page) ──────────────────────────────────────── */
.otp-search-wrap {
  margin-bottom: 14px;
}
.otp-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.otp-search-icon {
  position: absolute;
  left: 12px;
  font-size: 15px;
  pointer-events: none;
  user-select: none;
}
.otp-search-input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 36px 10px 38px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border .15s;
  font-family: inherit;
}
.otp-search-input:focus {
  border-color: rgba(212,168,83,.4);
  background: rgba(255,255,255,.07);
}
.otp-search-input::placeholder { color: var(--muted); }
.otp-search-clear {
  position: absolute;
  right: 8px;
  background: rgba(255,255,255,.08);
  border: none;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
}
.otp-search-clear:hover { background: rgba(255,255,255,.14); color: var(--text); }

/* OTP pick button — with staff name */
.otp-pick-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 6px;
  transition: border-color .15s, background .15s;
  text-align: left;
  gap: 8px;
}
.otp-pick-btn:hover {
  border-color: rgba(212,168,83,.35);
  background: var(--bg4);
}
.otp-pick-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.otp-pick-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.otp-pick-staff {
  font-size: 12px;
  color: var(--gold);
  opacity: .85;
}
.otp-pick-issuer {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

/* Highlight match in search results */
mark.otp-highlight {
  background: rgba(212,168,83,.28);
  color: var(--gold);
  border-radius: 2px;
  padding: 0 1px;
}

/* OTP group header */
.otp-group { margin-bottom: 16px; }

/* Staff name tag in admin table */
.otp-staff-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--gold);
  background: var(--gold3);
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 500;
}

/* ── QR Import Method Boxes ────────────────────────────────────────────────── */
.qr-method-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.qr-method-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.qr-paste-zone {
  min-height: 100px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  padding: 16px;
  outline: none;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.qr-paste-zone:focus,
.qr-paste-zone:hover {
  border-color: rgba(212,168,83,.5);
  background: rgba(212,168,83,.04);
  color: var(--text);
}

/* ── Password show/hide ────────────────────────────────────────────────────── */
.pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pass-wrap .form-input {
  padding-right: 44px;
}
.pass-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  color: var(--muted);
  user-select: none;
  transition: opacity .15s;
}
.pass-toggle:hover { opacity: .75; }

/* ── QR Modal Redesign ─────────────────────────────────────────────────────── */
.qr-modal-new { padding: 28px 24px 24px; }

.qr-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 10px;
}
.qr-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.qr-desc strong { color: var(--text); }

.qr-hint-bar {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.qr-hint-link {
  color: var(--gold);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}
.qr-hint-bar kbd {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text);
}

/* Button grid: 2 columns top, 1 bottom */
.qr-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qr-btn-grid button:last-child:nth-child(odd) {
  grid-column: 1 / -1; /* full width if odd */
}

.qr-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.qr-btn-primary {
  background: var(--gold);
  color: #04050a;
  font-weight: 600;
}
.qr-btn-primary:hover { opacity: .88; }

.qr-btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}
.qr-btn-secondary:hover { background: rgba(255,255,255,.08); }

/* Paste zone inside new modal */
.qr-paste-zone {
  min-height: 90px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 16px;
  outline: none;
  font-size: 13px;
  color: var(--muted);
  transition: border-color .15s, background .15s;
  text-align: center;
}
.qr-paste-zone:focus, .qr-paste-zone:hover {
  border-color: rgba(212,168,83,.5);
  background: rgba(212,168,83,.04);
  color: var(--text);
}

/* ── Dashboard layout (sidebar + main) ─────────────────────────────────────── */
.dash-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { .dash-layout { grid-template-columns: 1fr; } }

.dash-sidebar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.dash-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  position: sticky;
  top: 0;
  z-index: 1;
}
.dash-main { flex: 1; }
.dash-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}
.dash-empty-req {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ── Pending request card (sidebar) ─────────────────────────────────────────── */
.req-pending-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.req-pending-card:last-child { border-bottom: none; }
.req-pending-card:hover { background: rgba(255,255,255,.018); }

.rpc-staff {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.rpc-name { font-size: 14px; font-weight: 600; color: var(--text); }
.rpc-username { font-size: 11px; color: var(--muted); }

.rpc-otp {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rpc-otp-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}
.rpc-cat {
  font-size: 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--muted);
}
.rpc-time { font-size: 11px; color: var(--muted); }

.rpc-code-wrap {
  background: var(--bg3);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rpc-code-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}
.rpc-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--green);
}
.rpc-code.expiring {
  color: var(--red);
  animation: codeblink .5s step-end infinite;
}
.rpc-timer { flex-shrink: 0; }
.rpc-warn {
  font-size: 11px;
  color: var(--red);
  font-weight: 600;
  animation: codeblink .6s step-end infinite;
}
.rpc-actions {
  display: flex;
  gap: 8px;
}
.rpc-approve {
  flex: 1;
  background: var(--green2);
  color: var(--green);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(62,201,126,.3);
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}
.rpc-approve:hover { opacity: .82; }
.rpc-approve:disabled { opacity: .4; cursor: default; }
.rpc-reject {
  background: var(--red2);
  color: var(--red);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(240,112,112,.2);
  cursor: pointer;
  font-family: inherit;
}

/* ── OTP Admin Cards ─────────────────────────────────────────────────────────── */
.otp-cat-section { }
.otp-cat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--gold);
  margin-bottom: 10px;
  padding: 0 2px;
}
.otp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.otp-admin-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s;
}
.otp-admin-card:hover { border-color: rgba(212,168,83,.25); }
.otp-admin-card-top { flex: 1; }
.otp-admin-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.otp-admin-staff {
  font-size: 12px;
  color: var(--gold);
  opacity: .8;
}
.otp-admin-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Category chip */
.cat-chip {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--muted);
}

/* ── OTP Admin Card Live Code ──────────────────────────────────────────────── */
.otp-admin-live {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 2px 0;
}
.otp-admin-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--green);
  line-height: 1;
}
.otp-admin-arc-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.otp-admin-sec {
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--muted);
  min-width: 26px;
  text-align: right;
}

/* ── Attendance shift blocks (dashboard) ──────────────────────────────────── */
.att-shift-block {
  margin-bottom: 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.att-shift-label {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.att-subgroup { }
.att-subgroup-label {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}

/* ── Whitelist shift blocks ────────────────────────────────────────────────── */
.wl-shift-block { }
.wl-shift-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 8px 4px 6px;
}

/* ── OTP Request delete button ─────────────────────────────────────────────── */
.req-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.req-delete-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.req-delete-btn:hover { color: var(--red); background: var(--red2); }

/* ── Custom Confirm Modal ───────────────────────────────────────────────────── */
.confirm-modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 48px rgba(0,0,0,.7);
  animation: popIn .18s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn { from { transform:scale(.88); opacity:0; } }
.confirm-modal-icon { font-size: 36px; }
.confirm-modal-msg {
  font-size: 15px;
  text-align: center;
  line-height: 1.6;
  color: var(--text);
}
.confirm-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.confirm-modal-actions .btn-ghost { min-width: 80px; }
.confirm-modal-actions .btn-danger { min-width: 80px; justify-content: center; display: flex; }

/* ── OTP Table Live Cell ────────────────────────────────────────────────────── */
.otp-table-live {
  display: flex;
  align-items: center;
  gap: 8px;
}
.otp-table-live .otp-admin-code {
  font-size: 17px;
  letter-spacing: 3px;
  min-width: 80px;
}

/* ── Rekap quick buttons ────────────────────────────────────────────────────── */
.rec-del-btn {
  background: rgba(240,112,112,.1);
  color: var(--red);
  border: none;
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
  transition: background .15s;
}
.rec-del-btn:hover { background: rgba(240,112,112,.22); }

/* ── Category manage rows ───────────────────────────────────────────────────── */
.cat-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 8px;
}
.cat-manage-name { font-size: 14px; font-weight: 500; flex: 1; }
.cat-manage-actions { display: flex; gap: 5px; flex-shrink: 0; }

/* ── Attendance status table (dashboard) ──────────────────────────────────── */
.att-status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.att-status-table th {
  padding: 8px 14px;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 600;
  background: rgba(255,255,255,.03);
}
.att-status-table td {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

/* Row hijau — sudah clock in */
.att-row-hadir {
  background: rgba(62,201,126,.06);
  transition: background .15s;
}
.att-row-hadir:hover { background: rgba(62,201,126,.11); }
.att-row-hadir td:first-child {
  border-left: 3px solid var(--green);
}

/* Row merah — belum clock in */
.att-row-belum {
  background: rgba(240,112,112,.05);
  transition: background .15s;
}
.att-row-belum:hover { background: rgba(240,112,112,.10); }
.att-row-belum td:first-child {
  border-left: 3px solid var(--red);
}

/* OTP admin card — lebih lebar, nama tidak overflow */
.otp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.otp-admin-card {
  min-width: 0; /* supaya flex child tidak overflow */
}
.otp-admin-name {
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.4;
}
.otp-admin-staff {
  font-size: 11px;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* ── OTP Admin Card — lebar cukup, nama tidak keluar ──────────────────────── */
.otp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.otp-admin-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;        /* penting: cegah overflow di dalam grid */
  box-sizing: border-box;
  transition: border-color .15s;
}
.otp-admin-card:hover { border-color: rgba(212,168,83,.25); }

.otp-admin-card-top {
  min-width: 0;
  flex: 1;
}
.otp-admin-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;    /* nama panjang akan wrap ke baris baru */
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.45;
  margin-bottom: 3px;
}
.otp-admin-staff {
  font-size: 11px;
  color: var(--gold);
  opacity: .85;
  word-break: break-word;
  white-space: normal;
}
.otp-admin-live {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg3);
  border-radius: 8px;
  padding: 7px 10px;
  min-width: 0;
}
.otp-admin-live .otp-admin-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--green);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}
.otp-admin-sec {
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 26px;
  text-align: right;
}
.otp-admin-card-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ── Attendance pill status ─────────────────────────────────────────────────── */
.att-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.att-pill-hadir {
  background: rgba(62,201,126,.15);
  color: var(--green);
  border: 1px solid rgba(62,201,126,.3);
}
.att-pill-belum {
  background: rgba(240,112,112,.12);
  color: var(--red);
  border: 1px solid rgba(240,112,112,.25);
}

/* Pill belum daftar */
.att-pill-unreg {
  background: rgba(150,150,150,.12);
  color: var(--muted);
  border: 1px solid rgba(150,150,150,.2);
  font-size: 10px;
  padding: 2px 7px;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════════
   Change Password Modal — Premium Centered
══════════════════════════════════════════════════════════════════ */
.cp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.cp-modal {
  position: relative;
  background: linear-gradient(145deg, #12131a, #1a1b26);
  border: 1px solid rgba(212,168,83,.22);
  border-radius: 24px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04),
    0 24px 80px rgba(0,0,0,.7),
    0 0 60px rgba(212,168,83,.06);
  animation: cpPopIn .2s cubic-bezier(.34,1.56,.64,1);
}
@keyframes cpPopIn {
  from { transform: scale(.88) translateY(16px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

.cp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.cp-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

.cp-modal-icon {
  font-size: 36px;
  text-align: center;
  margin-bottom: 10px;
}
.cp-modal-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  margin-bottom: 4px;
}
.cp-modal-sub {
  font-size: 13px;
  text-align: center;
  color: var(--muted);
  margin-bottom: 28px;
}

.cp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.cp-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

.cp-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cp-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 44px 12px 16px;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.cp-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,168,83,.12);
}
.cp-input::placeholder { color: var(--muted); opacity: .6; }

.cp-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--muted);
  padding: 4px;
  line-height: 1;
  transition: color .15s;
}
.cp-eye:hover { color: var(--text); }

.cp-err {
  background: rgba(240,112,112,.1);
  border: 1px solid rgba(240,112,112,.3);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 16px;
}

.cp-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}
.cp-submit {
  width: auto !important;
  padding: 11px 28px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}
