/* ============================================================================
   POSTEX Design System v3.0 — "Crystalline Blue"
   Mobile-First | Production-Grade | Zero Violet/Mauve
   ============================================================================ */

/* === CSS CUSTOM PROPERTIES === */
:root {
  /* Brand Blue */
  --brand-50: #EFF6FF; --brand-100: #DBEAFE; --brand-200: #BFDBFE;
  --brand-300: #93C5FD; --brand-400: #60A5FA; --brand-500: #3B82F6;
  --brand-600: #2563EB; --brand-700: #1D4ED8; --brand-800: #1E40AF;
  --brand-900: #1E3A8A;

  /* Teal Accent */
  --teal-50: #F0FDFA; --teal-100: #CCFBF1; --teal-200: #99F6E4;
  --teal-400: #2DD4BF; --teal-500: #14B8A6; --teal-600: #0D9488;

  /* Emerald / Success */
  --emerald-50: #ECFDF5; --emerald-100: #D1FAE5; --emerald-200: #A7F3D0;
  --emerald-400: #34D399; --emerald-500: #10B981; --emerald-600: #059669;
  --emerald-700: #047857;

  /* Amber / Warning */
  --amber-50: #FFFBEB; --amber-100: #FEF3C7; --amber-200: #FDE68A;
  --amber-400: #FBBF24; --amber-500: #F59E0B; --amber-600: #D97706;

  /* Sky / Info */
  --sky-50: #F0F9FF; --sky-100: #E0F2FE; --sky-200: #BAE6FD;
  --sky-400: #38BDF8; --sky-500: #0EA5E9; --sky-600: #0284C7;

  /* Rose / Danger */
  --rose-50: #FFF1F2; --rose-100: #FFE4E6; --rose-200: #FECDD3;
  --rose-400: #FB7185; --rose-500: #F43F5E; --rose-600: #E11D48;

  /* Surfaces */
  --surface-bg: #F0F4F8;
  --surface-card: #FFFFFF;
  --surface-elevated: #FFFFFF;
  --surface-secondary: #F1F5F9;
  --surface-hover: #F8FAFC;
  --surface-sidebar: rgba(255,255,255,0.85);

  /* Borders */
  --border-default: #E2E8F0;
  --border-subtle: #F1F5F9;
  --border-strong: #CBD5E1;
  --border-focus: var(--brand-500);

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 6px 20px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 8px 30px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-glow-blue: 0 0 24px rgba(59,130,246,0.18);
  --shadow-glow-emerald: 0 0 24px rgba(16,185,129,0.18);
  --shadow-glow-amber: 0 0 24px rgba(245,158,11,0.18);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* === BASE RESET === */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--text-primary);
  background: var(--surface-bg);
  touch-action: manipulation;
  overscroll-behavior: none;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Prevent iOS auto-zoom */
input, select, textarea { font-size: 16px !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }
@media (max-width: 768px) { ::-webkit-scrollbar { width: 0; height: 0; } }

/* Focus */
*:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Alpine.js cloak */
[x-cloak] { display: none !important; }

/* === TYPOGRAPHY === */
.text-display {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.text-heading {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.text-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.text-mono {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-variant-numeric: tabular-nums;
}

/* === SIDEBAR === */
.px-sidebar {
  background: var(--surface-sidebar);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-right: 1px solid rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}
.px-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 150% 100% at 0% 0%, rgba(59,130,246,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 100% 100%, rgba(14,165,233,0.04) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(16,185,129,0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
  animation: px-aurora 15s ease-in-out infinite alternate;
}
@keyframes px-aurora {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}
.px-sidebar > * { position: relative; z-index: 1; }

/* Sidebar shimmer */
.px-sidebar-shimmer {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.35), rgba(14,165,233,0.3), rgba(16,185,129,0.25), transparent);
  background-size: 200% 100%;
  animation: px-shimmer 4s ease-in-out infinite;
}
@keyframes px-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Sidebar nav items */
.px-nav-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  margin: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration-normal) var(--ease-out);
  letter-spacing: 0.01em;
  text-decoration: none;
}
.px-nav-item:hover {
  background: rgba(59,130,246,0.06);
  color: var(--text-primary);
}
.px-nav-item.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(14,165,233,0.06));
  color: var(--brand-600);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.1), 0 2px 8px rgba(59,130,246,0.06);
}
.px-nav-item .px-nav-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  transition: all var(--duration-normal) ease;
}
.px-nav-item:hover .px-nav-icon { transform: scale(1.05); }
.px-nav-item.active .px-nav-icon {
  background: linear-gradient(135deg, var(--brand-500), var(--sky-500)) !important;
  box-shadow: 0 2px 10px rgba(59,130,246,0.3);
}
.px-nav-item.active .px-nav-icon svg { color: white !important; }

