/* Tata letak HRIS: shell HR (desktop), aplikasi karyawan (mobile), komponen khusus. Memakai token dari styles.css */

/* ========== login ========== */
.login { min-height: 100vh; display: grid; grid-template-rows: 1fr auto; }
.login-main { display: grid; place-items: center; padding: var(--space-5) var(--space-4); }
.login-card { width: 100%; max-width: 440px; display: grid; gap: var(--space-5); }
.login-card .logo { width: 170px; }
.login-band { background: var(--bark); color: var(--white); font-family: var(--font-label); letter-spacing: .06em; text-transform: uppercase; font-size: 15px; padding: 12px var(--space-4) 8px; text-align: center; }

/* ========== shell HR ========== */
.hr-top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.hr-top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); min-height: 68px; max-width: 1360px; margin: 0 auto; padding: 0 var(--space-4); }
.hr-top .logo { width: 112px; }
.hr-nav { display: flex; flex-wrap: wrap; gap: 0; flex: 1; }
.hr-nav a { font-family: var(--font-label); font-size: 16px; line-height: 16px; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; color: var(--text); padding: 11px 7px 7px; border-radius: var(--radius-full); white-space: nowrap; }
.hr-nav a:hover { background: var(--surface-tint); }
.hr-nav a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.hr-nav .badge { margin-left: 5px; background: var(--highlight); color: var(--on-highlight); border-radius: var(--radius-full); padding: 2px 7px 0; font-size: 14px; }
.hr-user { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; line-height: 18px; }
.hr-user .role { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.hr-main { max-width: 1360px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-8); display: grid; gap: var(--space-5); }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--space-4); }
.page-head .kicker { font-family: var(--font-label); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar select { width: auto; }

/* ========== tile & grafik ========== */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); display: grid; gap: var(--space-1); align-content: start; }
.tile .n { font-family: var(--font-display); font-weight: 200; font-size: 56px; line-height: 56px; letter-spacing: -0.03em; }
.tile .n small { font-size: 22px; color: var(--text-muted); letter-spacing: 0; margin-left: 2px; }
.tile .n::after { content: ""; display: block; width: 40px; height: 6px; margin-top: var(--space-2); border-radius: var(--radius-full); background: var(--highlight); }
.tile .l { font-size: 14px; line-height: 20px; color: var(--text-muted); margin-top: var(--space-2); }
.grid2 { display: grid; gap: var(--space-4); }
@media (min-width: 1000px) { .grid2 { grid-template-columns: 1.4fr 1fr; } .grid2.even { grid-template-columns: 1fr 1fr; } }
.grid3 { display: grid; gap: var(--space-4); }
@media (min-width: 1000px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.panel-h { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-3); }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: var(--space-2); }
.cols .c { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 2px; height: 100%; min-width: 0; }
.cols .seg { border-radius: 3px 3px 0 0; min-height: 0; }
.cols .seg.ok { background: var(--forest); }
.cols .seg.late { background: var(--leaf); }
.cols .seg.net { background: var(--forest); border-radius: 3px; }
.cols .seg.cost { background: var(--sand); border-radius: 3px; }
.cols-x { display: flex; gap: 6px; margin-top: 4px; }
.cols-x span { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: 13px; margin-top: var(--space-3); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 28px; gap: var(--space-3); align-items: center; font-size: 14px; }
.hbar .bar { height: 10px; }
.hbar b { font-family: var(--font-mono); font-weight: 400; text-align: right; }
.todo { display: grid; gap: var(--space-2); }
.todo a { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface); text-decoration: none; color: var(--text); }
.todo a:hover { background: var(--surface-tint); }
.todo a b { font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.todo a.zero { opacity: .55; }
.list { display: grid; gap: 0; }
.list .li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list .li:last-child { border-bottom: 0; }

/* ========== jadwal shift ========== */
.sched { min-width: 900px; }
.sched th, .sched td { padding: 8px 6px; text-align: center; }
.sched th:first-child, .sched td:first-child { text-align: left; padding-left: var(--space-4); min-width: 160px; position: sticky; left: 0; background: var(--surface-raised); }
.sched th.hol { color: var(--clay); }
.cell { all: unset; box-sizing: border-box; display: grid; gap: 1px; width: 100%; min-height: 54px; padding: 6px 4px; border-radius: 8px; cursor: pointer; font-size: 12px; line-height: 15px; text-align: center; align-content: center; box-shadow: inset 0 0 0 1px var(--line); }
.cell:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.cell b { font-family: var(--font-mono); font-weight: 400; font-size: 12px; }
.cell small { color: inherit; opacity: .8; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.c-leaf { background: var(--leaf); color: var(--black); box-shadow: none; }
.cell.c-sand { background: var(--sand); color: var(--black); box-shadow: none; }
.cell.c-forest { background: var(--forest); color: var(--white); box-shadow: none; }
.cell.c-sage { background: var(--sage); color: var(--black); box-shadow: none; }
.cell.c-clay { background: var(--clay); color: var(--white); box-shadow: none; }
.cell.c-bark { background: var(--bark); color: var(--white); box-shadow: none; }
.cell.off { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--line); }
.cell.leave { background: var(--surface-tint); color: var(--text); cursor: default; }
.cell.empty-cell { color: var(--text-muted); }
.hrs { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.hrs.warn { color: var(--clay); font-weight: 700; }

/* kalender cuti */
.cal { min-width: 760px; }
.cal th, .cal td { padding: 6px 2px; text-align: center; font-size: 11px; }
.cal th:first-child, .cal td:first-child { text-align: left; padding-left: var(--space-4); min-width: 150px; font-size: 13px; position: sticky; left: 0; background: var(--surface-raised); }
.cal td.we { background: var(--surface); }
.cal td.hol { background: var(--surface-tint); }
.cal td .lv { display: block; height: 22px; border-radius: 4px; background: var(--forest); }
.cal td .lv.p { background: var(--leaf); }

/* payroll */
.stepper { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.stepper .st { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-label); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding-top: 2px; }
.stepper .st .dot { background: var(--line-strong); }
.stepper .st.on { color: var(--text); }
.stepper .st.on .dot { background: var(--accent); width: 10px; height: 10px; }
.stepper .st.done .dot { background: var(--accent); }
.slip { display: grid; gap: var(--space-4); }
.slip h3 { margin-bottom: var(--space-2); }
.slip table th, .slip table td { padding: 6px 0; border: 0; }
.slip table th { border-bottom: 1.5px solid var(--line-strong); }
.slip .tot td { font-weight: 700; border-top: 1.5px solid var(--line-strong); padding-top: 10px; }
.slip .take { background: var(--bark); color: var(--white); border-radius: var(--radius-md); padding: var(--space-4); display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.slip .take .big { font-family: var(--font-display); font-weight: 200; font-size: 40px; line-height: 40px; letter-spacing: -0.03em; }
.slip .take .big::after { content: ""; display: block; width: 40px; height: 6px; margin-top: 8px; border-radius: 9999px; background: var(--leaf); }

/* dokumen & selfie */
.thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-tint); }
.selfie-big { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); background: var(--surface-tint); }
.receipt-img { width: 100%; max-height: 62vh; object-fit: contain; background: var(--surface-tint); border-radius: var(--radius-md); }
.sticky-save { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: var(--space-3) 0; display: flex; gap: var(--space-3); justify-content: flex-end; z-index: 5; }

