/* ============================================================
   SILHOUETTE UK — Attendance & Production Control System
   Built by ZULFIQAR AI LAB
   Design system: AMOLED black / signature 208h duty ring
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Core surface */
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-card: #0d0d0d;
  --bg-card-hover: #131313;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.58);
  --text-faint: rgba(255, 255, 255, 0.32);

  /* State colors */
  --green: #00e676;
  --green-dim: rgba(0, 230, 118, 0.14);
  --red: #ff3b3b;
  --red-dim: rgba(255, 59, 59, 0.14);
  --amber: #ffb300;
  --amber-dim: rgba(255, 179, 0, 0.14);
  --blue: #2196f3;
  --blue-dim: rgba(33, 150, 243, 0.14);
  --violet: #a06bff;
  --violet-dim: rgba(160, 107, 255, 0.14);

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --sidebar-w: 248px;
  --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.03);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
}

::selection {
  background: var(--green);
  color: #000;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 10px;
}

/* Ambient grid background texture */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ============ LAYOUT SHELL ============ */
.shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 24px 16px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed State */
.sidebar.collapsed {
  width: 76px;
  padding: 24px 10px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-chip .who,
.sidebar.collapsed .logout-text {
  display: none;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0;
  width: 42px;
  height: 42px;
  margin: 0 auto 8px auto;
}

.sidebar.collapsed .user-chip {
  justify-content: center;
  padding: 8px 0;
  margin-bottom: 8px;
}

.sidebar.collapsed .logout-btn {
  justify-content: center;
  border: none;
  padding: 0;
  width: 42px;
  height: 42px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.03);
}

.sidebar.collapsed .logout-btn:hover {
  background: var(--red-dim);
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  border-bottom: none;
  margin-bottom: 10px;
  padding: 8px 0 10px;
}

.sidebar.collapsed .toggle-btn {
  transform: translateY(-50%) rotate(180deg);
  position: absolute;
  right: auto;
  left: 50%;
  margin-left: -16px; /* half of 32px width */
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
}

.sidebar.collapsed .sidebar-brand:hover .toggle-btn {
  opacity: 1;
  pointer-events: auto;
  background: rgba(0,0,0,0.8);
  border-color: var(--green);
  color: var(--green);
}
.sidebar.collapsed .sidebar-brand:hover .brand-logo {
  opacity: 0.2;
}

.sidebar.collapsed .footer-credit {
  display: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  position: relative;
}

.brand-logo-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  transition: opacity 0.2s;
}

.toggle-btn {
  position: absolute;
  right: -16px;
  top: 25px; /* aligned with the middle of the logo (padding 8px + half of 34px) */
  transform: translateY(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: .2s;
}

.toggle-btn svg {
  width: 18px;
  height: 18px;
}

.toggle-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: conic-gradient(from 180deg, var(--green), var(--blue), var(--green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #000;
  box-shadow: 0 0 18px rgba(0, 230, 118, 0.35);
}

.brand-text {
  line-height: 1.2;
}

.brand-text .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.brand-text .sub {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-group {
  margin-bottom: 18px;
}

.nav-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-faint);
  padding: 6px 10px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
  transition: .15s ease;
  margin-bottom: 2px;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: .8;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-item.active {
  background: var(--green-dim);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(0, 230, 118, 0.25);
}

.nav-item.active svg {
  opacity: 1;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.04);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.user-chip .who {
  font-size: 12.5px;
  line-height: 1.3;
}

.user-chip .who .role {
  color: var(--text-faint);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.logout-btn {
  width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  transition: .15s;
}

.logout-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.logout-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-dim);
}

.main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  flex-wrap: wrap;
  gap: 14px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .2px;
}

.page-sub {
  color: var(--text-faint);
  font-size: 12.5px;
  margin-top: 3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-clock {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .35;
  }
}

/* ============ GRID / CARDS ============ */
.grid {
  display: grid;
  gap: 18px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-main {
  grid-template-columns: 1.3fr 1fr;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: .15s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
}

.card-title-sm {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  margin: 6px 0 4px;
}

.stat-card .stat-delta {
  font-size: 11.5px;
  font-family: var(--font-mono);
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 17px;
  height: 17px;
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

.flat {
  color: var(--text-faint);
}

/* ============ 208H DUTY RING (signature element) ============ */
.duty-ring-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.duty-ring {
  position: relative;
  width: 132px;
  height: 132px;
  flex-shrink: 0;
}

.duty-ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.duty-ring .track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 9;
}

.duty-ring .prog {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(.4, 0, .2, 1);
  filter: drop-shadow(0 0 6px currentColor);
}

.duty-ring .center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.duty-ring .center .hrs {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

.duty-ring .center .of {
  font-size: 9.5px;
  color: var(--text-faint);
  letter-spacing: .5px;
}

.duty-meta .row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text-dim);
}

.duty-meta .row span:last-child {
  font-family: var(--font-mono);
  color: var(--text);
}

/* ============ TABLES ============ */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

tbody tr:last-child td {
  border-bottom: none;
}

.cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mono {
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* ============ BADGES / PILLS ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge.done {
  background: var(--green-dim);
  color: var(--green);
}

.badge.editing {
  background: var(--blue-dim);
  color: var(--blue);
}

.badge.pending {
  background: var(--amber-dim);
  color: var(--amber);
}

.badge.cancelled {
  background: var(--red-dim);
  color: var(--red);
}

.badge.present {
  background: var(--green-dim);
  color: var(--green);
}

.badge.absent {
  background: var(--red-dim);
  color: var(--red);
}

.badge.onbreak {
  background: var(--amber-dim);
  color: var(--amber);
}

.badge.approved {
  background: var(--green-dim);
  color: var(--green);
}

.badge.rejected {
  background: var(--red-dim);
  color: var(--red);
}

.task-chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  transition: .15s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-primary {
  background: var(--green);
  color: #000;
  border-color: var(--green);
}

.btn-primary:hover {
  background: #00cf68;
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
}

.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-danger:hover {
  background: #e83030;
  box-shadow: 0 0 20px rgba(255, 59, 59, 0.3);
}

.btn-ghost-danger {
  color: var(--red);
  border-color: rgba(255, 59, 59, 0.3);
  background: transparent;
}

.btn-ghost-danger:hover {
  background: var(--red-dim);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

/* ============ FORM ELEMENTS ============ */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 7px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  transition: .15s;
  box-sizing: border-box;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.12);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23ffffff88'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 32px;
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-row .field {
  flex: 1;
}

.hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 6px;
}

/* Task-type dropdown pill options rendering (used in select + preview chip) */
.task-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--violet-dim);
  color: var(--violet);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .15s;
  margin-left: 5px;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  border: none;
  background: transparent;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn {
  flex: 1;
}

/* ============ TOAST ============ */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--green);
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 13px;
  min-width: 240px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: slideIn .25s ease;
}

.toast.err {
  border-left-color: var(--red);
}

@keyframes slideIn {
  from {
    transform: translateX(30px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============ EMPTY STATE ============ */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-faint);
}

.empty svg {
  width: 36px;
  height: 36px;
  opacity: .4;
  margin-bottom: 10px;
}

.empty .msg {
  font-size: 13px;
}

/* ============ LOGIN PAGE ============ */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-glow);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 26px;
  text-align: center;
}

.login-brand .brand-mark {
  width: 52px;
  height: 52px;
  font-size: 20px;
  margin-bottom: 14px;
}

.login-brand .company {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .4px;
}

.login-brand .powered {
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.role-tabs {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 22px;
}

.role-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
}

.role-tab.active {
  background: var(--green);
  color: #000;
}

.login-err {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255, 59, 59, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  margin-bottom: 16px;
  display: none;
}

.login-foot {
  text-align: center;
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ============ RESPONSIVE ============ */
.mobile-topbar {
  display: none;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 980px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 55;
  }

  .sidebar-overlay.open {
    display: block;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 40;
  }

  .main {
    padding: 18px 16px 50px;
  }

  .topbar {
    display: none;
  }

  .grid-3,
  .grid-4,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .duty-ring-wrap {
    flex-direction: column;
    text-align: center;
  }

  .field-row {
    flex-direction: column;
    gap: 0;
  }

  table {
    font-size: 12px;
  }

  .stat-card .stat-value {
    font-size: 24px;
  }

  .toggle-btn {
    display: none !important;
  }

  .nav-item {
    margin-bottom: 8px;
    padding: 12px 14px;
  }

  .logout-btn {
    margin-top: 10px;
  }

  .mobile-topbar .icon-btn {
    padding: 8px;
  }
  
  .mobile-topbar .icon-btn svg {
    width: 24px;
    height: 24px;
  }
}
/* SweetAlert Handwritten Styles */
.hw-popup { background: var(--bg-elevated) !important; color: var(--text) !important; border: 1px solid var(--border) !important; border-radius: 16px !important; }
.hw-title { font-family: 'Caveat', cursive !important; font-size: 38px !important; color: var(--green) !important; }
.hw-text { font-family: 'Caveat', cursive !important; font-size: 26px !important; color: var(--text) !important; }
.swal2-html-container { font-family: 'Caveat', cursive !important; font-size: 26px !important; color: var(--text) !important; }

/* Floating Break Timer */
#floatingTimer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 120px;
  height: 120px;
  background: var(--bg-elevated);
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  cursor: grab;
  user-select: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 4px solid var(--border);
}
#floatingTimer:active {
  cursor: grabbing;
  transform: scale(0.95);
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}
#floatingTimer.overtime {
  border-color: var(--red);
  animation: pulse-red 2s infinite;
}
#floatingTimer svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: rotate(-90deg);
}
#floatingTimer svg circle {
  fill: transparent;
  stroke-width: 6;
  stroke: var(--primary);
  stroke-dasharray: 339; /* 2 * pi * r (r=54) */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}
#floatingTimer.overtime svg circle {
  stroke: var(--red);
}
#timerText {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
  z-index: 2;
}
#timerLabel {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
  margin-top: 2px;
}

/* Responsive Filter Row Style */
.filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.filter-row > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-row label {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

.filter-row select,
.filter-row input[type="month"] {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  height: 32px;
  box-sizing: border-box;
}

.filter-row input[type="month"] {
  padding: 5px 10px;
  color-scheme: dark;
}

.filter-row .btn-print-action {
  margin-left: auto;
  background: var(--blue);
  border: none;
  color: #fff;
  font-size: 12px;
  height: 32px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 600px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .filter-row > div {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }

  .filter-row label {
    font-size: 13px;
    font-weight: 500;
  }

  .filter-row select,
  .filter-row input[type="month"] {
    flex: 1;
    max-width: 70%;
    height: 36px;
    font-size: 13px;
  }

  .filter-row #btnClearFilters {
    height: 36px;
    font-size: 13px;
    width: 100%;
    margin-top: 2px;
  }

  .filter-row .btn-print-action {
    margin-left: 0 !important;
    width: 100%;
    justify-content: center;
    height: 36px;
    font-size: 13px;
  }
}
@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