/* === HEADER === */
.px-header {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* === BOTTOM NAV (Mobile) === */
.px-bottom-nav {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,0.06);
}
.px-bottom-nav-item {
  transition: all var(--duration-fast) ease;
  color: var(--text-muted);
}
.px-bottom-nav-item.active { color: var(--brand-600); }

/* === HERO HEADER === */
.px-hero {
  background: linear-gradient(135deg, rgba(15,23,42,0.9) 0%, rgba(30,64,175,0.87) 50%, rgba(59,130,246,0.84) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
  padding: 20px 16px 90px 16px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.12);
}
@media (min-width: 640px) {
  .px-hero { padding: 24px 24px 100px 24px; border-radius: 0 0 28px 28px; }
}
@media (min-width: 1024px) {
  .px-hero { padding: 28px 32px 110px 32px; border-radius: 0 0 32px 32px; }
}
.px-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(255,255,255,0.06), transparent);
  pointer-events: none;
  border-radius: 0 0 inherit inherit;
}

/* === CARDS === */
.px-card {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.px-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.px-card-static {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,0.04);
}

/* Card Pro - with accent bar */
.px-card-pro {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--radius-2xl);
  padding: 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease-out);
}
.px-card-pro::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--teal-500), var(--emerald-500));
  opacity: 0;
  transition: opacity var(--duration-normal) ease;
}
.px-card-pro:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.px-card-pro:hover::before { opacity: 1; }

/* === KPI CARDS === */
.px-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: -70px;
  position: relative;
  z-index: 10;
}
@media (min-width: 640px) { .px-kpi-grid { gap: 16px; margin-top: -80px; } }
@media (min-width: 1024px) { .px-kpi-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }

.px-kpi-card {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.9);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease-spring);
}
.px-kpi-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 3px;
  background: linear-gradient(90deg, var(--kpi-color, var(--brand-500)), var(--kpi-color-end, var(--teal-500)));
  border-radius: 3px 3px 0 0;
  transition: width var(--duration-slow) var(--ease-spring);
}
.px-kpi-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}
.px-kpi-card:hover::after { width: 50%; }

.px-kpi-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  transition: all var(--duration-slow) var(--ease-spring);
}
.px-kpi-card:hover .px-kpi-icon {
  transform: scale(1.12) rotate(-5deg);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.px-kpi-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
@media (min-width: 640px) { .px-kpi-value { font-size: 32px; } }

.px-kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
  font-weight: 700;
}

/* === BUTTONS === */
.px-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  font-family: inherit;
  text-decoration: none;
}
.px-btn:active { transform: scale(0.97); }
.px-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.px-btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: white;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.px-btn-primary:hover {
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}

.px-btn-success {
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  color: white;
  box-shadow: 0 2px 8px rgba(5,150,105,0.25);
}
.px-btn-success:hover {
  box-shadow: 0 6px 20px rgba(5,150,105,0.35);
  transform: translateY(-1px);
}

.px-btn-warning {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: white;
  box-shadow: 0 2px 8px rgba(217,119,6,0.25);
}

.px-btn-danger {
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  color: white;
  box-shadow: 0 2px 8px rgba(225,29,72,0.25);
}

.px-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}
.px-btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

