﻿:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #171717;
  --border: #3d3d3d;
  --strong: #555;
  --text: #f6f6f6;
  --muted: #a6a6a6;
  --subtle: #777;
  --blue: #11769a;
  --blue-bright: #13a8d6;
  --green: #031b14;
  --green-border: #086343;
  --danger: #ff7d9d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); scroll-behavior: smooth; touch-action: manipulation; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: .01em;
}
body.modal-open { overflow: hidden; }
button, a, input, select, textarea { touch-action: manipulation; }
button, input, select, textarea { max-width: 100%; font: inherit; color: inherit; }
button:disabled { opacity: .72; cursor: default; }

.page { width: min(100%, 472px); margin: 0 auto; padding: 88px 24px 56px; }
.home-page { padding-top: 96px; }
.caption { margin: 0 0 14px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.home-title, .mypage-header h1, .login-page h1 { margin: 0; color: #fff; font-weight: 900; letter-spacing: .03em; }
.home-title { margin-bottom: 28px; font-size: 36px; line-height: 1.18; }
.mypage-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 34px; }
.mypage-header h1 { font-size: 36px; line-height: 1.2; }
.user-name { margin: 10px 0 0; font-size: 20px; }
.login-page h1 { margin-bottom: 28px; font-size: 32px; }
.hamburger-button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 13px; border: 1px solid var(--border); border-radius: 999px; background: #0b0b0b; color: var(--text); font-weight: 800; cursor: pointer; }
.hamburger-button span { font-size: 13px; }
.hamburger-button strong { font-size: 20px; line-height: 1; }
.hamburger-button:active { border-color: var(--blue-bright); background: var(--blue); }

.panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  padding: 21px 20px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.panel.section-flash { border-color: var(--blue-bright); box-shadow: 0 0 0 1px rgba(19,168,214,.75), 0 0 26px rgba(19,168,214,.28); }
.notice-panel { margin-bottom: 30px; background: var(--green); border-color: var(--green-border); }
.notice-panel h2, .panel h2 { margin: 0 0 14px; font-size: 20px; line-height: 1.4; }
.notice-panel p { margin: 0; color: #f0f0f0; font-size: 16px; line-height: 1.85; }

.home-actions { display: grid; gap: 18px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #0b0b0b;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
.btn:active, .btn.is-active { border-color: var(--blue-bright); background: var(--blue); color: #fff; box-shadow: 0 0 22px rgba(19,168,214,.32); }
.btn-white { min-height: 66px; border-color: #fff; background: #fff; color: #050505; font-size: 21px; }
.btn-white.is-active, .btn-white:active { border-color: var(--blue-bright); background: var(--blue); color: #fff; }
.btn-blue { margin-top: 10px; min-height: 66px; border-color: var(--blue); background: var(--blue); color: rgba(255,255,255,.78); }
.danger-button { border-color: #b91c1c; background: #7f1d1d; color: #fff; }
.danger-button:active { border-color: #ef4444; background: #dc2626; box-shadow: 0 0 22px rgba(239,68,68,.28); }

.progress-list { margin-top: 30px; }
.muted-title { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.progress-list ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.progress-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 18px; line-height: 1.45; }
.progress-list span { width: 26px; flex: 0 0 26px; }
.home-hero-card { margin-bottom: 24px; }
.home-feature-list { margin-top: 28px; }
.home-feature-grid { display: grid; gap: 10px; }
.home-feature-grid article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}
.home-feature-grid span { grid-row: span 2; color: var(--blue-bright); font-weight: 900; }
.home-feature-grid strong { font-size: 17px; }
.home-feature-grid p { grid-column: 2; margin: 0; color: var(--muted); line-height: 1.6; }
.demo-login-card { margin-top: 22px; }
.demo-login-card p { margin: 6px 0 0; color: var(--muted); }
.demo-login-card strong { color: var(--text); }
.security-notice-card { margin-top: 14px; border-color: rgba(255,125,157,.55); }
.security-notice-card h2 { color: #ffd7e1; }
.security-notice-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.75; }
.security-notice-card p:last-child { margin-bottom: 0; }
.security-notice-card a { color: #d6f5ff; font-weight: 900; text-underline-offset: 4px; }

.summary-card + .attendance-card, .attendance-card + .report-shell, .report-shell + .business-card, .report-shell + .feature-panel, .feature-panel + .feature-panel { margin-top: 30px; }
.summary-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.summary-head h2 { margin-bottom: 2px; font-size: 17px; }
.summary-head p { margin: 0; color: var(--muted); }
.summary-head strong { padding-top: 9px; font-size: 16px; }
.meter { height: 10px; margin: 16px 0 14px; overflow: hidden; border-radius: 999px; background: #4c4c4c; }
.meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue-bright); box-shadow: 0 0 18px rgba(19,168,214,.75); transition: width .18s ease; }
.complete-message {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 18px 14px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #111;
  color: #d6f5ff;
  text-align: center;
}
.complete-message img { width: min(180px, 58vw); height: auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.38)); }
.complete-message strong { font-size: 20px; font-weight: 900; }
.complete-message span { color: var(--muted); font-size: 13px; font-weight: 800; }
.complete-actions { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; margin-top: 8px; }
.complete-actions button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(19,168,214,.7);
  border-radius: 12px;
  background: rgba(19,168,214,.18);
  color: #d6f5ff;
  font-weight: 900;
}
.complete-actions button:last-child {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
.edit-back-link { display: grid; place-items: center; text-decoration: none; }
.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.summary-tab {
  display: grid;
  gap: 4px;
  place-items: center;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #090909;
  color: var(--text);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.summary-tab strong { font-size: 12px; }
.summary-tab span { color: var(--muted); font-size: 11px; }
.summary-tab:active, .summary-tab.is-complete { border-color: var(--blue-bright); background: rgba(17,118,154,.24); box-shadow: 0 0 22px rgba(19,168,214,.28); }
.summary-tab.is-complete span { color: #d6f5ff; }

.date-row { display: flex; align-items: baseline; gap: 12px; margin: 2px 0 8px; }
.date-row span { font-size: 21px; font-weight: 800; }
.date-row strong { font-size: 30px; letter-spacing: .08em; }
.help-text { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.attendance-reset-row { min-height: 30px; margin-top: 8px; display: flex; justify-content: flex-end; }
.time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 18px 0 24px; }
.time-box { display: grid; gap: 10px; align-content: start; min-height: 96px; }
.time-box span { color: var(--muted); font-size: 14px; font-weight: 800; }
.time-edit { width: 100%; min-height: 46px; padding: 0; border: 0; background: transparent; color: #fff; font-size: 30px; line-height: 1; font-weight: 900; letter-spacing: .04em; text-align: left; cursor: pointer; }
.time-edit.is-empty { color: var(--subtle); font-size: 28px; }
.punch-button { min-height: 69px; }
.attendance-edit-button { display: block; width: fit-content; margin: 12px auto 0; padding: 8px 13px; border: 1px solid var(--strong); border-radius: 999px; background: #090909; color: var(--text); font-size: 13px; font-weight: 800; cursor: pointer; }
.attendance-edit-button:active { border-color: var(--blue-bright); background: var(--blue); }
.attendance-edit-button:disabled { opacity: .45; cursor: default; }
.attendance-reset { display: block; margin: 0; padding: 6px 2px 6px 12px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.attendance-reset:active { color: var(--blue-bright); }

.report-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.report-head h2 { margin-bottom: 13px; font-size: 23px; }
.report-head p, #reportSummary { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.report-summary-links { display: flex; gap: 12px; flex-wrap: wrap; }
.report-summary-links button { padding: 0; border: 0; background: transparent; color: var(--blue-bright); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.toggle-button { flex: 0 0 64px; height: 44px; border: 1px solid var(--strong); border-radius: 14px; background: #151515; color: #fff; font-size: 18px; cursor: pointer; }
.toggle-button:active { border-color: var(--blue-bright); background: var(--blue); box-shadow: 0 0 18px rgba(19,168,214,.25); }
.report-form { margin-top: 18px; padding-top: 24px; border-top: 1px solid #343434; }
.field-label, .memo-label, .input-grid label, .other-work-label { display: grid; gap: 10px; margin-bottom: 14px; color: var(--muted); font-size: 16px; font-weight: 700; }
.field-label span { color: var(--danger); }
.today-report-check { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--text); font-size: 16px; font-weight: 800; }
.today-report-check input { width: 20px; height: 20px; accent-color: var(--blue-bright); }
.report-date-label { display: grid; gap: 10px; margin-bottom: 18px; color: var(--muted); font-size: 16px; font-weight: 700; }
.report-date-label input { height: 55px; }
.task-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.choice { min-height: 57px; border: 1px solid var(--strong); border-radius: 14px; background: #090909; color: var(--text); font-weight: 800; font-size: 17px; cursor: pointer; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.choice:active, .choice.active { border-color: var(--blue-bright); background: var(--blue); color: #fff; box-shadow: 0 0 22px rgba(19,168,214,.28); }
select, input, textarea { width: 100%; border: 1px solid var(--strong); border-radius: 14px; background: #080808; color: #fff; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
select { height: 55px; margin-bottom: 20px; padding: 0 14px; font-weight: 800; }
select.is-selected, input:focus, textarea:focus { outline: 0; border-color: var(--blue-bright); box-shadow: 0 0 0 1px rgba(19,168,214,.72), 0 0 18px rgba(19,168,214,.22); }
select.is-selected { background: rgba(17,118,154,.22); }
.photo-button { display: inline-flex; align-items: center; justify-content: center; width: 121px; height: 55px; margin-bottom: 18px; border: 1px dashed #8a8a8a; border-radius: 12px; font-weight: 800; cursor: pointer; }
.photo-button:active { border-color: var(--blue-bright); background: var(--blue); color: #fff; }
.photo-button input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.photo-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.photo-item { display: grid; gap: 6px; }
.photo-thumb { display: block; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #0b0b0b; cursor: pointer; }
.photo-thumb img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-remove { min-height: 28px; border: 1px solid var(--strong); border-radius: 999px; background: #0b0b0b; color: var(--muted); font-size: 11px; font-weight: 800; cursor: pointer; }
.photo-remove:active { border-color: var(--danger); color: #fff; background: #7f1d1d; }
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input { height: 61px; padding: 0 15px; font-size: 18px; }
input.time-edit { height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
input.time-edit:focus { outline: 0; border: 0; box-shadow: none; }
input::placeholder, textarea::placeholder { color: #777; }
textarea { min-height: 119px; padding: 17px 15px; resize: vertical; line-height: 1.6; }
.reset-button { margin-top: 8px; min-height: 52px; font-size: 16px; }
.form-note, .saved-message { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.saved-message { min-height: 18px; color: #d7d7d7; }
.logout-button { margin-top: 30px; }
.top-link { display: block; width: fit-content; margin: 28px auto 0; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.login-panel { display: grid; gap: 18px; }
.subpage-header { margin-bottom: 24px; }
.subpage-header h1 { margin: 0; font-size: 34px; line-height: 1.2; }
.inline-back { margin: 0 0 26px; }

.feature-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 16px; }
.feature-head h2 { margin: 0; }
.feature-head .caption { margin-bottom: 4px; font-size: 13px; }
.month-controls { display: flex; align-items: center; gap: 8px; font-weight: 900; }
.month-controls button { width: 34px; height: 34px; border: 1px solid var(--strong); border-radius: 10px; background: #0b0b0b; color: var(--text); font-size: 22px; cursor: pointer; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 14px; color: var(--muted); font-size: 12px; font-weight: 800; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend i { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.legend-today { border: 2px solid #fff; background: transparent; }
.legend-work, .marker-work { background: var(--blue-bright); }
.legend-report, .marker-report { background: #22c55e; }
.legend-leave, .marker-leave { background: var(--danger); }
.legend-selected { background: #fff; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-weekdays { margin-bottom: 8px; color: var(--muted); font-size: 12px; text-align: center; }
.calendar-day { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; min-height: 48px; border: 1px solid var(--border); border-radius: 12px; background: #090909; color: var(--text); font-weight: 800; cursor: pointer; }
.calendar-day.is-today { border-color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.42); }
.calendar-day.is-selected { background: #fff; color: #050505; border-color: #fff; }
.calendar-day.has-work:not(.is-selected) { box-shadow: inset 0 -3px 0 var(--blue-bright); }
.calendar-day.has-report:not(.is-selected) { background: rgba(34,197,94,.16); }
.calendar-day.has-leave:not(.is-selected) { border-color: rgba(255,125,157,.72); }
.calendar-markers { display: flex; gap: 3px; min-height: 6px; }
.calendar-markers i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.calendar-day.is-selected .calendar-markers i { outline: 1px solid rgba(0,0,0,.2); }
.calendar-detail { margin-top: 14px; padding-top: 14px; border-top: 1px solid #343434; color: var(--muted); line-height: 1.7; }
.calendar-detail p { margin: 0 0 8px; }
.calendar-detail-date { color: var(--text); font-weight: 900; }
.calendar-info-card, .calendar-request-card { display: grid; gap: 8px; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: #090909; }
.calendar-info-card p, .calendar-request-card p { margin: 0; }
.calendar-card-head, .calendar-request-card div { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.calendar-card-head strong, .calendar-request-card strong { color: var(--text); }
.calendar-card-head span { color: #86efac; font-weight: 900; }
.calendar-leave-list { display: grid; gap: 10px; }
.calendar-photo-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.calendar-photo-button { display: block; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #0b0b0b; cursor: pointer; }
.calendar-photo-button img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.feature-page[data-feature-page="payroll"] .feature-head { justify-content: center; text-align: center; }
.payroll-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.payroll-grid div { display: grid; gap: 8px; min-height: 92px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #090909; }
.payroll-grid span { color: var(--muted); font-size: 14px; font-weight: 800; }
.payroll-grid strong { font-size: 24px; }
.payroll-grid > div:first-child strong { align-self: center; justify-self: center; }
#payrollTotal { font-size: 34px; line-height: 1.15; }
.payroll-grid .payroll-adjustment-box { gap: 0; padding: 10px 14px; }
.payroll-adjustment-box p { display: grid; grid-template-columns: 1fr; align-content: center; gap: 2px; margin: 0; min-height: 36px; }
.payroll-adjustment-box p + p { border-top: 1px solid #2f2f2f; }
.payroll-adjustment-box span { white-space: nowrap; }
.payroll-adjustment-box strong { font-size: 18px; white-space: nowrap; text-align: right; }
#payrollAdvance { color: #fca5a5; }
#payrollAllowance { color: #86efac; }
.payslip-history { display: grid; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #343434; }
.payslip-all-link { color: var(--text); text-decoration: none; }
.payslip-all-link:active { border-color: var(--blue-bright); background: rgba(17,118,154,.18); }
.mini-form { display: grid; gap: 12px; margin-top: 16px; }
.mini-form label { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
.mini-form input, .mini-form select, .mini-form textarea { min-width: 0; }
.mini-form input[type="date"] { appearance: none; -webkit-appearance: none; }
.history-toggle-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #343434; }
.history-toggle-head h2 { margin: 0; }
.leave-list { display: grid; gap: 10px; margin-top: 16px; }
.leave-item { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #090909; }
.leave-item span { color: var(--muted); }
.leave-item p { margin: 0; color: var(--muted); }
.settings-panel { display: grid; gap: 18px; }
.settings-section-head h2 { margin: 0; }
.settings-info-grid { display: grid; gap: 10px; }
.settings-info-grid div { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #090909; }
.settings-info-grid span { color: var(--muted); font-size: 13px; font-weight: 800; }
.settings-info-grid strong { font-size: 19px; }
.settings-display-form { margin-top: 0; }
body[data-theme="black"] { --panel: #0c0c0c; --border: #2c2c2c; }
body[data-theme="white"] {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --border: #d8dee8;
  --strong: #b9c2cf;
  --text: #111827;
  --muted: #64748b;
  --subtle: #94a3b8;
  background: var(--bg);
}
body[data-theme="white"] .panel,
body[data-theme="white"] .summary-tab,
body[data-theme="white"] .complete-message,
body[data-theme="white"] .settings-info-grid div,
body[data-theme="white"] .payroll-grid div,
body[data-theme="white"] .leave-item,
body[data-theme="white"] .admin-list-item,
body[data-theme="white"] .home-feature-grid article,
body[data-theme="white"] .calendar-info-card,
body[data-theme="white"] .calendar-request-card,
body[data-theme="white"] .calendar-day,
body[data-theme="white"] .employee-detail-cell,
body[data-theme="white"] .employee-detail-tab,
body[data-theme="white"] .rate-table div,
body[data-theme="white"] .employee-calendar-note,
body[data-theme="white"] .advance-methods label,
body[data-theme="white"] .attendance-time-row div {
  background: #fff;
}
body[data-theme="white"] input,
body[data-theme="white"] select,
body[data-theme="white"] textarea,
body[data-theme="white"] .btn,
body[data-theme="white"] .toggle-button,
body[data-theme="white"] .hamburger-button,
body[data-theme="white"] .attendance-edit-button,
body[data-theme="white"] .choice,
body[data-theme="white"] .photo-thumb,
body[data-theme="white"] .photo-remove,
body[data-theme="white"] .month-controls button,
body[data-theme="white"] .calendar-photo-button,
body[data-theme="white"] .admin-add-button,
body[data-theme="white"] .admin-small-button,
body[data-theme="white"] .salary-breakdown button,
body[data-theme="white"] .mail-subject,
body[data-theme="white"] .mail-body {
  background: #f8fafc;
  color: var(--text);
}
body[data-theme="white"] .app-menu-sheet,
body[data-theme="white"] .mail-modal-body {
  background: #fff;
}
body[data-theme="white"] .meter { background: #d1d5db; }
body[data-theme="white"] .time-edit { background: transparent; }
body[data-theme="white"] .btn-white { background: #111827; color: #fff; }
body[data-theme="white"] .btn-blue {
  background: var(--blue);
  color: #fff;
}
body[data-theme="white"] .caption,
body[data-theme="white"] .muted-title,
body[data-theme="white"] .help-text,
body[data-theme="white"] .form-note,
body[data-theme="white"] .saved-message,
body[data-theme="white"] .summary-head p,
body[data-theme="white"] .summary-tab span,
body[data-theme="white"] .report-head p,
body[data-theme="white"] #reportSummary,
body[data-theme="white"] .calendar-detail,
body[data-theme="white"] .leave-item p,
body[data-theme="white"] .home-feature-grid p,
body[data-theme="white"] .demo-login-card p,
body[data-theme="white"] .settings-info-grid span,
body[data-theme="white"] .payroll-grid span,
body[data-theme="white"] .app-menu-sheet a span,
body[data-theme="white"] .progress-list,
body[data-theme="white"] .complete-message span {
  color: #475569;
}
body[data-theme="white"] .home-title,
body[data-theme="white"] .complete-message strong {
  color: #111827;
}
body[data-theme="white"] .security-notice-card h2 {
  color: #9f1239;
}
body[data-theme="white"] .security-notice-card p {
  color: #475569;
}
body[data-theme="white"] .security-notice-card a {
  color: #075985;
}
body[data-theme="white"] .notice-panel {
  background: #fff;
  border-color: #b7c2d0;
}
body[data-theme="white"] .notice-panel p {
  color: #334155;
}
body[data-theme="white"] .summary-tab.is-complete,
body[data-theme="white"] .choice.active,
body[data-theme="white"] .choice:active {
  background: #e0f2fe;
  color: #0f172a;
}
body[data-theme="white"] .summary-tab.is-complete span {
  color: #0369a1;
}
body[data-theme="white"] .complete-actions button:first-child,
body[data-theme="white"] .report-summary-links button {
  color: #075985;
}
body[data-theme="white"] .btn-blue,
body[data-theme="white"] .complete-actions button:first-child {
  color: #fff;
}
body[data-theme="white"] .complete-actions button:first-child {
  background: #11769a;
  border-color: #11769a;
}
body[data-font-size="large"] { font-size: 17px; }
body[data-font-size="large"] input, body[data-font-size="large"] select, body[data-font-size="large"] textarea, body[data-font-size="large"] .btn { font-size: 19px; }
.payslip-card, .advance-card { margin-top: 24px; }
.advance-card-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.advance-card-head h2 { margin: 0; }
.advance-card #advanceForm { margin-top: 14px; }
.advance-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; color: var(--text); }
.advance-methods > span { grid-column: 1 / -1; color: var(--muted); font-weight: 800; }
.advance-methods label { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #090909; color: var(--text); }
.advance-methods input { width: auto; height: auto; }
.advance-method-message { margin-top: -4px; text-align: left; }
.saved-message a { color: #d6f5ff; font-weight: 900; }
.settings-bank-form { padding-top: 4px; }
.settings-bank-form h2 { margin: 0; }
.admin-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.admin-summary-card { display: grid; gap: 8px; padding: 16px; color: var(--text); text-decoration: none; }
.admin-summary-card span { color: var(--muted); font-size: 13px; font-weight: 800; }
.admin-summary-card strong { font-size: 24px; }
.admin-summary-card:active { border-color: var(--blue-bright); background: rgba(17,118,154,.24); box-shadow: 0 0 22px rgba(19,168,214,.28); }
.admin-panel + .admin-panel { margin-top: 24px; }
.admin-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.admin-panel-head h2 { margin: 0; font-size: 22px; }
.admin-panel-head span { color: var(--muted); font-size: 13px; font-weight: 800; }
.site-version { margin: 6px 0 0; color: var(--blue-bright); font-size: 12px; font-weight: 800; }
.admin-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.admin-note a { color: var(--blue-bright); }
.admin-inline-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-inline-actions .btn { flex: 1 1 180px; margin-top: 0; }
.btn-gray { min-height: 66px; border-color: var(--border); background: #141414; color: var(--text); }
.admin-add-button { width: 34px; height: 34px; border: 1px solid var(--strong); border-radius: 50%; background: #090909; color: #fff; font-size: 21px; line-height: 1; font-weight: 800; cursor: pointer; }
.admin-add-button:active { border-color: var(--blue-bright); background: var(--blue); }
.admin-list { display: grid; gap: 10px; }
.compact-admin-form { margin: 4px 0 16px; padding-bottom: 16px; border-bottom: 1px solid #343434; }
.admin-list-item { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #090909; }
.admin-list-item div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.admin-list-item strong { font-size: 17px; }
.admin-list-item span, .admin-list-item p { color: var(--muted); }
.admin-list-item p { margin: 0; line-height: 1.6; }
.employee-list-item > div span { color: var(--blue-bright); font-weight: 800; }
.employee-list-item.is-enabled { border-color: rgba(19,168,214,.78); box-shadow: 0 0 18px rgba(19,168,214,.22); }
.employee-list-item.is-disabled { border-color: rgba(239,68,68,.78); box-shadow: 0 0 18px rgba(239,68,68,.24); }
.attendance-today-item.is-enabled { border-color: rgba(19,168,214,.78); box-shadow: 0 0 18px rgba(19,168,214,.22); }
.attendance-today-item.is-disabled { border-color: rgba(239,68,68,.78); box-shadow: 0 0 18px rgba(239,68,68,.24); }
.attendance-today-item { width: 100%; color: var(--text); text-align: left; cursor: pointer; }
.attendance-today-item:active { background: rgba(17,118,154,.18); }
.attendance-today-item > div:first-child span { color: var(--blue-bright); font-weight: 800; }
.attendance-today-item.is-disabled > div:first-child span { color: #fca5a5; }
.attendance-time-row { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
.attendance-time-row div { display: grid !important; gap: 5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #050505; }
.attendance-time-row span { color: var(--muted); font-size: 12px; font-weight: 800; }
.attendance-time-row strong { font-size: 20px; letter-spacing: .04em; }
.attendance-progress-line { height: 3px; overflow: hidden; border-radius: 999px; background: #3a3a3a; }
.attendance-progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--blue-bright); box-shadow: 0 0 10px rgba(19,168,214,.75); }
.attendance-detail-panel { margin-top: 16px; }
.notification-box { display: grid; gap: 12px; margin-bottom: 14px; }
.reminder-panel textarea { min-height: 150px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.reminder-panel .admin-small-button { justify-self: end; }
.admin-small-button { width: fit-content; margin-top: 4px; padding: 8px 12px; border: 1px solid var(--strong); border-radius: 999px; background: #111; color: var(--text); font-size: 13px; font-weight: 800; cursor: pointer; }
.admin-small-button:active { border-color: var(--blue-bright); background: var(--blue); }
.admin-action-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start !important; }
.admin-action-row .admin-small-button { margin-top: 0; text-decoration: none; }
.admin-action-row .admin-small-button.is-active { border-color: var(--blue-bright); background: var(--blue); color: #fff; }
.request-actions { margin-top: 4px; }
.request-status { font-weight: 900; }
.request-paid { color: #facc15 !important; }
.request-approved { color: #86efac !important; }
.request-pending { color: var(--blue-bright) !important; }
.request-rejected { color: #fca5a5 !important; }
.danger-inline { border-color: #7f1d1d; color: #fecaca; }
.danger-inline:active { border-color: #ef4444; background: #7f1d1d; }
.employee-detail-panel { margin-top: 24px; }
.employee-detail-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.employee-detail-tab { min-height: 46px; border: 1px solid var(--border); border-radius: 14px; background: #090909; color: var(--muted); font-weight: 800; cursor: pointer; }
.employee-detail-tab.active { border-color: var(--blue-bright); background: rgba(17,118,154,.24); color: #fff; box-shadow: 0 0 18px rgba(19,168,214,.2); }
.employee-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.employee-detail-cell { display: grid; gap: 5px; width: 100%; min-height: 72px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #090909; color: var(--text); text-align: left; cursor: pointer; }
.employee-detail-cell:active, .employee-detail-cell.is-editing { border-color: var(--blue-bright); background: rgba(17,118,154,.18); }
.employee-detail-cell.is-enabled { border-color: var(--blue-bright); box-shadow: 0 0 18px rgba(19,168,214,.22); }
.employee-detail-cell.is-disabled { border-color: #ef4444; box-shadow: 0 0 18px rgba(239,68,68,.24); }
.employee-detail-grid span { color: var(--muted); font-size: 12px; font-weight: 800; }
.employee-detail-grid strong { font-size: 16px; }
.detail-inline-input { height: auto; min-height: 24px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #fff; font-size: 16px; font-weight: 800; box-shadow: none; }
.detail-inline-input:focus { outline: 0; border: 0; box-shadow: none; }
.role-picker { display: grid; gap: 7px; }
.role-choice { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; font-weight: 800; }
.role-choice input { width: auto; height: auto; }
.rate-table { display: grid; gap: 8px; margin-top: 14px; }
.rate-table div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #090909; }
.rate-table span { color: var(--muted); font-weight: 800; }
.rate-table strong { font-size: 15px; }
.rate-view { display: grid; }
.rate-view #editWorkRates { justify-self: end; }
.rate-form { display: grid; gap: 10px; }
.rate-form label { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; align-items: center; }
.rate-form label span { color: var(--muted); font-weight: 800; }
.rate-form input { height: 48px; }
.employee-detail-summary { display: grid; gap: 6px; margin-top: 14px; color: var(--muted); line-height: 1.6; }
.employee-detail-summary p { margin: 0; }
.employee-detail-summary .report-count-alert { color: #fca5a5; text-shadow: 0 0 14px rgba(239,68,68,.72); font-weight: 800; }
.salary-breakdown { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; font-size: 14px; }
.salary-breakdown button { flex: 0 0 auto; padding: 3px 8px; border: 1px solid var(--strong); border-radius: 999px; background: #090909; color: var(--text); font-size: 11px; font-weight: 800; cursor: pointer; }
.salary-breakdown button:active { border-color: var(--blue-bright); background: var(--blue); }
.salary-adjust-form { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #343434; }
.salary-adjust-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 800; }
.salary-adjust-form input { height: 46px; font-size: 16px; }
.salary-adjust-form textarea { min-height: 92px; font-size: 16px; }
.salary-adjust-form .admin-small-button { justify-self: end; }
.employee-detail-links { display: grid; gap: 10px; margin-top: 16px; }
.employee-check-buttons { grid-template-columns: 1fr; }
.employee-check-panel { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #343434; }
.employee-check-panel h3 { margin: 0; font-size: 18px; }
.employee-report-calendar { margin-bottom: 4px; }
.employee-calendar-notes { display: grid; gap: 8px; }
.employee-calendar-note { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #090909; color: var(--muted); }
.employee-calendar-button { width: 100%; text-align: left; cursor: pointer; }
.employee-calendar-button:active { border-color: var(--blue-bright); background: rgba(17,118,154,.18); }
.employee-calendar-note strong { color: var(--text); }
.employee-calendar-note p { margin: 0; line-height: 1.6; }
.employee-report-photos { margin-top: 6px; }
.employee-report-photos .calendar-photo-button { display: block; padding: 0; }
.admin-photo-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.admin-photo-list img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

.photo-modal[hidden] { display: none; }
.mail-modal[hidden] { display: none; }
.app-menu[hidden] { display: none; }
.photo-modal, .mail-modal { position: fixed; inset: 0; display: grid; place-items: center; padding: 22px; }
.photo-modal { z-index: 30; }
.mail-modal { z-index: 20; }
.photo-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.82); }
.photo-modal-body { position: relative; z-index: 1; width: min(100%, 440px); display: grid; gap: 14px; }
.photo-modal-body img { width: 100%; max-height: 68vh; object-fit: contain; border-radius: 18px; background: #111; border: 1px solid var(--border); }
.modal-actions { display: grid; gap: 10px; }
.modal-actions .btn { min-height: 52px; }
.mail-modal-body { position: relative; z-index: 1; width: min(100%, 440px); max-height: 86vh; overflow: auto; display: grid; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); }
.mail-modal-body h2 { margin: 0; font-size: 22px; }
.mail-preview-block { display: grid; gap: 8px; }
.mail-label { margin: 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.mail-photo-count { margin: 0; color: var(--text); font-size: 16px; font-weight: 800; }
.mail-subject { margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #0b0b0b; font-weight: 800; }
.mail-body { margin: 0; min-height: 120px; white-space: pre-wrap; word-break: break-word; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #0b0b0b; color: var(--text); font: inherit; line-height: 1.7; }
.mail-photo-add { margin-bottom: 0; }
.mail-photo-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mail-photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.app-menu { position: fixed; inset: 0; z-index: 25; display: grid; align-items: end; }
.app-menu-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); }
.app-menu-sheet { position: relative; z-index: 1; width: min(100%, 472px); margin: 0 auto; padding: 20px 24px 28px; border: 1px solid var(--border); border-bottom: 0; border-radius: 24px 24px 0 0; background: #141414; box-shadow: 0 -18px 50px rgba(0,0,0,.38); }
.app-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.app-menu-head h2 { margin: 0; font-size: 22px; }
.app-menu-head button { border: 0; background: transparent; color: var(--muted); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.app-menu-sheet a { display: grid; gap: 5px; padding: 16px 0; border-top: 1px solid #303030; color: var(--text); text-decoration: none; }
.app-menu-sheet a strong { font-size: 18px; }
.app-menu-sheet a span { color: var(--muted); font-size: 14px; }
.app-menu-sheet a:active strong { color: var(--blue-bright); }

@media (max-width: 380px) {
  .page { padding-inline: 18px; }
  .home-title { font-size: 33px; }
  .date-row { flex-wrap: wrap; }
  .date-row strong { font-size: 27px; }
  .photo-preview { grid-template-columns: repeat(3, 1fr); }
}