:root {
  --bg: #eef2f7;
  --bg-gradient: radial-gradient(circle at 22% 8%, rgba(79, 70, 229, 0.12), transparent 38%), linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  --panel: #ffffff;
  --panel-muted: #f8fafc;
  --sidebar-bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --border: #e2e8f0;
  --inactive-row-bg: #f1f5f9;
  --row-hover-bg: rgba(79, 70, 229, 0.05);
  --card-shadow: 0 20px 30px -28px rgb(15 23 42 / 0.65), 0 2px 5px rgb(15 23 42 / 0.08);
  --flash-success-bg: #dcfce7;
  --flash-success-text: #166534;
  --flash-info-bg: #e0f2fe;
  --flash-info-text: #075985;
  --flash-warning-bg: #fef9c3;
  --flash-warning-text: #854d0e;
  --flash-danger-bg: #fee2e2;
  --flash-danger-text: #991b1b;
}
:root[data-theme="dark"] {
  --bg: #0f172a;
  --bg-gradient: radial-gradient(circle at 22% 8%, rgba(99, 102, 241, 0.22), transparent 42%), linear-gradient(180deg, #111827 0%, #0f172a 100%);
  --panel: #1e293b;
  --panel-muted: #162231;
  --sidebar-bg: #0f172a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --danger: #f87171;
  --danger-hover: #ef4444;
  --border: #334155;
  --inactive-row-bg: #1f2b3b;
  --row-hover-bg: rgba(99, 102, 241, 0.16);
  --card-shadow: 0 16px 30px -26px rgb(15 23 42 / 0.85), 0 2px 6px rgb(15 23 42 / 0.34);
  --flash-success-bg: #14532d;
  --flash-success-text: #dcfce7;
  --flash-info-bg: #0c4a6e;
  --flash-info-text: #e0f2fe;
  --flash-warning-bg: #78350f;
  --flash-warning-text: #fef3c7;
  --flash-danger-bg: #7f1d1d;
  --flash-danger-text: #fee2e2;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg-gradient);
}
a {
  color: var(--accent);
  text-decoration: none;
}
header {
  padding: 1rem 1.5rem;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
}
.brand-link::before {
  content: "BT";
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .85rem;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.nav-toggle-btn {
  display: none;
  width: 2.45rem;
  height: 2.45rem;
  min-width: 2.45rem;
  padding: .35rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  align-items: center;
  justify-content: center;
  gap: .24rem;
  flex-direction: column;
}
.nav-toggle-btn span {
  display: block;
  width: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  border: 0;
  background: rgba(2, 6, 23, 0.34);
  padding: 0;
}
header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}
header nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .5rem .85rem;
  font-weight: 600;
  transition: all .15s ease;
}
header nav .nav-link .nav-link-label {
  line-height: 1.1;
}
header nav .nav-link .nav-link-icon {
  width: 1.18rem;
  height: 1.18rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  flex-shrink: 0;
  opacity: 1;
}
header nav .nav-link .nav-link-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
header nav .nav-link:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--panel);
}
header nav .nav-link.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  box-shadow: 0 10px 22px -16px rgba(79, 70, 229, 0.85);
}
header nav .nav-link.is-active .nav-link-icon {
  opacity: 1;
}
:root[data-theme="light"] header nav .nav-link {
  color: #334155;
}
:root[data-theme="light"] header nav .nav-link .nav-link-icon {
  color: #64748b;
}
:root[data-theme="light"] header nav .nav-link:hover .nav-link-icon {
  color: #334155;
}
:root[data-theme="light"] header nav .nav-link.is-active .nav-link-icon {
  color: #eef2ff;
}
header nav .nav-logout-form {
  display: block;
  margin: 0;
}
header nav .nav-logout-form button {
  width: auto;
}
header nav .nav-logout-form .nav-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .52rem;
}
header nav .nav-user-card {
  display: flex;
  align-items: center;
  gap: .68rem;
  padding: .72rem .78rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-muted);
  margin-top: .72rem;
}
.nav-user-avatar {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
  flex-shrink: 0;
}
.nav-user-meta {
  min-width: 0;
}
.nav-user-name {
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-user-role {
  font-size: .7rem;
  line-height: 1.2;
  margin-top: .14rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
  color: var(--muted);
}
main {
  max-width: none;
  margin: 0;
  padding: 1rem;
}
body.layout-guest main {
  max-width: 680px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
}
.card h1, .card h2 { margin-top: 0; }
.inline {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
}
.inline input[type="text"] {
  width: auto;
  min-width: 12rem;
}
.card > nav.inline {
  display: inline-flex;
  gap: .35rem;
  background: var(--panel-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .3rem;
}
.card > nav.inline a {
  margin: 0;
  border-radius: 10px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--muted);
  padding: .45rem .85rem;
  border: 1px solid transparent;
}
.card > nav.inline a:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--panel);
}
.card > nav.inline a.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6366f1);
}
label { display: block; font-weight: 600; margin-top: .7rem; margin-bottom: .25rem; }
input:not([type="checkbox"]):not([type="radio"]), select, button, textarea {
  width: 100%;
  padding: .6rem .72rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input[type="checkbox"], input[type="radio"] {
  width: auto;
  accent-color: var(--accent);
}
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}
button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  font-weight: 600;
  border-color: transparent;
}
button:hover {
  background: linear-gradient(135deg, var(--accent-hover), #6366f1);
}
button.secondary {
  background: var(--panel-muted);
  border: 1px solid var(--border);
  color: var(--muted);
}
button.secondary:hover {
  color: var(--text);
  background: var(--panel);
}
button.danger {
  background: linear-gradient(135deg, var(--danger), #f87171);
}
button.danger:hover {
  background: linear-gradient(135deg, var(--danger-hover), #f87171);
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: .62rem .72rem;
  border-bottom: 1px solid var(--border);
}
thead th {
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel-muted);
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover td {
  background: var(--row-hover-bg);
}
.inactive-employees-accordion {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .55rem .7rem;
  background: var(--panel-muted);
}
.inactive-employees-accordion summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}
.employee-row-inactive {
  color: var(--muted);
  background: var(--inactive-row-bg);
  filter: grayscale(.2);
}
.employee-row-inactive a { color: var(--muted); }
.flash {
  padding: .64rem .8rem;
  margin-bottom: .8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.flash.success { background: var(--flash-success-bg); color: var(--flash-success-text); }
.flash.info { background: var(--flash-info-bg); color: var(--flash-info-text); }
.flash.warning { background: var(--flash-warning-bg); color: var(--flash-warning-text); }
.flash.danger { background: var(--flash-danger-bg); color: var(--flash-danger-text); }
.actions { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: .5rem; }
.month-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
}
.month-nav-btn {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-muted);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}
.month-nav-btn:hover {
  background: var(--row-hover-bg);
}
.month-nav-btn.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.month-nav-btn.is-disabled:hover {
  background: var(--panel-muted);
}
.month-nav-label {
  min-width: 8.5rem;
  text-align: center;
}
.hours-card {
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}
.hours-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.hours-filter {
  margin-top: .9rem;
  margin-bottom: .9rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-muted);
}
.hours-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .65rem;
  align-items: end;
}
.hours-filter-grid label {
  font-size: .8rem;
}
.hours-filter-actions {
  display: flex;
}
.hours-filter-actions button {
  width: 100%;
}
.hours-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: .95rem;
}
.hours-summary-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-muted);
  padding: .75rem;
}
.hours-summary-card p {
  margin: 0;
}
.hours-summary-card strong {
  display: inline-block;
  margin-top: .35rem;
  font-size: 1.3rem;
  letter-spacing: -.01em;
}
.hours-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .2rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 700;
}
.hours-status.is-open {
  border-color: #d97706;
  background: #fef3c7;
  color: #92400e;
}
.hours-status.is-closed {
  border-color: #16a34a;
  background: #dcfce7;
  color: #166534;
}
.hours-calendar-card {
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}
.hours-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .4rem;
}
.hours-calendar-weekday {
  padding: .45rem .3rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-muted);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.hours-calendar-cell {
  min-height: 70px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--panel);
}
.hours-calendar-cell.is-empty {
  background: transparent;
  border-style: dashed;
  opacity: .5;
}
.hours-calendar-cell.has-events {
  background: var(--panel-muted);
}
.hours-calendar-cell.is-open {
  border-color: #f59e0b;
}
.hours-calendar-cell.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.hours-calendar-day {
  font-size: .82rem;
  color: var(--muted);
}
.hours-calendar-net {
  font-size: .84rem;
  font-weight: 700;
}
.today-card {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  color: #e2e8f0;
  border-radius: 24px;
  border-color: rgba(129, 140, 248, 0.28);
  background:
    radial-gradient(circle at 10% -15%, rgba(79, 70, 229, 0.32), transparent 48%),
    radial-gradient(circle at 92% -18%, rgba(14, 165, 233, 0.2), transparent 45%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.94));
}
.today-card .muted {
  color: #94a3b8;
}
.today-card .today-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.today-card .today-hero-copy h1 {
  margin: 0;
  font-size: 2.05rem;
  letter-spacing: -.02em;
}
.today-card .today-hero-copy .muted {
  margin: .35rem 0 0;
  font-size: 1.03rem;
  color: #94a3b8;
}
.today-card .today-hero-time {
  min-width: 225px;
  text-align: right;
}
.today-card .today-hero-clock {
  font-size: 3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.today-card .today-hero-date {
  margin-top: .3rem;
  color: #a5b4fc;
  font-weight: 600;
  text-transform: capitalize;
}
.today-card .work-balance-card {
  margin-top: .35rem;
  padding: .95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.5);
}
.today-card .work-balance-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
}
.today-card .work-balance-top h3 {
  margin: 0;
  font-size: 1.02rem;
}
.today-card .work-balance-pill {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .45rem;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
}
.today-card .work-balance-grid {
  margin-top: .85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.today-card .work-balance-item {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.46);
  border-radius: 12px;
  padding: .65rem .75rem;
}
.today-card .work-balance-item p {
  margin: 0;
  font-size: .82rem;
}
.today-card .work-balance-item strong {
  display: block;
  margin-top: .2rem;
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}
.today-card .kiosk-toolbar {
  width: 100%;
  position: relative;
  margin-top: 1rem;
}
.today-card .theme-toggle {
  position: absolute;
  right: 0;
  top: .25rem;
}
.today-card .balance-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  padding-right: 3.15rem;
}
.today-card .balance-card {
  padding: .9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.45);
}
.today-card .balance-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}
.today-card .balance-card-top h3 {
  margin: 0;
  font-size: 1.06rem;
}
.today-card .balance-card-total {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .45rem;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
}
.today-card .balance-card-number {
  margin: .65rem 0 .6rem;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.today-card .balance-card-number span {
  font-size: .97rem;
  font-weight: 500;
  color: #94a3b8;
}
.today-card .balance-meter {
  height: .36rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
  overflow: hidden;
}
.today-card .balance-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #818cf8);
}
.today-card .balance-card.personal-days .balance-meter span {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}
.today-card .balance-card.extra-days .balance-meter span {
  background: linear-gradient(90deg, #14b8a6, #22d3ee);
}
.today-card .punch-group {
  width: 100%;
  margin: 1rem 0 0;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(100, 116, 139, 0.42);
  background: rgba(15, 23, 42, 0.56);
}
.today-card .punch-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .85rem;
}
.today-card .punch-state-current {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.today-card .state-dot {
  width: .72rem;
  height: .72rem;
  border-radius: 999px;
}
.today-card .state-dot.is-in {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}
.today-card .state-dot.is-out {
  background: #64748b;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.22);
}
.today-card .punch-state-current .muted {
  display: block;
}
.today-card .punch-state-current strong {
  display: block;
  margin-top: .15rem;
  font-size: 1.3rem;
  color: #dbeafe;
}
.today-card .absence-link-inline {
  color: #818cf8;
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
}
.today-card .absence-link-inline:hover {
  color: #a5b4fc;
}
.today-card .punch-actions {
  max-width: none;
  width: 100%;
  grid-template-columns: 1fr;
  gap: .7rem;
}
.today-card .punch-actions form {
  width: 100%;
}
.today-card .punch-actions .kiosk-btn {
  width: 100%;
  min-height: 7rem;
  border-radius: 16px;
  border: 1px solid rgba(100, 116, 139, 0.45);
  background: rgba(15, 23, 42, 0.42);
  color: #cbd5e1;
  font-size: 2rem;
}
.today-card .punch-actions .kiosk-btn .kiosk-icon {
  margin-bottom: .2rem;
}
.today-card .punch-actions .kiosk-icon svg {
  width: 2.45rem;
  height: 2.45rem;
}
.today-card .kiosk-btn.in {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(129, 140, 248, 0.42);
  color: #c7d2fe;
}
.today-card .kiosk-btn.in.is-highlight-entry {
  background: linear-gradient(135deg, #4f46e5, #5b4fe8);
  border-color: rgba(167, 180, 255, 0.7);
  color: #fff;
  box-shadow: 0 14px 28px -18px rgba(99, 102, 241, 0.9);
}
.today-card .kiosk-btn.in.is-highlight-entry .kiosk-icon {
  color: #fff;
}
.today-card .kiosk-btn.out {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fda4af;
}
.today-card .kiosk-btn.out .kiosk-icon {
  color: #ef4444;
}
.today-card .kiosk-btn.is-dimmed {
  opacity: .5;
}
.today-card .punch-group-tools {
  margin-top: .75rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}
.today-card .punch-group-tools .pause-form {
  margin: 0;
}
.today-card .punch-group-tools .pause-form button {
  width: 100%;
}
.today-card .punch-group-tools .report-btn {
  width: 100%;
  justify-content: center;
  margin: 0;
  font-size: 1.5rem;
  border: 1px solid rgba(71, 85, 105, 0.62);
  background: rgba(15, 23, 42, 0.38);
  color: #e2e8f0;
}
.today-card .punch-group-tools .report-btn:hover {
  border-color: rgba(100, 116, 139, 0.8);
  background: rgba(30, 41, 59, 0.52);
  color: #f8fafc;
}
.today-card .report-btn-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
}
.today-card .report-btn-icon svg {
  width: 100%;
  height: 100%;
}
.today-card .punch-group-tools .report-btn .report-btn-icon {
  color: #fb7185;
}
.today-card .punch-pause-btn {
  min-height: 3.3rem;
  font-size: 1.5rem;
  padding: .72rem .88rem;
}
.today-card .punch-pause-btn.pause {
  border: 1px solid #fbbf24;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}
.today-card .punch-pause-btn.pause .kiosk-icon {
  color: #fbbf24;
}
.today-card .punch-pause-btn.resume {
  border: 1px solid #fbbf24;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}
.today-card .punch-pause-btn.resume .kiosk-icon {
  color: #fbbf24;
}
.today-card .punch-group-meta {
  margin-top: .7rem;
  display: flex;
  justify-content: space-between;
  gap: .65rem;
  flex-wrap: wrap;
}
.today-card .punch-group-meta p {
  margin: 0;
}
.today-card .kiosk-history {
  width: 100%;
  margin: 1rem 0 0;
  text-align: left;
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 18px;
  padding: .95rem 1rem;
  background: rgba(15, 23, 42, 0.52);
}
.today-card .kiosk-history h3 {
  margin: 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.today-card .kiosk-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.today-card .kiosk-history-head a {
  color: #94a3b8;
  font-size: .92rem;
}
.today-card .kiosk-history-head a:hover {
  color: #cbd5e1;
}
.today-card .history-title-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: inline-flex;
  color: #8b93ff;
}
.today-card .history-title-icon svg {
  width: 100%;
  height: 100%;
}
.today-card .history-feed {
  list-style: none;
  margin: .7rem 0 0;
  padding: 0;
  position: relative;
}
.today-card .history-feed::before {
  content: "";
  position: absolute;
  left: 1.12rem;
  top: .38rem;
  bottom: .4rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.85) 0%, rgba(71, 85, 105, 0.8) 75%, rgba(71, 85, 105, 0) 100%);
}
.today-card .history-feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .42rem 0 .42rem 2.95rem;
  position: relative;
}
.today-card .history-feed-left {
  display: block;
  min-width: 0;
}
.today-card .history-feed-left strong {
  display: block;
  line-height: 1.05;
}
.today-card .history-feed-left span {
  display: block;
  font-size: .82rem;
  color: #94a3b8;
}
.today-card .history-event-icon {
  width: 2.08rem;
  height: 2.08rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
  position: absolute;
  left: .08rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  border: 3px solid rgba(15, 23, 42, 0.92);
}
.today-card .history-event-icon svg {
  width: .95rem;
  height: .95rem;
  display: block;
  color: #fff;
}
.today-card .history-event-icon.is-in svg {
  transform: translateX(.06rem);
}
.today-card .history-event-icon.is-in {
  background: #22c55e;
  color: #fff;
}
.today-card .history-event-icon.is-out {
  background: #f43f5e;
  color: #fff;
}
.today-card .history-event-icon.is-out svg {
  width: .78rem;
  height: .78rem;
}
.today-card .history-feed-right {
  text-align: right;
}
.today-card .history-feed-right strong {
  display: block;
  line-height: 1.05;
}
.today-card .history-feed-right span {
  display: block;
  font-size: .8rem;
  color: #94a3b8;
}
.muted { color: var(--muted); }
.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  cursor: help;
}