/* Glass button */
.px-btn-glass {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
  transition: all var(--duration-normal) var(--ease-out);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.px-btn-glass:hover {
  background: rgba(255,255,255,0.22);
  transform: scale(1.05);
}
.px-btn-glass:active {
  transform: scale(0.95);
  background: rgba(255,255,255,0.28);
}

/* === FORM INPUTS === */
.px-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--surface-secondary);
  transition: all var(--duration-normal) var(--ease-out);
  font-family: inherit;
}
.px-input:focus {
  outline: none;
  border-color: var(--brand-500);
  background: var(--surface-card);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.px-input::placeholder { color: var(--text-muted); }
.px-input:disabled {
  background: var(--surface-secondary);
  cursor: not-allowed;
  opacity: 0.6;
}

.px-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 5.5l3.5 4 3.5-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* === STATUS BADGES === */
.px-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.px-badge-blue {
  background: rgba(59,130,246,0.1);
  color: var(--brand-600);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.15);
}
.px-badge-green {
  background: rgba(16,185,129,0.12);
  color: var(--emerald-700);
  box-shadow: 0 0 0 1px rgba(16,185,129,0.18);
}
.px-badge-amber {
  background: rgba(245,158,11,0.12);
  color: var(--amber-600);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.18);
}
.px-badge-red {
  background: rgba(244,63,94,0.1);
  color: var(--rose-600);
  box-shadow: 0 0 0 1px rgba(244,63,94,0.15);
}
.px-badge-gray {
  background: rgba(100,116,139,0.08);
  color: var(--text-secondary);
}
.px-badge-teal {
  background: rgba(20,184,166,0.1);
  color: var(--teal-600);
  box-shadow: 0 0 0 1px rgba(20,184,166,0.15);
}

/* === SECTION HEADERS === */
.px-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.px-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
  padding-left: 14px;
}
.px-section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 18px;
  background: linear-gradient(180deg, var(--brand-500), var(--teal-500));
  border-radius: 2px;
}
.px-section-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-500);
  transition: all var(--duration-normal) ease;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.px-section-link:hover {
  background: rgba(59,130,246,0.06);
  color: var(--brand-700);
}

/* === PROGRESS BARS === */
.px-progress {
  height: 6px;
  background: var(--surface-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.px-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  position: relative;
  transition: width 0.8s var(--ease-out);
}
.px-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: px-shimmer 2.5s infinite;
}

/* === QUICK ACTIONS === */
.px-quick-action {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(165deg, #ffffff 0%, #fafbfc 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.px-quick-action::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 0;
  background: linear-gradient(180deg, var(--brand-500), var(--teal-500));
  border-radius: 0 4px 4px 0;
  transition: height var(--duration-normal) var(--ease-spring);
}
.px-quick-action:hover {
  transform: translateY(-3px) translateX(3px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.1);
  border-color: var(--brand-400);
}
.px-quick-action:hover::before { height: 60%; }

/* === EMPLOYEE LIST ITEMS === */
.px-employee-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
  border: 1px solid transparent;
}
.px-employee-item:hover {
  background: linear-gradient(90deg, rgba(59,130,246,0.04) 0%, transparent 100%);
  transform: translateX(6px);
  border-color: rgba(59,130,246,0.06);
}

/* === TABLE STYLES === */
.px-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.px-table thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border-default);
  background: var(--surface-secondary);
}
.px-table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
.px-table thead th:last-child { border-radius: 0 var(--radius-md) 0 0; }
.px-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}
.px-table tbody tr {
  transition: background var(--duration-fast) ease;
}
.px-table tbody tr:hover { background: var(--surface-hover); }
.px-table tbody tr:last-child td { border-bottom: none; }

/* === CLOCK BUTTONS === */
.px-clock-btn {
  position: relative;
  width: 100%;
  border-radius: var(--radius-xl);
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.px-clock-btn:active { transform: scale(0.97); }

.px-clock-btn-start {
  height: 7rem;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-700));
  color: white;
  box-shadow: 0 6px 24px rgba(16,185,129,0.35);
}
.px-clock-btn-start:hover { box-shadow: 0 10px 32px rgba(16,185,129,0.45); }

.px-clock-btn-pause {
  height: 5rem;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: white;
  box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}
.px-clock-btn-pause:hover { box-shadow: 0 8px 24px rgba(245,158,11,0.4); }

.px-clock-btn-stop {
  height: 5rem;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  color: white;
  box-shadow: 0 4px 16px rgba(244,63,94,0.3);
}
.px-clock-btn-stop:hover { box-shadow: 0 8px 24px rgba(244,63,94,0.4); }

