:root {
  color-scheme: dark;
  --bg: #050712;
  --surface: rgba(14, 19, 39, .92);
  --surface-2: #111831;
  --surface-3: #18203d;
  --cyan: #21e6ff;
  --cyan-soft: rgba(33, 230, 255, .13);
  --purple: #9b6cff;
  --purple-soft: rgba(155, 108, 255, .14);
  --lime: #b8ff59;
  --danger: #ff557a;
  --warning: #ffbe4c;
  --text: #f3f7ff;
  --muted: #8d98b8;
  --line: rgba(163, 187, 255, .14);
  --shadow: 0 22px 60px rgba(0, 0, 0, .36);
  --radius: 22px;
  font-family: Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% -5%, rgba(31, 221, 255, .15), transparent 30%),
    radial-gradient(circle at 100% 15%, rgba(145, 74, 255, .14), transparent 34%),
    linear-gradient(180deg, #070a18 0%, #050712 65%);
  overflow-x: hidden;
}

body[data-theme="dota2"] {
  --bg: #07090d;
  --surface: rgba(15, 16, 20, .94);
  --surface-2: #17191d;
  --surface-3: #25272b;
  --cyan: #34d8d2;
  --cyan-soft: rgba(52, 216, 210, .13);
  --purple: #d94c3d;
  --purple-soft: rgba(217, 76, 61, .14);
  --lime: #f0c36a;
  --danger: #ff5a51;
  --warning: #ff9d45;
  --muted: #a2a9b1;
  --line: rgba(226, 202, 174, .16);
  background: linear-gradient(180deg, rgba(2, 5, 8, .45), rgba(2, 5, 8, .88)), url('./themes/dota2-heroes.webp') center top / cover fixed no-repeat;
}

body[data-theme="dota2-radiant"] {
  --bg: #07100d;
  --surface: rgba(12, 24, 20, .94);
  --surface-2: #10241d;
  --surface-3: #183a2c;
  --cyan: #70e6bd;
  --cyan-soft: rgba(112, 230, 189, .14);
  --purple: #d8b85c;
  --purple-soft: rgba(216, 184, 92, .15);
  --lime: #baf56e;
  --danger: #ff6b62;
  --warning: #ffd36a;
  --muted: #a6bbb0;
  --line: rgba(178, 230, 201, .17);
  background: linear-gradient(150deg, rgba(4, 18, 12, .32), rgba(3, 10, 8, .9)), url('./themes/dota2-radiant-heroes.webp') center top / cover fixed no-repeat;
}

body[data-theme="dota2-dire"] {
  --bg: #100607;
  --surface: rgba(28, 12, 13, .95);
  --surface-2: #291113;
  --surface-3: #42191a;
  --cyan: #ff7468;
  --cyan-soft: rgba(255, 116, 104, .14);
  --purple: #d43d31;
  --purple-soft: rgba(212, 61, 49, .16);
  --lime: #ffc35f;
  --danger: #ff4949;
  --warning: #ff9a43;
  --muted: #b9a0a0;
  --line: rgba(255, 160, 139, .16);
  background: linear-gradient(155deg, rgba(28, 3, 3, .34), rgba(10, 2, 3, .91)), url('./themes/dota2-dire-heroes.webp') center top / cover fixed no-repeat;
}

body[data-theme="cs2"] {
  --bg: #070a0c;
  --surface: rgba(13, 18, 21, .94);
  --surface-2: #121a1f;
  --surface-3: #1d2a31;
  --cyan: #59c6e8;
  --cyan-soft: rgba(89, 198, 232, .13);
  --purple: #f29a45;
  --purple-soft: rgba(242, 154, 69, .14);
  --lime: #f5ad52;
  --danger: #ff675d;
  --warning: #ff9d3d;
  --muted: #9eabb3;
  --line: rgba(180, 211, 225, .15);
  background: linear-gradient(180deg, rgba(3, 8, 12, .42), rgba(3, 8, 12, .88)), url('./themes/cs2-operators.webp') center top / cover fixed no-repeat;
}