.kiosk-card { max-width: 620px; }
.kiosk-clock-wrap { margin-top: .25rem; margin-bottom: 1rem; }
.kiosk-clock { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.balance-table-wrap {
  width: min(100%, 640px);
  margin: 0 auto .55rem;
}
.absence-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .55rem;
  padding: .42rem .85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--text);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
}
.absence-link-btn:hover {
  border-color: var(--accent);
  background: var(--panel);
  color: var(--accent);
}
.balance-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  font-size: .84rem;
}
.balance-table th,
.balance-table td {
  padding: .3rem .45rem;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.balance-table thead th {
  background: var(--panel-muted);
  font-size: .77rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.balance-table tbody tr:last-child td {
  border-bottom: 0;
}
.balance-table th:first-child,
.balance-table td:first-child {
  text-align: left;
}
.balance-table th:not(:first-child),
.balance-table td:not(:first-child) {
  text-align: center;
  white-space: nowrap;
}
.kiosk-btn.in { background: linear-gradient(135deg, var(--accent), #6366f1); }
.kiosk-btn.out { background: linear-gradient(135deg, var(--danger), #f87171); }
.kiosk-btn.pause { background: #f59e0b; color: #2f2400; }
.kiosk-btn.resume { background: linear-gradient(135deg, var(--accent), #6366f1); }
.kiosk-btn.is-dimmed { opacity: .55; }
.kiosk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .95rem 1.1rem;
  font-size: 1.8rem;
  font-weight: 700;
}
.punch-actions { max-width: 560px; }
.kiosk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kiosk-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke-width: 2.4;
}
.kiosk-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.theme-toggle { display: inline-flex; gap: .35rem; }
.theme-btn {
  width: auto;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: .45rem .62rem;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
#theme-toggle-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: inline-flex;
}
#theme-toggle-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.status-pill { padding: .15rem .45rem; border-radius: 999px; color: #fff; font-size: .85rem; }
.status-pill.status-in { background: linear-gradient(135deg, var(--accent), #6366f1); }
.status-pill.status-out { background: linear-gradient(135deg, var(--danger), #f87171); }
.kiosk-history ul { margin: .4rem 0 0; }
.kiosk-history li { margin-bottom: .25rem; }
.kiosk-history ul {
  list-style: none;
  padding-left: 0;
}
:root[data-theme="light"] .today-card {
  border-color: rgba(129, 140, 248, 0.34);
  box-shadow: 0 28px 42px -34px rgba(15, 23, 42, 0.72), 0 10px 24px -20px rgba(99, 102, 241, 0.7);
}
:root[data-theme="light"] .today-card .balance-card,
:root[data-theme="light"] .today-card .punch-group,
:root[data-theme="light"] .today-card .kiosk-history {
  background: rgba(15, 23, 42, 0.6);
}
:root[data-theme="light"] .today-card .theme-btn {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.2);
  color: #cbd5e1;
}

.report-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(79, 70, 229, 0.4);
  margin: 1rem auto 0;
}

.report-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 20;
}

.report-modal.is-open { display: flex; }

.report-modal-content {
  width: min(100%, 620px);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.report-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}

.close-modal-btn {
  width: auto;
  border-radius: 999px;
  padding: .3rem .65rem;
  font-size: 1.15rem;
  background: transparent;
  color: var(--muted);
}

.incident-type-btn {
  margin-top: .55rem;
  font-weight: 700;
}

.incident-type-btn.manual { background: #facc15; color: #3f2e00; }
.incident-type-btn.wrong { background: #dc2626; }
.incident-type-btn.other { background: #2563eb; }

.incident-form {
  margin-top: .75rem;
  padding: .8rem;
  border: 1px dashed var(--border);
  border-radius: 9px;
  display: none;
}

.incident-form.is-visible { display: block; }

.incident-form textarea {
  min-height: 120px;
  resize: vertical;
}

.incident-actions {
  margin-top: .8rem;
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
}

.incident-actions button {
  width: auto;
  min-width: 110px;
}

.incident-cancel {
  background: transparent;
  border: 1px solid #f59e0b;
  color: #f59e0b;
}

.incident-send { background: #15803d; }

body.layout-auth header {
  position: sticky;
  top: 0;
  z-index: 70;
  width: auto;
  border-right: 0;
  border-bottom: 1px solid var(--border);
  flex-direction: row;
  align-items: center;
  padding: .95rem 1rem;
}
body.layout-auth header > div {
  padding: 0;
}
body.layout-auth .brand-link {
  font-size: 1.6rem;
}
body.layout-auth .brand-link::before {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: .7rem;
  font-size: .62rem;
}
body.layout-auth header nav {
  flex-direction: row;
  align-items: center;
  gap: .35rem;
}
body.layout-auth header nav .nav-link {
  width: auto;
  border-radius: 999px;
  padding: .44rem .72rem;
  font-size: .9rem;
}
body.layout-auth header nav .nav-logout-form {
  margin-top: 0;
}
body.layout-auth header nav .nav-logout-form button {
  width: auto;
  border-radius: 999px;
  padding: .44rem .72rem;
}
body.layout-auth main {
  margin-left: 0;
  padding: 1rem;
}
body.layout-auth main > .flash,
body.layout-auth main > .card {
  width: min(100%, 900px);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 980px) {
  body.has-mobile-nav header {
    justify-content: space-between;
  }
  body.has-mobile-nav .nav-toggle-btn {
    display: inline-flex;
    margin-left: auto;
  }
  body.has-mobile-nav header nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 80;
    width: min(86vw, 320px);
    padding: 1rem;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    box-shadow: 0 20px 40px -30px rgba(15, 23, 42, 0.75);
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: .3rem;
    transform: translateX(-104%);
    transition: transform .2s ease;
    overflow-y: auto;
  }
  body.has-mobile-nav header nav .nav-link {
    width: 100%;
    border-radius: 14px;
    padding: .78rem .92rem;
    font-size: 1rem;
    font-weight: 700;
  }
  body.has-mobile-nav header nav .nav-logout-form {
    width: 100%;
    margin-top: .65rem;
  }
  body.has-mobile-nav header nav .nav-logout-form button {
    width: 100%;
    border-radius: 14px;
    padding: .78rem .92rem;
  }
  body.has-mobile-nav.nav-open {
    overflow: hidden;
  }
  body.has-mobile-nav.nav-open header nav {
    transform: translateX(0);
  }
  body.has-mobile-nav.nav-open .mobile-nav-overlay {
    display: block;
  }
}

@media (max-width: 680px) {
  .hours-filter-grid {
    grid-template-columns: 1fr;
  }
  .hours-summary-grid {
    grid-template-columns: 1fr;
  }
  .hours-calendar-grid {
    gap: .28rem;
  }
  .hours-calendar-cell {
    min-height: 58px;
    padding: .35rem;
  }
  .today-card .today-hero {
    flex-direction: column;
    gap: .7rem;
  }
  .today-card .today-hero-time {
    min-width: 0;
    text-align: left;
  }
  .today-card .today-hero-clock {
    font-size: 2.2rem;
  }
  .today-card .kiosk-toolbar {
    display: flex;
    flex-direction: column;
    gap: .65rem;
  }
  .today-card .theme-toggle {
    position: static;
    justify-content: flex-end;
  }
  .today-card .balance-cards {
    grid-template-columns: 1fr;
    padding-right: 0;
  }
  .today-card .work-balance-grid {
    grid-template-columns: 1fr;
  }
  .today-card .punch-group-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .today-card .punch-group-meta {
    justify-content: flex-start;
  }
}

@media (min-width: 681px) {
  .today-card .balance-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .today-card .punch-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .today-card .punch-group-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .month-nav-btn {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1.2rem;
  }
}

@media (min-width: 981px) {
  .today-card .balance-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 981px) {
  .nav-toggle-btn,
  .mobile-nav-overlay {
    display: none !important;
  }
  body.layout-auth header {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 262px;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.6rem 1.1rem;
  }
  body.layout-auth header > div {
    padding: 0 .5rem .75rem;
  }
  body.layout-auth .brand-link {
    font-size: 2rem;
  }
  body.layout-auth .brand-link::before {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: .85rem;
    font-size: .72rem;
  }
  body.layout-auth header nav {
    flex-direction: column;
    align-items: stretch;
    gap: .28rem;
  }
  body.layout-auth header nav .nav-link {
    width: 100%;
    border-radius: 14px;
    padding: .78rem .92rem;
    font-size: 1rem;
    font-weight: 700;
  }
  body.layout-auth header nav .nav-logout-form {
    margin-top: .65rem;
    width: 100%;
  }
  body.layout-auth header nav .nav-logout-form button {
    width: 100%;
    border-radius: 14px;
    padding: .78rem .92rem;
  }
  body.layout-auth main {
    margin-left: 262px;
    padding: 1.35rem 1.6rem 2.2rem;
  }
  body.layout-auth main > .flash,
  body.layout-auth main > .card {
    width: min(100%, 980px);
  }
}