/* ========== aplikasi karyawan (mobile-first) ========== */
.me { min-height: 100vh; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.me-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-3); }
.me-top .logo { width: 104px; }
.me-top .who { font-size: 14px; text-align: right; line-height: 18px; }
.me-top .who button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--accent-text); font-weight: 700; }
.me-body { padding: 0 var(--space-4) var(--space-5); display: grid; gap: var(--space-4); align-content: start; }
.me-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bark); padding-bottom: env(safe-area-inset-bottom); }
.me-nav .in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.me-nav a { text-align: center; text-decoration: none; color: var(--stone); font-family: var(--font-label); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; padding: 15px 2px 11px; position: relative; }
.me-nav a[aria-current="page"] { color: var(--white); }
.me-nav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 4px; border-radius: 0 0 4px 4px; background: var(--leaf); }
.me-nav .badge { margin-left: 4px; background: var(--leaf); color: var(--black); border-radius: 9999px; padding: 1px 6px 0; font-size: 13px; }

.clock { background: var(--bark); color: var(--white); border-radius: var(--radius-md); padding: var(--space-5) var(--space-4); display: grid; gap: var(--space-3); }
.clock .when { font-family: var(--font-display); font-weight: 200; font-size: 76px; line-height: 70px; letter-spacing: -0.03em; }
.clock .when small { font-size: 22px; letter-spacing: 0; margin-left: 6px; color: var(--stone); }
.clock .date { color: var(--stone); font-size: 14px; }
.clock .shift { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--clay); font-size: 14px; line-height: 20px; }
.clock .shift b { font-family: var(--font-label); font-weight: 400; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.clock .btn-lg { width: 100%; }
.clock .btn-lg.out { background: var(--sand); color: var(--bark); }
.clock .msg { font-size: 14px; color: var(--stone); }
.clock .state { display: flex; gap: var(--space-2); align-items: center; font-family: var(--font-label); font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.clock .state .dot { background: var(--leaf); width: 10px; height: 10px; }
.clock .state .dot.live { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .clock .state .dot.live { animation: none; } }
.mini-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.mini-tiles .tile { padding: var(--space-3); }
.mini-tiles .tile .n { font-size: 34px; line-height: 34px; }
.mini-tiles .tile .n::after { width: 28px; height: 5px; margin-top: 6px; }
.mini-tiles .tile .l { font-size: 12px; line-height: 16px; margin-top: 6px; }
.daylist { display: grid; gap: var(--space-2); }
.day { display: grid; grid-template-columns: 54px 1fr auto; gap: var(--space-3); align-items: center; padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-raised); border: 1px solid var(--line); }
.day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.day .dd { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 24px; text-align: center; letter-spacing: -0.02em; }
.day .dd small { display: block; font-family: var(--font-label); font-weight: 400; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.day .tt { font-size: 14px; line-height: 20px; }
.day .tt b { font-weight: 700; }
.bal { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.bal .tile .n { font-size: 44px; line-height: 44px; }
.seg-tabs { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: 2px; }
.cam { display: grid; gap: var(--space-3); justify-items: center; }
.cam-stage { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1; background: var(--bark); border-radius: var(--radius-md); overflow: hidden; }
.cam-stage video, .cam-stage img { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-stage img { transform: none; position: absolute; inset: 0; }
.cam-stage .ring { position: absolute; inset: 14%; border-radius: 50%; box-shadow: 0 0 0 999px rgba(61, 50, 44, .55), inset 0 0 0 2px var(--leaf); pointer-events: none; }
.gps { display: flex; gap: var(--space-2); align-items: center; font-size: 14px; line-height: 20px; }
.gps .dot { width: 10px; height: 10px; }
.gps.ok .dot { color: var(--accent); }
.gps.bad .dot { color: var(--clay); }
.drop { display: grid; gap: var(--space-2); justify-items: start; padding: var(--space-4); border: 1.5px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface); }
.scan-state { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--highlight); color: var(--on-highlight); font-weight: 700; font-size: 14px; }

@media print {
  body { background: #fff; }
  .hr-top, .me-nav, .me-top, .scrim .modal-head .btn, .no-print, .toast, .skip { display: none !important; }
  .scrim { position: static; background: none; padding: 0; display: block; overflow: visible; }
  .modal { max-height: none; overflow: visible; box-shadow: none; padding: 0; max-width: none; background: #fff; }
  body > #app { display: none; }
  .slip .take { background: #fff !important; color: #000 !important; border: 1.5px solid #000; }
}

/* ilustrasi, avatar, cuaca */
.art { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
.avatar { display: inline-block; flex: none; border-radius: var(--radius-full); object-fit: cover; background: var(--surface-tint); vertical-align: middle; }
.avatar.ini { display: inline-flex; align-items: center; justify-content: center; background: var(--sage); color: var(--black); font-family: var(--font-label); letter-spacing: .04em; line-height: 1; padding-top: 2px; }
.who-cell { display: flex; align-items: center; gap: var(--space-3); }
.hero-greet { display: grid; gap: var(--space-4); align-items: center; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
@media (min-width: 800px) { .hero-greet { grid-template-columns: 1.2fr 1fr; } }
.hero-greet .copy { padding: var(--space-5); display: grid; gap: var(--space-2); }
.hero-greet .art { border-radius: 0; height: 100%; object-fit: cover; }
.cheer { display: grid; grid-template-columns: 1fr; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); border: 1px solid var(--line); }
.cheer .art { border-radius: 0; }
.cheer p { padding: var(--space-3) var(--space-4) var(--space-4); font-family: var(--font-display); font-weight: 500; font-size: 18px; line-height: 24px; letter-spacing: -0.01em; }
.wxbar { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--clay); font-size: 14px; line-height: 20px; }
.wxbar b { font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; }
.wxbar .wx { flex: none; }
.empty .art { max-width: 220px; margin: 0 auto var(--space-3); }
.login-art { display: none; }
@media (min-width: 900px) { .login { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; } .login-art { display: block; background: var(--sand); grid-row: 1; grid-column: 2; align-self: stretch; overflow: hidden; position: relative; } .login-art .art { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; border-radius: 0; } .login-band { grid-column: 1 / -1; } .login-main { grid-column: 1; grid-row: 1; } }
.photo-up { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.multi-item { display: grid; gap: var(--space-3); padding: var(--space-3); border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); }
.multi-item.off { opacity: .55; }

/* maskot */
.mascot { display: block; height: auto; width: auto; max-width: 100%; object-fit: contain; flex: none; }
.quote { display: flex; align-items: flex-end; gap: var(--space-4); padding: var(--space-4) var(--space-4) 0; border-radius: var(--radius-md); background: var(--sand); overflow: hidden; }
.quote .mascot { height: 150px; margin-bottom: -2px; }
.quote > div { padding-bottom: var(--space-4); align-self: center; }
.quote p { font-family: var(--font-display); font-weight: 500; font-size: 18px; line-height: 24px; letter-spacing: -0.01em; color: var(--black); }
.quote .muted { color: var(--forest); }
.empty .mascot { height: 130px; margin: 0 auto var(--space-3); }
.hero-greet .mascot-wrap { background: var(--sand); display: flex; justify-content: center; align-items: flex-end; padding-top: var(--space-3); min-height: 180px; }
.hero-greet .mascot-wrap .mascot { height: 190px; }
.login-art .mascot { position: absolute; bottom: 0; left: 50%; transform: translateX(-30%); height: 62%; z-index: 1; }

/* broadcast: merah, berkedip, tulisan putih */
.alerts { display: grid; gap: var(--space-2); }
.alertbar { --a1: #c1121f; --a2: #7d0a12; display: grid; grid-template-columns: auto 1fr; gap: var(--space-3) var(--space-4); align-items: center; padding: var(--space-4); color: #fff; background: var(--a1); animation: alertblink 1.1s ease-in-out infinite; border-bottom: 3px solid #fff; }
.alertbar .alert-ico { width: 64px; height: 64px; animation: alertpop 1.1s ease-in-out infinite; }
.alertbar .alert-tag { font-family: var(--font-label); letter-spacing: .08em; text-transform: uppercase; font-size: 15px; opacity: .95; }
.alertbar h2 { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 26px; letter-spacing: -0.01em; color: #fff; }
.alertbar p { font-size: 15px; line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere; color: #fff; margin-top: 2px; }
.alertbar .alert-time { font-family: var(--font-mono); font-size: 12px; opacity: .85; }
.alertbar .alert-btn { grid-column: 1 / -1; justify-self: stretch; background: #fff; color: #c1121f; border: 0; border-radius: var(--radius-full); height: 44px; padding: 4px var(--space-5) 0; font-family: var(--font-label); font-size: 18px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.alertbar .alert-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes alertblink { 0%, 100% { background: var(--a1); } 50% { background: var(--a2); } }
@keyframes alertpop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .alertbar, .alertbar .alert-ico { animation: none; } .alertbar { outline: 4px solid #fff; outline-offset: -8px; } }
.hr-alerts { max-width: 1360px; margin: 0 auto; }
.pick-list { max-height: 280px; overflow: auto; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); }
.pick-list label { display: flex; align-items: center; gap: var(--space-3); padding: 8px var(--space-3); border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.pick-list label:last-child { border-bottom: 0; }
.alert-preview { border-radius: var(--radius-md); overflow: hidden; }