body[data-theme="cs2-dust2"] {
  --bg: #100d08;
  --surface: rgba(28, 24, 18, .94);
  --surface-2: #282118;
  --surface-3: #3d3224;
  --cyan: #e8c781;
  --cyan-soft: rgba(232, 199, 129, .14);
  --purple: #d78a3e;
  --purple-soft: rgba(215, 138, 62, .15);
  --lime: #f4d97c;
  --danger: #ff6657;
  --warning: #ffb451;
  --muted: #baaE9c;
  --line: rgba(239, 210, 163, .17);
  background: linear-gradient(180deg, rgba(24, 16, 7, .34), rgba(10, 8, 5, .9)), url('./themes/cs2-dust2-operators.webp') center top / cover fixed no-repeat;
}

body[data-theme="cs2-mirage"] {
  --bg: #071014;
  --surface: rgba(11, 25, 31, .94);
  --surface-2: #102630;
  --surface-3: #193a47;
  --cyan: #67d9f2;
  --cyan-soft: rgba(103, 217, 242, .14);
  --purple: #d5ad72;
  --purple-soft: rgba(213, 173, 114, .15);
  --lime: #9ee6c3;
  --danger: #ff7168;
  --warning: #f2bc65;
  --muted: #a5b9bf;
  --line: rgba(158, 215, 228, .16);
  background: linear-gradient(175deg, rgba(4, 20, 28, .32), rgba(3, 10, 14, .9)), url('./themes/cs2-mirage-operators.webp') center top / cover fixed no-repeat;
}

body[data-theme="cs2-inferno"] {
  --bg: #100806;
  --surface: rgba(27, 16, 13, .95);
  --surface-2: #281813;
  --surface-3: #42261b;
  --cyan: #ff9b54;
  --cyan-soft: rgba(255, 155, 84, .14);
  --purple: #cf4836;
  --purple-soft: rgba(207, 72, 54, .16);
  --lime: #ffd16a;
  --danger: #ff574d;
  --warning: #ffad45;
  --muted: #b9aaa3;
  --line: rgba(239, 175, 146, .16);
  background: linear-gradient(165deg, rgba(33, 8, 3, .32), rgba(10, 5, 4, .9)), url('./themes/cs2-inferno-operators.webp') center top / cover fixed no-repeat;
}

body[data-theme^="dota2"]::before,
body[data-theme^="cs2"]::before {
  opacity: .08;
  mask-image: linear-gradient(to bottom, black, transparent 45%);
}