.px-clock-btn-resume {
  height: 5rem;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: white;
  box-shadow: 0 6px 24px rgba(59,130,246,0.35);
}
.px-clock-btn-resume:hover { box-shadow: 0 10px 32px rgba(59,130,246,0.45); }

/* Animated border wrapper */
.px-btn-animated-wrap {
  position: relative;
  padding: 4px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.px-btn-animated-wrap::before {
  content: '';
  position: absolute;
  inset: -100%;
  background: conic-gradient(from 0deg, var(--emerald-500), var(--brand-500), var(--teal-500), var(--amber-500), var(--emerald-500));
  animation: px-spin-ring 3s linear infinite;
}
.px-btn-animated-wrap > * { position: relative; z-index: 1; }

@keyframes px-spin-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === TIMER TYPOGRAPHY === */
.px-timer {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* === SERVICE PANELS === */
.px-service-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.px-service-panel-blue {
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
}
.px-service-panel-amber {
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
}

/* === ANIMATIONS === */
@keyframes px-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes px-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes px-slide-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes px-scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes px-pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.96); }
}
@keyframes px-success-pulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes px-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Utility animation classes */
.px-animate-fade-in { animation: px-fade-in 0.5s var(--ease-out) both; }
.px-animate-fade-up { animation: px-fade-up 0.6s var(--ease-out) both; }
.px-animate-slide-up { animation: px-slide-up 0.3s var(--ease-out); }
.px-animate-scale-in { animation: px-scale-in 0.4s var(--ease-spring) both; }
.px-animate-pulse { animation: px-pulse-soft 2s ease-in-out infinite; }

/* Stagger delays */
.px-delay-1 { animation-delay: 0.05s; }
.px-delay-2 { animation-delay: 0.1s; }
.px-delay-3 { animation-delay: 0.15s; }
.px-delay-4 { animation-delay: 0.2s; }
.px-delay-5 { animation-delay: 0.25s; }

/* Stagger items */
.px-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.px-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.px-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.px-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.px-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.px-stagger > *:nth-child(6) { animation-delay: 0.3s; }

/* Hover effects */
.px-hover-lift {
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.px-hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Touch feedback */
.px-touch { -webkit-tap-highlight-color: transparent; }
.px-touch:active { transform: scale(0.97); }

/* Skeleton loading */
.px-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: px-skeleton 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Toast */
.px-toast-enter { animation: px-toast-in 0.3s var(--ease-out); }
.px-toast-leave { animation: px-toast-out 0.2s ease-in forwards; }
@keyframes px-toast-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes px-toast-out {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0; }
}

/* Ripple */
.px-ripple { position: relative; overflow: hidden; }
.px-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.3s ease;
}
.px-ripple:active::after {
  transform: scale(2);
  opacity: 1;
  transition: 0s;
}

/* Glow effects */
.px-glow-blue { box-shadow: var(--shadow-glow-blue); }
.px-glow-green { box-shadow: var(--shadow-glow-emerald); }
.px-glow-amber { box-shadow: var(--shadow-glow-amber); }

/* Safe area */
.px-safe-bottom { padding-bottom: max(env(safe-area-inset-bottom), 0px); }

/* === AUTH PAGE SPECIFIC === */
.px-aurora-bg {
  background: #060B18;
  position: relative;
  overflow: hidden;
}
.px-aurora-bg::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(59,130,246,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 70% 30%, rgba(14,165,233,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 80%, rgba(16,185,129,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 300px 200px at 80% 70%, rgba(20,184,166,0.06) 0%, transparent 70%);
  animation: px-aurora-move 20s ease-in-out infinite alternate;
}
@keyframes px-aurora-move {
  0% { transform: translate(0,0) rotate(0deg); }
  33% { transform: translate(30px,-20px) rotate(1deg); }
  66% { transform: translate(-20px,30px) rotate(-1deg); }
  100% { transform: translate(10px,-10px) rotate(0.5deg); }
}

/* Auth noise overlay */
.px-noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* Auth grid pattern */
.px-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
}

/* Auth stat cards */
.px-auth-stat {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  padding: 24px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease-out);
}
.px-auth-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.px-auth-stat:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
}