body[data-theme^="dota2"] .stat-card,
body[data-theme^="dota2"] .panel,
body[data-theme^="cs2"] .stat-card,
body[data-theme^="cs2"] .panel {
  background: linear-gradient(145deg, rgba(18, 23, 27, .92), rgba(5, 9, 12, .94));
  backdrop-filter: blur(14px);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .13;
  background-image:
    linear-gradient(rgba(47, 225, 255, .2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 225, 255, .2) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.app-shell { max-width: 1180px; margin: 0 auto; min-height: 100dvh; padding: 0 22px 104px; position: relative; }

.boot-fallback { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; }
.boot-fallback .brand-mark { width: 68px; height: 68px; font-size: 37px; margin-bottom: 5px; }
.boot-fallback strong { direction: ltr; font: 900 24px/1 Arial, sans-serif; letter-spacing: 4px; }
.boot-fallback span { color: var(--muted); font-size: 11px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
  padding: max(18px, env(safe-area-inset-top)) 0 12px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  color: #071019;
  font: 900 25px/1 Arial, sans-serif;
  background: linear-gradient(145deg, var(--cyan), var(--lime));
  clip-path: polygon(15% 0, 100% 0, 100% 70%, 70% 100%, 0 100%, 0 30%);
  box-shadow: 0 0 24px rgba(33, 230, 255, .35);
}
.brand-name { font: 900 18px/1.05 Arial, sans-serif; letter-spacing: 2.4px; }
.brand-sub { color: var(--muted); font-size: 11px; margin-top: 5px; }
.creator-line { color: #73809f; direction: ltr; font: 700 8px/1.4 Arial, sans-serif; letter-spacing: .55px; margin-top: 4px; text-transform: lowercase; }
.creator-line span { color: var(--cyan); text-shadow: 0 0 12px rgba(33, 230, 255, .45); }

.user-chip { display: flex; align-items: center; gap: 10px; background: rgba(17, 24, 49, .72); border: 1px solid var(--line); border-radius: 15px; padding: 7px 8px 7px 12px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--purple-soft); border: 1px solid rgba(155, 108, 255, .28); color: #cbb7ff; font-weight: 900; }
.user-meta { line-height: 1.25; }
.user-meta strong { display: block; font-size: 13px; }
.user-meta span { color: var(--muted); font-size: 10px; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 18px 0 24px; }
.eyebrow { color: var(--cyan); font: 800 10px/1 Arial, sans-serif; letter-spacing: 2px; margin-bottom: 8px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(25px, 5vw, 38px); letter-spacing: -.8px; margin-bottom: 8px; }
h2 { font-size: 19px; margin-bottom: 4px; }
h3 { font-size: 15px; margin-bottom: 4px; }
.subtitle { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.8; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 46px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  background: var(--surface-2);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.btn:active { transform: scale(.97); }
.btn:hover { border-color: rgba(33, 230, 255, .45); }
.btn-primary { background: linear-gradient(135deg, var(--cyan), #71f6dc); border: 0; color: #041017; font-weight: 900; box-shadow: 0 10px 30px rgba(33, 230, 255, .17); }
.btn-purple { background: linear-gradient(135deg, var(--purple), #c078ff); border: 0; font-weight: 800; }
.btn-warning { color: #241403; border-color: transparent; background: linear-gradient(135deg, #ffb13b, #ff8b2c); font-weight: 900; }
.btn-danger { color: #ff8ba5; border-color: rgba(255, 85, 122, .28); background: rgba(255, 85, 122, .08); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 11px; border-radius: 11px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; font-size: 18px; }
.btn:disabled { cursor: not-allowed; opacity: .42; filter: grayscale(.45); transform: none; }
.wide { width: 100%; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .panel {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(18, 25, 51, .94), rgba(9, 13, 30, .94));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stat-card { padding: 19px; min-height: 128px; }
.stat-card::after { content: ''; position: absolute; width: 72px; height: 72px; left: -30px; top: -30px; border: 1px solid currentColor; transform: rotate(45deg); opacity: .15; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--cyan-soft); color: var(--cyan); font-size: 17px; }
.stat-value { font: 900 24px/1.2 Tahoma, sans-serif; margin-top: 20px; }
.stat-foot { color: var(--muted); font-size: 10px; margin-top: 6px; }
.accent-purple .stat-icon { background: var(--purple-soft); color: #c5a9ff; }
.accent-lime .stat-icon { background: rgba(184, 255, 89, .1); color: var(--lime); }
.accent-warning .stat-icon { background: rgba(255, 190, 76, .1); color: var(--warning); }

.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.panel { padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }

.daily-fact { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-top: 16px; padding: 18px 20px; background: linear-gradient(120deg, var(--cyan-soft), rgba(9, 13, 30, .94) 42%, var(--purple-soft)); }
.daily-fact::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,255,255,.035), transparent); transform: translateX(-100%); animation: fact-scan 8s ease-in-out infinite; }
.fact-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: #061016; background: linear-gradient(145deg, var(--cyan), var(--lime)); box-shadow: 0 10px 28px var(--cyan-soft); font-size: 24px; font-weight: 900; }
.fact-copy { min-width: 0; }
.fact-copy .eyebrow { margin-bottom: 6px; }
.fact-copy h2 { margin-bottom: 5px; }
.fact-copy p { margin: 0; color: var(--text); font-size: 12px; line-height: 1.95; }
.fact-date { align-self: start; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; font-size: 9px; white-space: nowrap; }
@keyframes fact-scan { 0%, 65%, 100% { transform: translateX(-100%); } 82% { transform: translateX(100%); } }

.clock-panel { min-height: 318px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; }
.live-time { font: 900 clamp(35px, 6vw, 58px)/1 Arial, sans-serif; letter-spacing: 1px; direction: ltr; }
.live-date { color: var(--muted); font-size: 12px; margin-top: 10px; }
.shift-target { display: grid; gap: 7px; margin-top: 18px; text-align: right; }
.shift-target label { color: var(--muted); font-size: 9px; }
.clock-state { margin-top: 24px; display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pulse.active { background: var(--lime); box-shadow: 0 0 0 6px rgba(184, 255, 89, .1); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 11px rgba(184, 255, 89, 0); } }

.punch-wrap { display: grid; place-items: center; }
.punch-button {
  width: 176px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(33, 230, 255, .48);
  color: var(--text);
  cursor: pointer;
  background: radial-gradient(circle, rgba(33, 230, 255, .15), rgba(9, 18, 34, .96) 66%);
  box-shadow: inset 0 0 30px rgba(33, 230, 255, .12), 0 0 0 10px rgba(33, 230, 255, .04), 0 0 46px rgba(33, 230, 255, .15);
  transition: .22s ease;
}
.punch-button:hover { transform: scale(1.025); }
.punch-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.punch-button.active { border-color: rgba(255, 85, 122, .55); background: radial-gradient(circle, rgba(255, 85, 122, .15), rgba(24, 9, 23, .96) 66%); box-shadow: inset 0 0 30px rgba(255, 85, 122, .12), 0 0 0 10px rgba(255, 85, 122, .04), 0 0 46px rgba(255, 85, 122, .13); }
.punch-button strong { display: block; font-size: 20px; }
.punch-button span { display: block; color: var(--muted); font-size: 10px; margin-top: 7px; }

.record-list { display: grid; gap: 10px; }
.record-row { display: grid; grid-template-columns: minmax(130px, 1.2fr) 1fr 1fr auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(6, 10, 24, .45); }
.record-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.record-person .avatar { width: 34px; height: 34px; flex: 0 0 auto; }
.record-person strong { font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-person span, .record-cell span { color: var(--muted); font-size: 9px; display: block; margin-top: 4px; }
.record-cell strong { font-size: 11px; direction: ltr; display: inline-block; }
.record-actions, .table-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.record-actions { justify-content: flex-end; }
.amount { color: var(--lime); }

.empty { text-align: center; padding: 42px 18px; color: var(--muted); }
.empty-icon { font-size: 38px; opacity: .65; margin-bottom: 12px; }
.empty strong { display: block; color: var(--text); margin-bottom: 7px; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  bottom: max(14px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(650px, calc(100% - 26px));
  display: flex;
  justify-content: space-around;
  padding: 8px;
  border: 1px solid rgba(163, 187, 255, .18);
  border-radius: 22px;
  background: rgba(9, 13, 29, .9);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}
.nav-item { min-width: 64px; border: 0; background: transparent; color: var(--muted); padding: 8px 10px; border-radius: 15px; cursor: pointer; font-size: 9px; }
.nav-item .nav-icon { display: block; font-size: 19px; margin-bottom: 5px; filter: grayscale(1); }
.nav-item.active { background: var(--cyan-soft); color: var(--cyan); }
.nav-item.active .nav-icon { filter: none; }

.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 15px; margin-bottom: 16px; background: rgba(15, 21, 43, .72); border: 1px solid var(--line); border-radius: 18px; }
.period-switch { display: flex; gap: 8px; flex-wrap: wrap; margin: -8px 0 14px; }
.period-switch button { border: 1px solid var(--line); border-radius: 999px; min-height: 35px; padding: 0 14px; color: var(--muted); background: rgba(10, 15, 33, .75); cursor: pointer; font-size: 10px; }
.period-switch button.active { color: #051018; border-color: transparent; background: linear-gradient(135deg, var(--cyan), var(--lime)); font-weight: 900; box-shadow: 0 0 22px rgba(33, 230, 255, .14); }
.field { display: grid; gap: 7px; }
.field label { color: var(--muted); font-size: 10px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); border-radius: 13px; min-height: 46px; color: var(--text); padding: 0 13px; outline: none; background: #0b1023; }
textarea.input { padding-top: 12px; min-height: 82px; resize: vertical; }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(33, 230, 255, .08); }
.input::placeholder { color: #59627d; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 12px 20px, 7px 20px; background-size: 5px 5px; background-repeat: no-repeat; }

.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.employee-card { padding: 18px; }
.employee-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.employee-card .avatar { width: 46px; height: 46px; font-size: 17px; }
.employee-role { color: var(--cyan); font-size: 9px; }
.employee-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0; }
.detail-box { background: rgba(6, 10, 24, .52); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.detail-box span { color: var(--muted); font-size: 9px; display: block; margin-bottom: 6px; }
.detail-box strong { font-size: 11px; }
.employee-actions { display: flex; gap: 8px; }

.archive-filter-panel { margin-bottom: 16px; }
.archive-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.archive-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.archive-summary-grid article { position: relative; overflow: hidden; min-height: 126px; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, var(--cyan-soft), rgba(10, 15, 32, .94) 58%, var(--purple-soft)); box-shadow: var(--shadow); }
.archive-summary-grid article::after { content: ''; position: absolute; width: 88px; height: 88px; left: -42px; top: -42px; border: 1px solid var(--cyan); opacity: .12; transform: rotate(45deg); }
.archive-summary-grid span, .archive-summary-grid small { display: block; color: var(--muted); font-size: 10px; }
.archive-summary-grid strong { display: block; margin: 15px 0 7px; font-size: clamp(18px, 4vw, 27px); }
.archive-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.archive-actions .btn { min-width: 0; }
.archive-records { padding: 0; }
.archive-records > .panel-head { padding: 20px 20px 0; }
.archive-table-wrap { overflow-x: auto; overscroll-behavior-inline: contain; }
.archive-table { width: 100%; min-width: 890px; border-collapse: collapse; direction: rtl; }
.archive-table th { padding: 13px 12px; color: #061219; background: linear-gradient(135deg, var(--lime), var(--cyan)); font-size: 10px; font-weight: 900; text-align: right; white-space: nowrap; }
.archive-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 10px; vertical-align: middle; }
.archive-table tbody tr { background: rgba(6, 10, 24, .25); transition: background .16s ease; }
.archive-table tbody tr:hover { background: var(--cyan-soft); }
.archive-table td strong, .archive-table td small { display: block; }
.archive-table td small { margin-top: 5px; color: var(--muted); font-size: 8px; direction: ltr; }
.archive-table .time-cell { direction: ltr; text-align: right; font-weight: 800; }
.archive-table .check-column { width: 44px; text-align: center; }
.archive-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--cyan); }
.table-actions { min-width: 128px; }
.danger-text { color: #ff829e !important; direction: rtl !important; }
.archive-pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px 20px; color: var(--muted); font-size: 9px; }
.archive-pagination > div { display: flex; align-items: center; gap: 9px; }

.payroll-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; }
.payroll-total { padding: 26px; min-height: 270px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg, rgba(28, 23, 67, .95), rgba(9, 15, 34, .95)); }
.hero-amount { font: 900 clamp(26px, 5vw, 42px)/1.2 Tahoma, sans-serif; color: var(--lime); margin: 12px 0; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini { padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 7, 17, .3); }
.mini span { display: block; color: var(--muted); font-size: 8px; margin-bottom: 5px; }
.mini strong { font-size: 10px; }
.bar-list { display: grid; gap: 16px; }
.bar-head { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 8px; }
.bar-track { height: 8px; border-radius: 999px; background: #080c1b; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--cyan)); box-shadow: 0 0 15px rgba(33, 230, 255, .25); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.setting-list { display: grid; gap: 12px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(5, 9, 22, .4); }
.setting-row p { color: var(--muted); font-size: 10px; margin: 5px 0 0; }
.setting-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.calendar-switch { display: flex; border: 1px solid var(--line); background: #080c1b; border-radius: 12px; padding: 3px; }
.calendar-switch button { border: 0; color: var(--muted); background: transparent; padding: 8px 10px; border-radius: 9px; font-size: 10px; cursor: pointer; }
.calendar-switch button.active { color: var(--text); background: var(--surface-3); }

.theme-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.theme-option { position: relative; min-width: 0; overflow: hidden; padding: 0 0 10px; color: var(--text); text-align: right; border: 1px solid var(--line); border-radius: 14px; background: rgba(5, 9, 20, .6); cursor: pointer; }
.theme-option.active { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan-soft); }
.theme-preview { display: block; height: 74px; margin-bottom: 9px; background: radial-gradient(circle at 20% 20%, #21e6ff, transparent 36%), radial-gradient(circle at 80% 20%, #9b6cff, transparent 34%), #060915; background-size: cover; background-position: center; }
.theme-dota2 .theme-preview { background-image: linear-gradient(rgba(3, 5, 7, .1), rgba(3, 5, 7, .5)), url('./themes/dota2-heroes.webp'); }
.theme-dota2-radiant .theme-preview { background-image: linear-gradient(rgba(2, 29, 20, .04), rgba(2, 29, 20, .5)), url('./themes/dota2-radiant-heroes.webp'); }
.theme-dota2-dire .theme-preview { background-image: linear-gradient(rgba(35, 2, 2, .04), rgba(35, 2, 2, .5)), url('./themes/dota2-dire-heroes.webp'); }
.theme-cs2 .theme-preview { background-image: linear-gradient(rgba(3, 5, 7, .08), rgba(3, 5, 7, .48)), url('./themes/cs2-operators.webp'); }
.theme-cs2-dust2 .theme-preview { background-image: linear-gradient(rgba(42, 28, 10, .04), rgba(42, 28, 10, .5)), url('./themes/cs2-dust2-operators.webp'); }
.theme-cs2-mirage .theme-preview { background-image: linear-gradient(rgba(2, 25, 35, .04), rgba(2, 25, 35, .5)), url('./themes/cs2-mirage-operators.webp'); }
.theme-cs2-inferno .theme-preview { background-image: linear-gradient(rgba(40, 8, 2, .04), rgba(40, 8, 2, .5)), url('./themes/cs2-inferno-operators.webp'); }
.theme-option strong, .theme-option small { display: block; padding: 0 10px; }
.theme-option strong { font-size: 11px; }
.theme-option small { color: var(--muted); font-size: 8px; line-height: 1.6; margin-top: 3px; }
.theme-option i { position: absolute; top: 7px; left: 7px; padding: 4px 6px; border-radius: 999px; color: #071019; background: var(--cyan); font: normal 800 8px/1 Tahoma, sans-serif; }

.settings-span { grid-column: 1 / -1; }
.about-panel { background: linear-gradient(145deg, rgba(17, 28, 52, .96), rgba(8, 12, 26, .96)); }
.about-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.about-brand .brand-mark { flex: 0 0 auto; }
.about-brand strong, .about-brand span { display: block; }
.about-brand strong { direction: ltr; text-align: right; font: 900 14px/1.5 Arial, sans-serif; letter-spacing: .5px; }
.about-brand span { color: var(--muted); font-size: 9px; margin-top: 4px; }
.about-contact { margin-top: 2px; }
.contact-email { direction: ltr; text-align: right; word-break: break-all; color: var(--cyan) !important; font-family: Arial, sans-serif; letter-spacing: .2px; }
.about-note { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }

.auth-shell { min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; }
.auth-shell::after { content: 'PARADISE'; position: fixed; bottom: -18px; left: -12px; font: 900 clamp(64px, 22vw, 190px)/1 Arial, sans-serif; color: rgba(118, 171, 255, .025); letter-spacing: 6px; pointer-events: none; }
.auth-card { width: min(450px, 100%); position: relative; z-index: 2; border: 1px solid rgba(33, 230, 255, .2); border-radius: 28px; padding: 28px; background: rgba(9, 13, 30, .92); box-shadow: var(--shadow), 0 0 60px rgba(33, 230, 255, .07); overflow: hidden; }
.auth-card::before { content: ''; position: absolute; height: 3px; left: 15%; right: 15%; top: 0; background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .brand-mark { margin: 0 auto 15px; width: 66px; height: 66px; font-size: 36px; }
.auth-logo h1 { font: 900 25px/1 Arial, sans-serif; letter-spacing: 4px; margin-bottom: 8px; }
.auth-logo p { color: var(--muted); font-size: 11px; }
.auth-logo .creator-line { margin: -1px 0 13px; font-size: 9px; }
.auth-form { display: grid; gap: 14px; }
.account-list { display: grid; gap: 8px; max-height: 240px; overflow: auto; padding-left: 4px; margin-bottom: 16px; }
.account-option { display: flex; width: 100%; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 14px; background: #0b1023; color: var(--text); padding: 10px; cursor: pointer; text-align: right; }
.account-option.selected { border-color: var(--cyan); background: var(--cyan-soft); }
.account-option .meta { flex: 1; }
.account-option strong { display: block; font-size: 12px; }
.account-option span { color: var(--muted); font-size: 9px; }
.pin-input { text-align: center; direction: ltr; letter-spacing: 12px; font-size: 22px; font-weight: 900; padding-right: 24px; }
.auth-note { text-align: center; color: var(--muted); font-size: 9px; margin: 15px 0 0; line-height: 1.7; }

.modal-backdrop { position: fixed; z-index: 80; inset: 0; padding: 18px; display: grid; place-items: center; background: rgba(1, 3, 10, .78); backdrop-filter: blur(8px); }
.confirm-layer { z-index: 140; }
.confirm-dialog { width: min(430px, 100%); }
.confirm-message { color: var(--muted); line-height: 1.9; margin: 0; }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 36px); overflow: auto; border: 1px solid rgba(163, 187, 255, .2); border-radius: 24px; background: #0b1022; box-shadow: 0 32px 90px rgba(0, 0, 0, .7); }
.modal-head { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); background: rgba(11, 16, 34, .95); backdrop-filter: blur(10px); }
.form-status { min-height: 20px; padding: 0 2px; color: #ff7d9c; font-size: 11px; }
.form-status.pending { color: var(--cyan); }
.record-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; border: 1px solid rgba(85, 255, 209, .2); border-radius: 14px; background: rgba(85, 255, 209, .06); }
.record-preview > div { display: grid; gap: 5px; }
.record-preview span { color: var(--muted); font-size: 9px; }
.record-preview strong { font-size: 11px; }
.record-preview small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; line-height: 1.7; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.hint { color: var(--muted); font-size: 9px; line-height: 1.7; }
.export-help > p { color: var(--muted); font-size: 10px; line-height: 1.8; }
.export-content { min-height: 220px !important; direction: ltr; text-align: left; font: 11px/1.7 monospace !important; }
.export-file-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--cyan-soft); direction: ltr; }
.export-file-card strong { overflow-wrap: anywhere; font-size: 10px; }
.export-file-card span { color: var(--muted); font-size: 9px; white-space: nowrap; }

.toast { position: fixed; z-index: 120; left: 50%; bottom: 98px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; min-width: 220px; max-width: calc(100% - 32px); text-align: center; padding: 13px 18px; border-radius: 13px; color: var(--text); background: #18213d; border: 1px solid var(--line); box-shadow: var(--shadow); transition: .25s ease; font-size: 11px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { border-color: rgba(184, 255, 89, .35); }
.toast.error { border-color: rgba(255, 85, 122, .38); }

.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 9px; background: var(--cyan-soft); color: var(--cyan); }
.badge.success { background: rgba(184, 255, 89, .1); color: var(--lime); }
.badge.danger { background: rgba(255, 85, 122, .1); color: #ff829e; }
.muted { color: var(--muted); }
.ltr { direction: ltr; }
.hidden { display: none !important; }

@media (max-width: 850px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid, .payroll-layout, .settings-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .archive-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .archive-actions { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .app-shell { padding: 0 14px 100px; }
  .topbar { min-height: 78px; }
  .brand-sub, .user-meta { display: none; }
  .brand .creator-line { margin-top: 3px; }
  .page-head { align-items: start; flex-direction: column; margin-top: 12px; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 112px; padding: 15px; }
  .stat-value { font-size: 18px; margin-top: 16px; }
  .clock-panel { grid-template-columns: 1fr; text-align: center; padding: 24px 16px; }
  .clock-state { margin-top: 17px; }
  .punch-button { width: 150px; }
  .record-row { grid-template-columns: 1fr auto; }
  .record-cell:nth-of-type(2) { display: none; }
  .record-cell { text-align: left; }
  .record-actions { grid-column: 1 / -1; justify-content: stretch; }
  .record-actions .btn { flex: 1; }
  .filters { grid-template-columns: 1fr 1fr; }
  .archive-filters { grid-template-columns: 1fr 1fr; }
  .archive-summary-grid { grid-template-columns: 1fr; gap: 9px; }
  .archive-summary-grid article { min-height: 104px; }
  .archive-actions { grid-template-columns: 1fr; }
  .archive-pagination { align-items: stretch; flex-direction: column; }
  .archive-pagination > div { justify-content: space-between; }
  .team-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .record-preview { grid-template-columns: 1fr 1fr; }
  .record-preview small { grid-column: 1 / -1; }
  .theme-picker { grid-template-columns: 1fr; }
  .daily-fact { grid-template-columns: auto 1fr; align-items: start; padding: 16px; }
  .fact-date { grid-column: 2; }
  .about-contact { align-items: stretch; flex-direction: column; }
  .about-contact .btn { width: 100%; }
  .mini-grid { grid-template-columns: 1fr 1fr; }
  .bottom-nav { overflow-x: auto; justify-content: start; direction: rtl; }
  .nav-item { flex: 1 0 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