/* Auth clock ring */
.px-clock-ring-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}
.px-clock-ring {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.08);
  position: relative;
}
.px-clock-ring::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--brand-500);
  border-right-color: var(--teal-500);
  animation: px-spin-ring 8s linear infinite;
}
.px-clock-ring::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
}

.px-clock-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.px-clock-time {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.px-clock-seconds {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}
.px-clock-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(59,130,246,0.2);
  animation: px-clock-pulse 3s ease-out infinite;
}
@keyframes px-clock-pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.15); opacity: 0; }
}

/* Auth form panel */
.px-form-panel {
  background: #FAFAFA;
  position: relative;
}
.px-form-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.06), transparent);
}
.px-form-card {
  background: #fff;
  border-radius: var(--radius-2xl);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.02),
              0 8px 24px rgba(0,0,0,0.04), 0 24px 48px rgba(0,0,0,0.03);
}

/* Auth floating label input */
.px-auth-input-group { position: relative; }
.px-auth-input {
  width: 100%;
  padding: 20px 16px 8px 46px;
  border: 1.5px solid #E8E8ED;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  background: #FAFAFA;
  outline: none;
  transition: all var(--duration-normal) var(--ease-out);
  font-family: inherit;
}
.px-auth-input:focus {
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.08);
}
.px-auth-input::placeholder { color: transparent; }
.px-auth-label {
  position: absolute;
  left: 46px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
  transition: all var(--duration-normal) var(--ease-out);
}
.px-auth-input:focus ~ .px-auth-label,
.px-auth-input:not(:placeholder-shown) ~ .px-auth-label {
  top: 12px;
  transform: translateY(0);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--brand-500);
}
.px-auth-icon {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  color: #C7C7CC;
  transition: color var(--duration-normal);
  pointer-events: none;
}
.px-auth-input:focus ~ .px-auth-icon { color: var(--brand-500); }

/* Auth submit button */
.px-auth-btn-wrap {
  position: relative;
  border-radius: 16px;
  padding: 2px;
  overflow: hidden;
  transition: transform 0.2s;
}
.px-auth-btn-wrap:active { transform: scale(0.98); }
.px-auth-btn-wrap::before {
  content: '';
  position: absolute;
  inset: -200%;
  background: conic-gradient(from 0deg, var(--brand-500), var(--teal-500), var(--emerald-500), var(--sky-500), var(--brand-500));
  animation: px-spin-ring 3s linear infinite;
}
.px-auth-btn-main {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 16px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  transition: all var(--duration-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}
.px-auth-btn-main:hover {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
  box-shadow: 0 8px 24px rgba(59,130,246,0.3);
}

/* Auth feature tags */
.px-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  transition: all 0.3s;
}
.px-feature-tag:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}

/* Auth trust badge */
.px-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.12);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald-500);
}

/* Auth mobile hero */
.px-mobile-hero {
  background: linear-gradient(135deg, #060B18 0%, #0F1D40 50%, #0d1b3e 100%);
  position: relative;
  overflow: hidden;
  padding: 32px 20px 28px;
}
.px-mobile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 200px 150px at 20% 50%, rgba(59,130,246,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 200px 150px at 80% 30%, rgba(14,165,233,0.1) 0%, transparent 70%);
  animation: px-aurora-move 20s ease-in-out infinite alternate;
}
.px-mobile-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #FAFAFA);
  z-index: 5;
}

/* Mobile stat cards */
.px-mobile-stat {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  flex: 1;
}

/* === RESPONSIVE TOUCH TARGETS === */
@media (max-width: 639px) {
  .px-quick-action, .px-employee-item, button, a {
    min-height: 48px;
  }
}

/* Mobile sidebar override */
@media (max-width: 1023px) {
  aside.px-sidebar {
    transform: translateX(-100%) !important;
  }
  aside.px-sidebar.sidebar-open {
    transform: translateX(0) !important;
  }
}

/* === ONLINE STATUS DOT === */
.px-status-online {
  background: var(--emerald-500);
  box-shadow: 0 0 0 2.5px white, 0 0 8px rgba(16,185,129,0.35);
}

/* === DIVIDER === */
.px-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.px-divider::before, .px-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

/* === HISTORY ITEMS === */
.px-history-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}
.px-history-item:last-child { border-bottom: none; }

.px-break-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--amber-50);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}
