/*
 * BriskSchedules Premium Glassmorphic Stylesheet
 * Brand Accent: Warm Amber & Neon Cyan (Peter's Command Center Theme)
 */

:root {
  /* Color Palette - HSL Premium Dark Mode */
  --hue-primary: 206;
  --bg-dark: hsl(210, 18%, 4%);
  --bg-surface: hsla(219, 26%, 13%, 0.94);
  --bg-surface-2: hsla(217, 23%, 18%, 0.98);
  --border-glass: hsla(0, 0%, 100%, 0.15);
  --border-active: hsla(206, 100%, 34%, 0.6);
  
  --text-primary: hsl(0, 0%, 100%);
  --text-secondary: hsl(210, 24%, 84%);
  --text-muted: hsl(214, 18%, 61%);
  
  /* Accent Colors (HSL) */
  --accent-gold: hsl(201, 74%, 56%);
  --accent-amber: hsl(206, 100%, 34%);
  --accent-cyan: hsl(201, 74%, 56%);
  --accent-purple: hsl(285, 100%, 50%);
  
  /* Semantic Colors */
  --bg-success: rgba(46, 204, 113, 0.15);
  --text-success: #2ecc71;
  --bg-warning: rgba(241, 196, 15, 0.15);
  --text-warning: #f1c40f;
  --bg-danger: rgba(231, 76, 60, 0.15);
  --text-danger: #ff6b6b;
  --bg-info: rgba(52, 152, 219, 0.15);
  --text-info: #5dade2;
  
  /* Font Families */
  --font-title: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  
  /* Border Radius */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================================
   PKRosters Multi-Tenant Dynamic Theming Engine
   ======================================================== */

/* 1. Amcal Woy Woy (Default Amcal Blue & Cyan Palette) */
:root,
html[data-theme="amcal"],
body[data-theme="amcal"] {
  --hue-primary: 206;
  --border-active: hsla(206, 100%, 34%, 0.6);
  --accent-gold: hsl(201, 74%, 56%);
  --accent-amber: hsl(206, 100%, 34%);
  --accent-cyan: hsl(201, 74%, 56%);
  --brand-primary: #0066cc;
  --brand-accent: #dc2626;
  --brand-highlight: #3ca7e1;
  --brand-badge-bg: rgba(60, 167, 225, 0.12);
  --brand-badge-border: rgba(60, 167, 225, 0.3);
  --brand-badge-text: #3ca7e1;
}

/* 2. Budgewoi Discount Drug Stores (DDS Royal Plum Purple #7A2682 & Tangerine Orange #FF6B00 Palette) */
html[data-theme="budgewoi"],
html[data-theme="dds"],
body[data-theme="budgewoi"],
body[data-theme="dds"] {
  --hue-primary: 295;
  --border-active: hsla(295, 55%, 33%, 0.65);
  --accent-gold: hsl(25, 100%, 50%);    /* DDS Brand Vivid Tangerine #ff6b00 */
  --accent-amber: hsl(295, 55%, 33%);   /* DDS Brand Royal Plum Purple #7a2682 */
  --accent-cyan: hsl(280, 80%, 65%);    /* Soft Violet Glow #c084fc */
  --accent-purple: hsl(25, 100%, 50%);  /* Orange Accent Glow */
  --brand-primary: #7a2682;             /* Signature DDS Royal Plum Purple */
  --brand-accent: #ff6b00;              /* Signature DDS Tangerine Orange */
  --brand-highlight: #a855f7;           /* Light Violet Accent */
  --brand-badge-bg: rgba(122, 38, 130, 0.18);
  --brand-badge-border: rgba(122, 38, 130, 0.45);
  --brand-badge-text: #e9d5ff;
}

/* DDS Specific UI Element Styling */
html[data-theme="budgewoi"] .btn-primary,
html[data-theme="dds"] .btn-primary {
  background: linear-gradient(135deg, #7a2682 0%, #521558 100%) !important;
  border-color: #9c33a8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(122, 38, 130, 0.38) !important;
}

html[data-theme="budgewoi"] .btn-primary:hover,
html[data-theme="dds"] .btn-primary:hover {
  background: linear-gradient(135deg, #9c33a8 0%, #7a2682 100%) !important;
  box-shadow: 0 6px 20px rgba(122, 38, 130, 0.55) !important;
}

html[data-theme="budgewoi"] .btn-neon,
html[data-theme="dds"] .btn-neon {
  background: linear-gradient(135deg, #ff6b00 0%, #d95300 100%) !important;
  border-color: #ff8533 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.38) !important;
}

html[data-theme="budgewoi"] .btn-neon:hover,
html[data-theme="dds"] .btn-neon:hover {
  background: linear-gradient(135deg, #ff8533 0%, #ff6b00 100%) !important;
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.55) !important;
}

html[data-theme="budgewoi"] .menu-item.active,
html[data-theme="dds"] .menu-item.active {
  background: linear-gradient(90deg, rgba(122, 38, 130, 0.28) 0%, rgba(122, 38, 130, 0.08) 100%) !important;
  border-left: 3px solid #ff6b00 !important;
  color: #e9d5ff !important;
}

html[data-theme="budgewoi"] .menu-item.active i,
html[data-theme="dds"] .menu-item.active i {
  color: #ff6b00 !important;
}

html[data-theme="budgewoi"] .orb-1,
html[data-theme="dds"] .orb-1 {
  background: radial-gradient(circle, rgba(122, 38, 130, 0.38), transparent 70%) !important;
}

html[data-theme="budgewoi"] .orb-3,
html[data-theme="dds"] .orb-3 {
  background: radial-gradient(circle, rgba(255, 107, 0, 0.28), transparent 70%) !important;
}

html[data-theme="budgewoi"] body,
html[data-theme="dds"] body {
  background-image: radial-gradient(circle at 15% 50%, rgba(122, 38, 130, 0.08), transparent 50%),
                    radial-gradient(circle at 85% 30%, rgba(255, 107, 0, 0.06), transparent 50%) !important;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 15% 50%, rgba(0, 97, 171, 0.04), transparent 50%),
                    radial-gradient(circle at 85% 30%, rgba(60, 167, 225, 0.04), transparent 50%);
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  line-height: 1.5;
}

body.theme-light {
  --bg-dark: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.94);
  --bg-surface-2: rgba(241, 245, 249, 0.98);
  --border-glass: rgba(0, 0, 0, 0.1);
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --bg-success: rgba(46, 204, 113, 0.2);
  --text-success: #27ae60;
  --bg-warning: rgba(241, 196, 15, 0.25);
  --text-warning: #d4ac0d;
  --bg-danger: rgba(231, 76, 60, 0.15);
  --text-danger: #c0392b;
}

/* Glowing Background Orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.28;
  pointer-events: none;
}
.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, var(--accent-amber), transparent 70%);
  top: -10%;
  right: -5%;
}
.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-purple), transparent 70%);
  bottom: -15%;
  left: -5%;
}
.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
  top: 40%;
  left: 30%;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Main Layout Grid */
.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  background: rgba(13, 15, 18, 0.85);
  border-right: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}
.brand-icon {
  background: linear-gradient(135deg, #0076cf, #004d88);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 15px rgba(0, 97, 171, 0.4);
}
.brand-text h2 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-text span {
  font-size: 0.75rem;
  color: var(--accent-amber);
  font-weight: 600;
  letter-spacing: 1px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}
.menu-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  transition: var(--transition-fast);
}
.menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}
.menu-item.active {
  background: rgba(60, 167, 225, 0.12);
  color: var(--accent-gold);
  border-left: 3px solid var(--accent-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.menu-item.active i {
  color: var(--accent-gold);
}

.sidebar-footer {
  margin-top: auto;
}
.company-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}
.company-badge i {
  color: var(--accent-amber);
}

/* Main Content Workspace */
.main-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow-y: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 1rem;
}
.page-title h1 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
}
.live-clock {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}
.text-neon {
  color: var(--accent-cyan);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* Tabs Panel Routing */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}
.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Premium Glassmorphic Cards */
.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition-normal);
}
.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* Welcome Banner Component */
.welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(0, 97, 171, 0.15), rgba(30, 36, 46, 0.8));
  border: 1px solid var(--border-active);
}
.welcome-text h2 {
  font-family: var(--font-title);
  margin-bottom: 6px;
}
.welcome-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Metrics Grid UI */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 16px;
}
.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
}
.bg-orange {
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-gold));
  box-shadow: 0 4px 15px rgba(0, 97, 171, 0.3);
}
.bg-neon {
  background: linear-gradient(135deg, var(--accent-cyan), #00b0ff);
  box-shadow: 0 4px 15px rgba(0, 176, 255, 0.3);
}
.bg-cyan {
  background: linear-gradient(135deg, #3498db, #2980b9);
}
.bg-purple {
  background: linear-gradient(135deg, var(--accent-purple), #8e44ad);
  box-shadow: 0 4px 15px rgba(189, 0, 255, 0.3);
}
.metric-content {
  display: flex;
  flex-direction: column;
}
.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.metric-value {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2px;
}

/* Dashboard Split Grid */
.dashboard-split {
  display: flex;
  gap: 1.5rem;
}
.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-glass);
}
.card-header h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Action Bar Controllers */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
}
.week-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  flex-wrap: wrap;
}
.week-range-text {
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 175px;
  text-align: center;
  white-space: nowrap;
}
.scheduler-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.action-bar .btn {
  height: 34px !important;
  padding: 0 10px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  border-radius: var(--radius-sm) !important;
}
.action-bar .btn-icon {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#labor-cost-forecast-badge,
#wage-ratio-forecast-badge {
  height: 32px !important;
  padding: 0 10px !important;
  font-size: 0.82rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  flex-grow: 1;
  max-width: 400px;
}
.search-box i {
  color: var(--text-muted);
}
.search-box input {
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
}
.search-box input:focus {
  outline: none;
}
.search-box:focus-within {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(60, 167, 225, 0.25);
}

/* Data Table UI styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-secondary);
  font-weight: 500;
  border-bottom: 1px solid var(--border-glass);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
}
.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

/* Status Badges */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}
.badge-success { background: var(--bg-success); color: var(--text-success); }
.badge-warning { background: var(--bg-warning); color: var(--text-warning); }
.badge-danger { background: var(--bg-danger); color: var(--text-danger); }
.badge-info { background: var(--bg-info); color: var(--text-info); }

/* Buttons UI styling */
.btn {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-gold));
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 97, 171, 0.25);
}
.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(0, 97, 171, 0.4);
}
.btn-neon {
  background: linear-gradient(135deg, var(--accent-cyan), #00b0ff);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 176, 255, 0.25);
}
.btn-neon:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(0, 176, 255, 0.45);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-danger {
  background: var(--bg-danger);
  color: var(--text-danger);
}
.btn-danger:hover {
  background: rgba(231, 76, 60, 0.25);
}
.btn-success {
  background: var(--bg-success);
  color: var(--text-success);
}
.btn-success:hover {
  background: rgba(46, 204, 113, 0.25);
}
.btn-warning {
  background: var(--bg-warning);
  color: var(--text-warning);
}
.btn-warning:hover {
  background: rgba(241, 196, 15, 0.25);
}
.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.btn-lg {
  padding: 14px 24px;
  font-size: 1rem;
}
.btn-block {
  width: 100%;
}
.btn-left {
  margin-right: auto;
}

/* Quick Actions Sidebar Grid */
.quick-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quick-action-buttons button {
  justify-content: flex-start;
  text-align: left;
}

/* Scheduler Workspace Layout */
.calendar-workspace {
  padding: 0 !important;
  overflow: hidden;
}
.scheduler-grid-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 175px);
  max-height: calc(100dvh - 175px);
  width: 100%;
  position: relative;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}
.scheduler-grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  min-width: 1100px;
}
.scheduler-grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #11141a !important;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  padding: 10px 4px;
  border-right: 1px solid var(--border-glass);
  border-bottom: 2px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}
.col-employee {
  width: 15%;
  min-width: 130px;
  max-width: 170px;
  text-align: left !important;
  padding-left: 0.85rem !important;
}
.scheduler-grid-table thead th.col-employee {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 35 !important;
  background: #11141a !important;
  border-right: 2px solid rgba(255, 255, 255, 0.18) !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.6);
}
.col-day {
  width: 12.14%;
  min-width: 120px;
}
.day-date {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}
.scheduler-grid-table td {
  border-right: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  min-height: 40px;
  height: auto;
  vertical-align: top;
  padding: 5px;
  position: relative;
  background: rgba(13, 15, 18, 0.4);
}

/* Employee Sticky Profile Column in Grid */
.grid-employee-cell,
.scheduler-grid-table tbody td:first-child,
.scheduler-grid-table tbody td.col-employee {
  position: sticky;
  left: 0;
  background: #11141a !important;
  z-index: 15 !important;
  display: table-cell;
  vertical-align: middle;
  border-right: 2px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.45);
  padding: 8px 10px !important;
}

.scheduler-grid-table tfoot td:first-child {
  position: sticky;
  left: 0;
  background: #11141a !important;
  z-index: 15 !important;
  border-right: 2px solid rgba(255, 255, 255, 0.18) !important;
}
.menu-item span {
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-badge {
  background-color: #e74c3c;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: auto;
  line-height: 1;
}
.grid-emp-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  letter-spacing: 0.2px;
}
.grid-emp-role {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin-top: 2px;
}
.grid-emp-hours {
  font-size: 0.78rem;
  color: var(--accent-cyan, #00e5ff);
  font-weight: 600;
  margin-top: 4px;
}

/* Shift Card Widget styling */
.shift-card {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 0.74rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  margin-bottom: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: left;
}
.shift-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}
.shift-card.unassigned {
  background: rgba(231, 76, 60, 0.1);
  border: 1px dashed var(--text-danger);
}
.shift-card.unassigned:hover {
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.25);
}
.shift-card-header {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shift-card-time {
  color: var(--accent-cyan);
  font-weight: 600;
}
.shift-card-notes {
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Calendar Add Trigger Hover Cell */
.calendar-grid-cell {
  transition: var(--transition-fast);
}
.calendar-grid-cell:hover {
  background: rgba(255, 255, 255, 0.03);
}
.cell-add-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  opacity: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.75rem;
}
.calendar-grid-cell:hover .cell-add-btn {
  opacity: 1;
}
.cell-add-btn:hover {
  background: var(--accent-amber);
  color: #fff;
  border-color: var(--accent-gold);
}

/* Timeline Shift Styles */
.shift-timeline-container {
  position: relative;
  width: 100%;
  min-height: 28px;
  padding: 2px 0;
  /* Thin vertical hour guidelines in the background */
  background-image: repeating-linear-gradient(
    to right,
    transparent,
    transparent calc(25% - 1px),
    rgba(255, 255, 255, 0.06) calc(25% - 1px),
    rgba(255, 255, 255, 0.06) 25%
  );
}
.shift-timeline-ruler {
  background: repeating-linear-gradient(to right, transparent, transparent 19px, #e2e8f0 20px);
}
.daily-timeline-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
  z-index: 1;
}
.daily-timeline-grid-line.midday {
  background: rgba(0, 229, 255, 0.22);
  width: 1.5px;
}
.daily-timeline-grid-line.quarter {
  background: rgba(255, 255, 255, 0.12);
}
.daily-weekday-btn {
  flex: 1;
  min-width: 75px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.daily-weekday-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.daily-weekday-btn.active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
  font-weight: 700;
}
.shift-timeline-bar {
  position: absolute;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.shift-timeline-bar:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
  z-index: 10;
}
.shift-timeline-bar .bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}
.shift-timeline-bar .bar-tooltip {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.1);
  color: #1a202c;
  z-index: 20;
}
.shift-timeline-bar:hover .bar-tooltip {
  display: block;
}
.shift-timeline-bar.dragging {
  opacity: 0.5;
}
.leave-overlay-stripe {
  background: repeating-linear-gradient(45deg, rgba(255,0,0,0.1), rgba(255,0,0,0.1) 10px, transparent 10px, transparent 20px);
}
.emp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.emp-hours-bar {
  height: 4px;
  border-radius: 2px;
  background-color: #e2e8f0;
}
.emp-hours-bar .bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}
.presence-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.stacked-bar-chart {
  display: flex;
  flex-direction: row;
  height: 16px;
  border-radius: 3px;
  overflow: hidden;
}

/* Employee Cards Grid UI */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.employee-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.employee-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.emp-details h4 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
}
.emp-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.employee-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.15);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}
.employee-card-meta span strong {
  color: var(--text-primary);
}
.employee-card-avail {
  font-size: 0.75rem;
}
.avail-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-top: 6px;
}
.avail-day-bubble {
  background: rgba(0,0,0,0.2);
  text-align: center;
  padding: 4px 0;
  border-radius: 3px;
  font-weight: 600;
  color: var(--text-muted);
}
.avail-day-bubble.active {
  background: var(--bg-success);
  color: var(--text-success);
}

.employee-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

/* Time Clock Terminal Layout styling */
.timeclock-layout {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 1.5rem;
  min-width: 0;
  width: 100%;
}
@media screen and (max-width: 1024px) {
  .timeclock-layout {
    grid-template-columns: 1fr;
    width: 100%;
    overflow: hidden;
  }
}

.timeclock-terminal,
.timeclock-admin,
.leave-form-card,
.leave-list-card,
.report-workspace {
  min-width: 0;
  width: 100%;
}

.timeclock-terminal {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border: 1px solid var(--border-active);
  background: linear-gradient(135deg, rgba(0, 97, 171, 0.08), rgba(22, 26, 33, 0.95));
}
.terminal-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.terminal-status-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  text-align: center;
}
.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}
.status-online { background: var(--text-success); box-shadow: 0 0 10px var(--text-success); }
.status-offline { background: var(--text-muted); }
.status-break { background: var(--text-warning); box-shadow: 0 0 10px var(--text-warning); }

.status-text {
  font-weight: 700;
  font-size: 1.1rem;
}
.sub-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Clock Terminal Button Interactions */
.terminal-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.terminal-actions-grid button {
  height: 68px;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast) !important;
  position: relative;
}

.terminal-actions-grid button i {
  font-size: 1.25rem;
}

.terminal-actions-grid button:disabled {
  opacity: 0.22 !important;
  filter: grayscale(85%) blur(0.3px);
  transform: scale(0.95);
  box-shadow: none !important;
  pointer-events: none;
}

.terminal-actions-grid button:not(:disabled) {
  transform: scale(1.02);
  animation: activeTerminalPulse 1.8s infinite alternate;
}

@keyframes activeTerminalPulse {
  0% {
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.05);
  }
  100% {
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
    border-color: var(--accent-cyan) !important;
  }
}

/* Timeclock Admin Panel */
.timesheet-scroll, .leave-list-scroll, .shift-list-scroll {
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 480px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.15);
}
.timesheet-scroll .data-table,
.leave-list-scroll .data-table,
.shift-list-scroll .data-table {
  min-width: 650px;
}

/* Time Off Layout Split */
.timeoff-layout {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 1.5rem;
  min-width: 0;
  width: 100%;
}
@media screen and (max-width: 1024px) {
  .timeoff-layout {
    grid-template-columns: 1fr;
    width: 100%;
    overflow: hidden;
  }
}

/* Settings and Sync page style */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
@media screen and (min-width: 769px) {
  .settings-grid .flex-2 {
    grid-column: span 2;
  }
}
.settings-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.divider {
  border: none;
  border-top: 1px solid var(--border-glass);
  margin: 0.5rem 0;
}
.flex-row {
  display: flex;
  gap: 8px;
}

/* Form Controls & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}
.form-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.form-control {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(60, 167, 225, 0.25);
}
select.form-control option {
  background: var(--bg-dark);
  color: #fff;
}



.avail-input.flex-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.action-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.avail-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.avail-input-label {
  font-size: 0.8rem;
  font-weight: 600;
  width: 60px;
}
.avail-inputs-row-times {
  display: flex;
  align-items: center;
  gap: 8px;
}
.avail-inputs-row-times input {
  padding: 4px 8px;
  font-size: 0.8rem;
}

/* Modal Windows styling */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999 !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 12px;
  box-sizing: border-box;
  animation: fadeInModal 0.2s ease-in-out;
}
.modal.active {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeOutModal {
  from { opacity: 1; }
  to { opacity: 0; }
}
.modal.closing {
  animation: fadeOutModal 0.2s ease-in-out forwards;
}

.modal-content {
  width: 100%;
  max-width: 540px;
  margin: auto;
  padding: 1.5rem;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  animation: slideInModal 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.max-w-lg {
  max-width: 660px !important;
}
@keyframes slideInModal {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes slideOutModal {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-20px); opacity: 0; }
}
.modal.closing .modal-content {
  animation: slideOutModal 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-glass);
  flex-shrink: 0;
}
.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
}
.modal-close {
  color: var(--text-secondary);
}

.modal-content form,
.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding-right: 6px;
  flex: 1;
  min-height: 0;
}

/* Custom Sleek Scrollbar for Modals & Table */
.modal-content form::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.scheduler-grid-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.modal-content form::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.scheduler-grid-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
.modal-content form::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.scheduler-grid-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan, #00e5ff);
}

.modal-footer {
  position: sticky;
  bottom: 0;
  background: rgba(18, 24, 38, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-top: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.25rem;
  border-top: 1px solid var(--border-glass);
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.hide { display: none !important; }

/* Report PDF Print styles */
.report-header-print {
  display: none;
}
.row-total {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  border-top: 2px solid var(--border-glass);
}



/* =====================================
   LOGIN & REGISTRATION STYLES
   ===================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}
.login-overlay.active {
  display: flex;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border: 1px solid var(--border-active);
  background: linear-gradient(135deg, rgba(0, 97, 171, 0.05), var(--bg-surface));
  animation: slideInModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.login-header h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 8px;
}
.login-header span {
  font-size: 0.85rem;
  color: var(--accent-gold);
  font-weight: 600;
  letter-spacing: 1px;
}

/* =====================================
   MOBILE RESPONSIVE STYLES
   ===================================== */
.mobile-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(13, 15, 18, 0.95);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 20;
}
.mobile-menu-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}
.mobile-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 25;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.mobile-overlay.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* Tablet and Mobile Screens */
@media screen and (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-split {
    flex-direction: column;
    gap: 16px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .card-header h3 {
    width: 100%;
  }

  .app-container {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .mobile-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    background: rgba(13, 15, 18, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid var(--border-glass) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    width: 100% !important;
    flex-shrink: 0 !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    max-width: 82vw !important;
    height: 100vh !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 90px !important; /* Space for bottom nav bar */
    background: rgba(13, 15, 18, 0.98) !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5) !important;
  }
  .sidebar.open {
    transform: translateX(0) !important;
  }

  .mobile-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.65) !important;
    z-index: 999 !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }
  
  .sidebar-brand h2 {
    font-size: 1.25rem;
  }
  .sidebar-menu .menu-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .main-content {
    padding: 1rem 0.85rem calc(80px + env(safe-area-inset-bottom, 0px)) 0.85rem !important; /* Extra bottom padding for bottom nav */
    gap: 1.25rem !important;
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .topbar {
    display: none !important; /* Mobile header replaces topbar cleanly */
  }

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

  .dashboard-split {
    flex-direction: column;
    gap: 1rem;
  }
  .flex-2, .flex-1 {
    flex: none;
    width: 100%;
  }
  .glass-card {
    padding: 1rem !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
    border-radius: var(--radius-md) !important;
  }
  .glass-card .empty-state h4,
  .glass-card .empty-state p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
  }

  .scheduler-grid-container {
    -webkit-overflow-scrolling: touch;
  }
  .col-employee {
    width: 120px;
  }
  .col-day {
    width: 100px;
  }

  .schedule-container,
  .report-workspace {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .schedule-grid,
  .report-workspace table {
    min-width: 800px; /* Force horizontal scroll for schedule/reports */
  }

  .clock-panel {
    grid-template-columns: 1fr;
  }

  .terminal-actions-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .terminal-actions-grid button {
    height: 56px;
    font-size: 0.85rem;
  }
  
  .table-responsive,
  .timesheet-grid {
    overflow-x: auto;
    display: block;
    width: 100%;
  }

  .timesheet-grid .glass-card {
    min-width: 0;
  }

  .leave-list-scroll, .timesheet-scroll, .shift-list-scroll {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .shift-list-scroll .data-table,
  .timesheet-scroll .data-table {
    min-width: 0;
    width: 100%;
    table-layout: auto;
  }

  /* Mobile Responsive Cards for Leave Requests */
  .leave-list-scroll .data-table,
  .leave-list-scroll .data-table thead,
  .leave-list-scroll .data-table tbody,
  .leave-list-scroll .data-table tr.leave-request-row,
  .leave-list-scroll .data-table tr.leave-request-row td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .leave-list-scroll .data-table thead {
    display: none !important;
  }
  .leave-list-scroll .data-table tr.leave-request-row {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: var(--radius-md) !important;
    margin-bottom: 12px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
  }
  .leave-list-scroll .data-table tr.leave-request-row td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 6px 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    white-space: normal !important;
  }
  .leave-list-scroll .data-table tr.leave-request-row td:last-child {
    border-bottom: none !important;
    padding-top: 10px !important;
  }
  .leave-list-scroll .data-table tr.leave-request-row td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.78rem;
    flex-shrink: 0;
    margin-right: 12px;
  }
  .leave-list-scroll .data-table tr.leave-request-row td.leave-actions-cell {
    justify-content: stretch !important;
  }
  .leave-list-scroll .data-table tr.leave-request-row td.leave-actions-cell .action-group {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .leave-list-scroll .data-table tr.leave-request-row td.leave-actions-cell button {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }

  .data-table th,
  .data-table td {
    padding: 8px 6px !important;
    font-size: 0.78rem !important;
    white-space: nowrap;
  }
  .data-table th:last-child,
  .data-table td:last-child {
    white-space: normal;
  }
  .data-table td[colspan] {
    white-space: normal !important;
  }
  .data-table .empty-state h4,
  .data-table .empty-state p {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  .form-row {
    display: flex;
    flex-direction: column;
  }
  
  .login-card {
    padding: 2rem 1.25rem !important;
    margin: 1rem !important;
    width: calc(100vw - 2rem) !important;
    max-width: 420px !important;
  }

  .modal-content {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: calc(100dvh - 24px) !important;
    padding: 1rem !important;
    margin: 12px auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: var(--radius-md) !important;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .metric-card {
    padding: 0.85rem 1rem !important;
    gap: 10px !important;
  }
  .metric-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 1rem !important;
  }
  .metric-value {
    font-size: 1.25rem !important;
  }
  .metric-label {
    font-size: 0.7rem !important;
  }

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

  .action-bar {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
    padding: 8px !important;
  }
  .action-bar .week-picker {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 6px !important;
    padding: 6px 8px !important;
  }
  .action-bar .week-range-text {
    min-width: 0 !important;
    flex: 1 !important;
    font-size: 0.8rem !important;
  }
  .action-bar button[onclick="window.print()"] {
    display: none !important;
  }
  .action-bar .scheduler-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .form-control, input, select, textarea {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
  }

  /* Prevent Safari from intercepting touch events with huge blurred orbs */
  .orb {
    display: none !important;
  }
}

/* =====================================
   LOADING OVERLAY
   ===================================== */
.loading-overlay { position:fixed; inset:0; background:rgba(18, 18, 28, 0.95); display:flex; flex-direction:column; align-items:center; justify-content:center; z-index:9999; gap:1rem; backdrop-filter: blur(12px); opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s ease, visibility 0.3s ease; }
.loading-overlay.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.spinner { width:40px; height:40px; border:3px solid rgba(255,255,255,0.1); border-top-color:var(--accent-gold); border-radius:50%; animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }

/* =====================================
   TOAST NOTIFICATIONS
   ===================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: auto;
}

.toast.toast-show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-left-color: var(--danger);
}

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

.toast-icon {
  font-size: 1.2rem;
}

.toast.error .toast-icon {
  color: var(--danger);
}

.toast.success .toast-icon {
  color: var(--success);
}

.form-control.invalid {
  border-color: var(--danger) !important;
  background-color: rgba(220, 53, 69, 0.1) !important;
}

.validation-msg {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}
.validation-msg.show {
  display: block;
}

/* UX Audit Iteration 3 Additions */

/* 1. Empty State UI */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-glass);
}
.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}
.empty-state h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-family: var(--font-title);
}
.empty-state p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 300px;
}

/* 2. Micro-Animations */
.btn:active, .shift-card:active {
  transform: scale(0.96);
  transition: transform 0.1s;
}

/* 3. Accessibility Focus */
*:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
  border-radius: inherit;
}

/* 4. Mobile Scheduler Timeline Styles */
.mobile-only-timeline {
  display: none;
}

@media screen and (max-width: 1024px) {
  .desktop-only-grid {
    display: none !important;
  }
  .mobile-only-timeline {
    display: flex !important;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
  }
}

.mobile-day-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mobile-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.mobile-day-name {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.mobile-day-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.mobile-shift-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.mobile-shift-item.unassigned {
  border-left-color: var(--text-danger);
  background: rgba(231, 76, 60, 0.05);
}

.mobile-shift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-shift-staff {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.mobile-shift-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.mobile-shift-time {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-shift-notes {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.mobile-shift-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Roster Custom Roles, Drag & Drop styling */
.calendar-grid-cell {
  position: relative;
  transition: background-color var(--transition-fast), outline var(--transition-fast);
}

.calendar-grid-cell.drag-hover {
  background-color: rgba(0, 229, 255, 0.12) !important;
  outline: 2px dashed var(--accent-cyan) !important;
  outline-offset: -2px;
}

.shift-card {
  transition: transform var(--transition-fast), opacity var(--transition-fast), box-shadow var(--transition-fast);
}

.shift-card.dragging {
  opacity: 0.4;
  transform: scale(0.96);
  cursor: grabbing !important;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
}

.role-item-row {
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.role-item-row:hover {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.1);
}

.shift-card .btn-icon {
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.shift-card:hover .btn-icon {
  opacity: 1;
}

@media screen and (max-width: 1024px) {
  .shift-card .btn-icon {
    opacity: 1;
  }
}

/* 5. Mobile Bottom Navigation Styling */
.mobile-bottom-nav {
  display: none;
}

@media screen and (max-width: 1024px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    background: rgba(13, 15, 18, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--border-glass);
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }
  
  .main-content {
    padding-bottom: 90px !important; /* Spacing to prevent tab bar overlapping dashboard elements */
  }
}

.mobile-nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.72rem;
  font-family: var(--font-title);
  cursor: pointer;
  transition: color var(--transition-fast), transform var(--transition-fast);
  flex: 1;
  padding: 6px 0;
  height: 100%;
}

.mobile-nav-item i {
  font-size: 1.15rem;
}

.mobile-nav-item:active {
  transform: scale(0.92);
}

.mobile-nav-item.active {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* Weekly summary rows styles */
.scheduler-grid-table tfoot tr {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 500;
  border-top: 1px solid var(--border-color);
}
.scheduler-grid-table tfoot tr.grand-total {
  background: rgba(0, 229, 255, 0.05);
  font-weight: 700;
  color: var(--accent-cyan);
}
.scheduler-grid-table tfoot td {
  padding: 10px 12px;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
}
.scheduler-grid-table tfoot td:first-child {
  text-align: left;
  font-weight: 600;
  padding-left: 16px;
}

/* Daily View timeline and layout styles */
.daily-timeline-container {
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-glass);
}
.daily-timeline-visual {
  transition: height 0.3s ease;
}
.timeline-bar {
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}
.timeline-bar:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
  z-index: 10;
}

/* ==========================================================================
   GOOGLE AI SUITE & STITCH VIBE DESIGN SYSTEM (BriskSchedules)
   ========================================================================== */

.ai-ops-hero {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08) 0%, rgba(168, 85, 247, 0.06) 50%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.ai-ops-hero::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.2), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.ai-suite-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 8px;
}

.ai-tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-tab-btn:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
  color: var(--text-primary);
}

.ai-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.18) 0%, rgba(168, 85, 247, 0.12) 100%);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.2);
}

.ai-workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.ai-workflow-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-fast);
  position: relative;
}

.ai-workflow-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ai-workflow-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-workflow-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.ai-node-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.ai-node-step:last-child {
  border-bottom: none;
}

.ai-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.broadcast-output-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  color: #e2e8f0;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}

.sparkle-glow {
  animation: sparklePulse 2.5s infinite alternate ease-in-out;
}

@keyframes sparklePulse {
  0% { text-shadow: 0 0 4px rgba(0, 229, 255, 0.4); }
  100% { text-shadow: 0 0 16px rgba(0, 229, 255, 0.9), 0 0 24px rgba(168, 85, 247, 0.6); }
}

/* ==========================================================================
   COMPACT & SMALL SCREEN SCROLLABILITY SUITE (Mobile, Tablet, Small Laptops)
   ========================================================================== */

@media screen and (max-width: 1024px) {
  .ai-ops-hero {
    padding: 1.1rem;
    margin-bottom: 1rem;
  }
  
  .ai-suite-nav-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .ai-tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .ai-workflow-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .broadcast-output-box {
    max-height: 220px;
    font-size: 0.78rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .mixboard-palette-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  }

  /* Modal small screen scrolling guarantee */
  .modal {
    padding: 12px 8px !important;
  }

  .modal-content {
    width: 96vw !important;
    max-height: calc(100dvh - 20px) !important;
    padding: 1rem !important;
  }

  .modal-body,
  .modal-content form {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: calc(100dvh - 120px) !important;
  }

  /* Ensure all horizontal data tables can scroll seamlessly on touch devices */
  .scheduler-grid-container,
  .timesheet-scroll,
  .leave-list-scroll,
  .shift-list-scroll,
  .data-table-container,
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y;
  }
}

@media screen and (max-width: 480px) {
  .topbar {
    padding-bottom: 0.5rem;
  }

  .topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
  }

  .page-title h1 {
    font-size: 1.35rem;
  }

  .btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   SECURITY AUTO-LOCK, PASSWORD TOGGLE, SEARCH & LIGHT MODE POLISH (v10.5.23)
   ========================================================================== */

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap .form-control {
  padding-right: 44px;
  width: 100%;
}

.btn-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: color 0.18s ease, background 0.18s ease;
}

.btn-password-toggle:hover,
.btn-password-toggle:focus-visible {
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.1);
  outline: none;
}

.login-security-notice {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1rem;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: left;
}

.login-security-notice i {
  color: #f59e0b;
  margin-top: 2px;
  flex-shrink: 0;
}

.login-security-notice.active {
  display: flex;
}

.session-inactivity-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 6px 10px;
  margin-bottom: 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  transition: all 0.2s ease;
}

.session-inactivity-badge.warn {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
}

.session-inactivity-badge.critical {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.55);
  animation: pulse 1.2s infinite;
}

#modal-inactivity-warning {
  z-index: 10050 !important;
}

.inactivity-countdown-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(239, 68, 68, 0.08));
  border: 3px solid rgba(245, 158, 11, 0.65);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.2);
}

.inactivity-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 14px 0 6px;
}

.inactivity-progress-bar {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  transition: width 0.35s linear;
}

.scheduler-staff-search-wrap {
  order: 2;
  margin-left: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 210px;
  max-width: 270px;
  flex: 1 1 210px;
}

.scheduler-staff-search-wrap > i {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  font-size: 0.78rem;
  pointer-events: none;
}

.scheduler-staff-search-wrap input {
  width: 100%;
  height: 32px;
  padding: 4px 30px 4px 30px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.8rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.scheduler-staff-search-wrap input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.14);
}

.btn-clear-staff-search {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.btn-clear-staff-search.visible {
  display: inline-flex;
}

.btn-clear-staff-search:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

@media screen and (max-width: 640px) {
  .scheduler-staff-search-wrap {
    order: 0;
    margin-left: 0;
    max-width: 100%;
    flex: 1 1 100%;
  }
}

/* Comprehensive High-Contrast Light Mode Overrides (v10.5.23) */
body.theme-light {
  --bg-dark: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-glass-hover: rgba(241, 245, 249, 0.98);
  --border-glass: rgba(15, 23, 42, 0.12);
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
}

body.theme-light .sidebar,
body.theme-light .mobile-header,
body.theme-light .mobile-bottom-nav {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
}

body.theme-light .topbar {
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom-color: rgba(15, 23, 42, 0.1) !important;
}

body.theme-light .mobile-title,
body.theme-light .topbar-title h2,
body.theme-light .sidebar .menu-item {
  color: #1e293b !important;
}

body.theme-light .sidebar .menu-item.active {
  background: rgba(14, 165, 233, 0.12) !important;
  color: #0284c7 !important;
}

body.theme-light .mobile-nav-item {
  color: #475569 !important;
}

body.theme-light .mobile-nav-item.active {
  color: #0284c7 !important;
}

body.theme-light .scheduler-grid-table thead th,
body.theme-light .scheduler-grid-table tbody td:first-child,
body.theme-light .scheduler-grid-table tfoot td:first-child {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

body.theme-light .scheduler-grid-table thead th:first-child {
  background: #f1f5f9 !important;
}

body.theme-light .grid-emp-name {
  color: #0f172a !important;
}

body.theme-light .grid-emp-role,
body.theme-light .grid-emp-hours {
  color: #475569 !important;
}

body.theme-light .form-control,
body.theme-light .search-box input,
body.theme-light .scheduler-staff-search-wrap input {
  color: #0f172a !important;
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
}

body.theme-light select.form-control option {
  background: #ffffff;
  color: #0f172a;
}

body.theme-light .modal-content,
body.theme-light .modal-header,
body.theme-light .modal-footer {
  background: #ffffff !important;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

body.theme-light .btn-outline {
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.18) !important;
  background: #f8fafc;
}

body.theme-light .session-inactivity-badge {
  background: #f1f5f9;
  color: #334155;
  border-color: rgba(15, 23, 42, 0.12);
}

body.theme-light .login-security-notice {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

/* ==========================================================================
   ROSTER PRINT PDF & FULL-COLOR WEEKLY ROSTER ENGINE
   ========================================================================== */

.print-only {
  display: none !important;
}

@page {
  size: landscape;
  margin: 5mm 6mm 5mm 6mm;
}

@media print {
  @page {
    size: landscape;
    margin: 4mm 5mm 4mm 5mm;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 0 !important;
    font-size: 10px !important;
    -webkit-font-smoothing: antialiased;
  }

  /* Completely hide all UI navigation, controls, sidebars, buttons, badges, modals, overlays, and wage stats */
  .sidebar, 
  #app-sidebar,
  aside.sidebar,
  .topbar, 
  header.topbar,
  .mobile-header,
  header.mobile-header,
  .mobile-nav, 
  .mobile-bottom-nav,
  .action-bar, 
  div.action-bar,
  .glass-card.action-bar,
  .week-picker,
  .scheduler-controls,
  .controls-row,
  .scheduler-filter-bar,
  #dept-filter-container,
  .dept-filter-group,
  .btn, 
  .btn-icon,
  .cell-add-btn,
  .staff-reorder-btn,
  .staff-reorder-btn-group,
  .shift-card-actions,
  .emp-avatar,
  .emp-hours-bar,
  .text-danger i.fa-trash,
  .modal-backdrop,
  .modal,
  .orb,
  .toast-container,
  .loading-overlay,
  .pulse-indicator,
  .mobile-only-timeline,
  .print-hide,
  .print-hide-wage,
  .wage-val,
  #labor-cost-forecast-badge,
  #wage-ratio-forecast-badge,
  #btn-auto-schedule,
  #btn-master-template,
  #btn-clear-week,
  #btn-copy-week,
  #btn-share-roster-modal,
  #btn-this-week,
  .scheduler-staff-search-wrap,
  #session-inactivity-badge,
  #modal-inactivity-warning,
  #sync-pending-badge,
  #btn-changelog-modal,
  #btn-global-refresh,
  #theme-toggle,
  #dash-quick-actions-card,
  #dash-staff-actions-card,
  #toast-container {
    display: none !important;
  }

  /* Show print-only banners & headers */
  .print-only,
  .roster-print-header {
    display: block !important;
  }

  html, body, .app-root {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: static !important;
    background: #ffffff !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: 1fr !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .tab-panel {
    display: none !important;
  }

  .tab-panel.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-content {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    position: static !important;
    background: #ffffff !important;
  }

  /* Remove overflow restrictions on all grid wrappers */
  .calendar-workspace, 
  .scheduler-grid-container,
  .desktop-only-grid {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Ultra-Compact Scheduler Table Layout in Print (1-2 Landscape Pages Standard) */
  .scheduler-grid-table,
  .scheduler-grid-table tbody,
  .scheduler-grid-table tr,
  .scheduler-grid-table td,
  .calendar-grid-cell {
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: none !important;
  }

  .scheduler-grid-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    page-break-inside: auto;
    font-size: 7.8pt !important;
    color: #0f172a !important;
  }

  .scheduler-grid-table thead {
    display: table-header-group !important;
  }

  .scheduler-grid-table tfoot {
    display: none !important; /* Total hours and summary rows suppressed from print */
  }

  .scheduler-grid-table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-after: auto;
  }

  .scheduler-grid-table th,
  .scheduler-grid-table td {
    border: 1px solid #cbd5e1 !important;
    padding: 2px 3px !important;
    position: static !important;
    vertical-align: top !important;
    line-height: 1.15 !important;
  }

  .scheduler-grid-table thead th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    text-align: center !important;
    font-size: 8pt !important;
    padding: 3px 2px !important;
    border-bottom: 2px solid #64748b !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .scheduler-grid-table thead th.col-employee {
    text-align: left !important;
    width: 115px !important;
    max-width: 120px !important;
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }

  .grid-employee-cell,
  .scheduler-grid-table tbody td:first-child,
  .scheduler-grid-table tbody td.col-employee,
  .scheduler-grid-table tfoot td:first-child {
    background: #f8fafc !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    border-right: 2px solid #64748b !important;
    box-shadow: none !important;
    padding: 2px 4px !important;
    width: 115px !important;
    max-width: 120px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .grid-emp-name,
  .scheduler-grid-table td .grid-emp-name {
    font-size: 8.5pt !important;
    font-weight: 800 !important;
    color: #0f172a !important; /* Bold Jet Black */
    display: block !important;
    line-height: 1.15 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .grid-emp-role,
  .scheduler-grid-table td .grid-emp-role {
    font-size: 7pt !important;
    font-weight: 600 !important;
    color: #475569 !important; /* Dark Slate Grey */
    display: block !important;
    line-height: 1 !important;
    margin-top: 1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .grid-emp-hours,
  .scheduler-grid-table td .grid-emp-hours,
  .emp-hours-wrap,
  .grid-employee-cell .badge {
    display: none !important; /* Total hours completely suppressed from print */
  }

  /* Ultra-Compact Shift Cards */
  .shift-card {
    margin-bottom: 2px !important;
    padding: 1.5px 3px !important;
    border-radius: 2px !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    font-size: 7.2pt !important;
    line-height: 1.1 !important;
    color: #0f172a !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-left-width: 3px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .shift-card-header {
    font-weight: 700 !important;
    font-size: 7.2pt !important;
    line-height: 1.1 !important;
    color: #0f172a !important;
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 1px !important;
  }

  .shift-role-title {
    font-size: 7.2pt !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
  }

  .action-bar .week-picker {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  .action-bar .week-picker #btn-prev-week {
    order: 1 !important;
    flex-shrink: 0 !important;
  }
  .action-bar .week-range-text {
    order: 2 !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 0 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .action-bar .week-picker #btn-next-week {
    order: 3 !important;
    flex-shrink: 0 !important;
  }
  .action-bar button[onclick="window.print()"] {
    display: none !important;
  }
  .action-bar .week-picker #labor-cost-forecast-badge,
  .action-bar .week-picker #wage-ratio-forecast-badge {
    order: 4 !important;
    flex: 1 1 calc(50% - 6px) !important;
    justify-content: center !important;
    font-size: 0.76rem !important;
    height: 30px !important;
    margin-top: 2px !important;
  }
  .stencil-chip {
    font-size: 0.72rem !important;
    padding: 4px 8px !important;
  }
  .action-bar .scheduler-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .shift-card-time {
    font-size: 7.2pt !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    color: #0f172a !important;
  }

  .shift-card-time span {
    display: none !important; /* Shift duration hours suppressed from print */
  }

  .shift-card-breaks {
    font-size: 6.5pt !important;
    line-height: 1 !important;
    color: #64748b !important;
    margin-top: 1px !important;
  }

  .shift-card-notes {
    font-size: 6.5pt !important;
    line-height: 1 !important;
    color: #475569 !important;
    font-style: italic !important;
    margin-top: 1px !important;
  }

  .calendar-grid-cell {
    vertical-align: top !important;
  }

  /* Clean Summary Footer (Hours Only, Wage $ and % Hidden) */
  .scheduler-grid-table tfoot tr.summary-row {
    background: #f8fafc !important;
    font-weight: 600 !important;
    font-size: 7.5pt !important;
    padding: 2px 3px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .scheduler-grid-table tfoot tr.grand-total {
    background: #e2e8f0 !important;
    font-weight: 800 !important;
    font-size: 8pt !important;
    border-top: 2px solid #64748b !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .scheduler-grid-table tfoot td {
    text-align: center !important;
  }

  .scheduler-grid-table tfoot td:first-child {
    text-align: left !important;
  }

  /* Badges in print */
  .badge {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
  }

  .badge-danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #f87171 !important;
  }

  /* ==========================================================================
     DAILY VIEW PRINT ENGINE (Clinical Timeline & Hourly Staffing Density)
     ========================================================================== */
  #panel-daily .glass-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    padding: 8px !important;
    margin-bottom: 10px !important;
    color: #0f172a !important;
  }

  #panel-daily h4 {
    color: #0284c7 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  #daily-hourly-heatmap {
    min-width: 0 !important;
    width: 100% !important;
    gap: 3px !important;
  }

  #daily-hourly-heatmap > div {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    padding: 4px 2px !important;
    min-height: 48px !important;
  }

  #daily-hourly-heatmap > div > div:first-child {
    color: #0f172a !important;
    font-weight: 800 !important;
    font-size: 10px !important;
  }

  #panel-daily div[style*="background: rgba(0, 0, 0, 0.25)"] {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
  }

  #daily-dispensing-safety-badge {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #daily-pharm-hours-text {
    color: #0f172a !important;
    font-weight: 700 !important;
  }

  #daily-scripts-input,
  #panel-daily label[for="daily-scripts-input"] {
    display: none !important;
  }

  #panel-daily .daily-timeline-container {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    padding: 6px !important;
    overflow: visible !important;
  }

  #daily-timeline-visual {
    min-width: 0 !important;
    width: 100% !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #daily-timeline-visual .timeline-bar {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
  }

  #daily-timeline-labels {
    min-width: 0 !important;
    width: 100% !important;
  }

  #daily-timeline-labels span {
    color: #334155 !important;
    font-weight: 700 !important;
    font-size: 9px !important;
  }

  #daily-shifts-tbody tr td {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    padding: 6px 10px !important;
  }

  #daily-shifts-tbody tr td:first-child div:first-child {
    color: #0f172a !important;
    font-weight: 800 !important;
    font-size: 11.5px !important;
  }

  #daily-shifts-tbody tr td:first-child div:last-child {
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 9.5px !important;
  }

  #daily-shifts-tbody tr td .badge {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    font-weight: 700 !important;
  }

  #main-panel {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
  }
}

/* ==========================================================================
   STRICT ROLE-BASED ACCESS CONTROL & FINANCIAL DATA PRIVACY
   ========================================================================== */
body.role-employee .manager-only,
body.role-employee .wage-val,
body.role-employee #labor-cost-forecast-badge,
body.role-employee #wage-ratio-forecast-badge,
body.role-employee #rep-wage-kpi-card,
body.role-employee #rep-sales-reconcile-card,
body.role-employee #menu-employees,
body.role-employee #menu-reports,
body.role-employee #menu-settings,
body.role-employee #scheduler-manager-controls,
body.role-employee .staff-reorder-btn-group,
body.role-employee .cell-add-btn,
body.role-employee #timeclock-admin-panel {
  display: none !important;
}

/* ==========================================================================
   DAILY VIEW — INLINE DRAG-TO-ADJUST SHIFT BARS
   ========================================================================== */

/* Prevent text selection on timeline bars during drag */
.timeline-bar {
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

/* Invisible resize handle hotzones on left and right edges */
.timeline-bar-handle {
  position: absolute;
  top: 0;
  width: 6px;
  height: 100%;
  z-index: 5;
  cursor: col-resize;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.timeline-bar-handle::after {
  content: '';
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 2px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1px;
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.6);
}
.timeline-bar-handle-left {
  left: -2px;
}
.timeline-bar-handle-left::after {
  left: 2px;
}
.timeline-bar-handle-right {
  right: -2px;
}
.timeline-bar-handle-right::after {
  right: 2px;
}
.timeline-bar:hover .timeline-bar-handle,
.timeline-bar-handle:hover {
  opacity: 1;
}

/* Active dragging state */
.timeline-bar.dragging {
  opacity: 0.85 !important;
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.35), 0 0 0 1px rgba(0, 229, 255, 0.3) !important;
  z-index: 10 !important;
}

/* Floating tooltip during drag */
.timeline-drag-tooltip {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  background: rgba(10, 12, 18, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #e0f7fa;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translate(-50%, -130%);
}

/* Global cursor override during drag — prevents flicker */
body.timeline-dragging,
body.timeline-dragging * {
  cursor: grabbing !important;
}
body.timeline-dragging-resize,
body.timeline-dragging-resize * {
  cursor: col-resize !important;
}
body.timeline-dragging .timeline-bar:not(.dragging) {
  pointer-events: none;
}

/* ==========================================================================
   DEPARTMENT FILTER PILLS & SHIFT STENCILS (v10.3.0)
   ========================================================================== */

/* Department Filter Pills */
.btn-dept-filter {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-dept-filter:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-dept-filter.active {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}
.dept-count-badge {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 700;
}
.btn-dept-filter.active .dept-count-badge {
  background: rgba(0, 229, 255, 0.25);
  color: #fff;
}

/* Shift Stencil Chips */
.stencil-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.stencil-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}
.stencil-chip.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
  color: #fff;
}

/* Stamp Mode Active State */
body.stamp-mode-active .calendar-grid-cell {
  cursor: crosshair !important;
}
body.stamp-mode-active .calendar-grid-cell:hover {
  background: rgba(0, 229, 255, 0.12) !important;
  outline: 1px dashed var(--accent-cyan);
}

/* Katherine's Weekly Payroll Summary (Mon-Sun) Print Styling */
@media print {
  body.printing-kat-payroll {
    background: #ffffff !important;
    color: #000000 !important;
  }
  body.printing-kat-payroll .app-container,
  body.printing-kat-payroll .sidebar,
  body.printing-kat-payroll .topbar,
  body.printing-kat-payroll .main-content,
  body.printing-kat-payroll .mobile-bottom-nav,
  body.printing-kat-payroll .modal-header,
  body.printing-kat-payroll .modal-footer,
  body.printing-kat-payroll #kat-payroll-status-banner,
  body.printing-kat-payroll .orb {
    display: none !important;
  }
  body.printing-kat-payroll #modal-kat-payroll-summary {
    position: static !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }
  body.printing-kat-payroll #modal-kat-payroll-summary .modal-content {
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
  }
  body.printing-kat-payroll #kat-payroll-printable-area {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  body.printing-kat-payroll .kat-print-header,
  body.printing-kat-payroll .kat-print-signatures {
    display: block !important;
  }
  body.printing-kat-payroll .kat-print-only {
    display: block !important;
  }
  body.printing-kat-payroll #kat-payroll-table {
    border-collapse: collapse !important;
    width: 100% !important;
    color: #000000 !important;
  }
  body.printing-kat-payroll #kat-payroll-table th,
  body.printing-kat-payroll #kat-payroll-table td {
    border: 1px solid #94a3b8 !important;
    padding: 6px 8px !important;
    color: #000000 !important;
    font-size: 8.5pt !important;
  }
  body.printing-kat-payroll #kat-payroll-table th {
    background: #f1f5f9 !important;
    font-weight: 700 !important;
  }
  body.printing-kat-payroll #kat-payroll-table tfoot tr {
    background: #e2e8f0 !important;
    font-weight: 800 !important;
  }
  body.printing-kat-payroll .badge {
    border: 1px solid #64748b !important;
    color: #000000 !important;
    background: #f8fafc !important;
  }
}

/* ==========================================================================
   MULTI-STORE SWITCHER (Peter Kim & Katherine Nguyen Executive Clearance)
   ========================================================================== */
.store-switcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.store-switcher-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.store-switcher-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--brand-primary);
  box-shadow: 0 0 12px rgba(var(--brand-primary), 0.25);
}

.store-badge-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 8px var(--brand-primary);
  flex-shrink: 0;
}

.store-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 270px;
  background: #141923;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
  z-index: 1100;
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.store-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.store-menu-item:last-child {
  border-bottom: none;
}

.store-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.store-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.store-dot.dot-amcal {
  background: #0066cc;
  box-shadow: 0 0 6px #0066cc;
}

.store-dot.dot-budgewoi {
  background: #7a2682;
  box-shadow: 0 0 6px #ff6b00;
}

.store-text strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.store-text small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Employee Panel Department Filter Pills & Store Context Banner */
.employee-store-banner {
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-dept-filter-emp {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-dept-filter-emp:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-dept-filter-emp.active {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

[data-theme="budgewoi"] .btn-dept-filter-emp.active {
  background: rgba(255, 107, 0, 0.15);
  color: #ff6b00;
  border-color: #ff6b00;
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.25);
}

.employee-card-inactive {
  filter: grayscale(0.2);
}

/* Mobile Daily View & Master Roster Template Responsive Polish */
@media screen and (max-width: 768px) {
  #panel-daily > .glass-card {
    padding: 12px !important;
  }
  #daily-weekday-strip {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
  }
  #daily-weekday-strip > button {
    min-width: 68px !important;
    flex-shrink: 0 !important;
  }
  .daily-leave-banner {
    padding: 8px 10px !important;
    font-size: 0.75rem !important;
  }
  #modal-master-template .modal-content {
    width: 96vw !important;
    max-width: 96vw !important;
    padding: 14px !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
  }
}

/* ==========================================================================
   v10.5.24: Topbar Resources Dropdown, Collapsible Dept Groups, Confirm Modal & Reports Light Mode
   ========================================================================== */
.topbar-resources-wrap {
  position: relative;
  display: inline-block;
}

.topbar-ver-pill {
  background: rgba(0, 229, 255, 0.14);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  line-height: 1.3;
}

.topbar-resources-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 245px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  padding: 6px;
  z-index: 260;
  backdrop-filter: blur(18px);
}

.topbar-resources-menu.open {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.15s ease-out;
}

.topbar-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s ease, color 0.15s ease;
}

.topbar-menu-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.topbar-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.topbar-menu-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.topbar-menu-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Scheduler Department Grouping Toggle & Collapsible Header Rows */
#btn-toggle-dept-grouping.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.18);
}

.scheduler-dept-group-row td {
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0 !important;
}

.scheduler-dept-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.scheduler-dept-group-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.scheduler-dept-group-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.scheduler-dept-group-count {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* Reports Reconciliation Summary Grid */
.recon-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
}

/* In-App Confirmation Dialog Modal */
#modal-confirm-dialog {
  z-index: 10050 !important;
}

.confirm-dialog-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.confirm-dialog-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(0, 229, 255, 0.14);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.confirm-dialog-icon-wrap.danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.confirm-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* High-Contrast Light Mode Overrides for v10.5.24 Additions */
body.theme-light .topbar-resources-menu {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

body.theme-light .topbar-menu-item:hover {
  background: #f1f5f9;
}

body.theme-light .topbar-ver-pill {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
  border-color: rgba(2, 132, 199, 0.35);
}

body.theme-light #btn-toggle-dept-grouping.active {
  background: rgba(2, 132, 199, 0.1);
  border-color: #0284c7;
  color: #0369a1;
  box-shadow: none;
}

body.theme-light .scheduler-dept-group-row td {
  background: #f1f5f9;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
}

body.theme-light .scheduler-dept-group-toggle {
  color: #0f172a;
}

body.theme-light .scheduler-dept-group-toggle:hover {
  background: #e2e8f0;
}

body.theme-light .scheduler-dept-group-count {
  background: #e2e8f0;
  color: #334155;
}

body.theme-light .recon-summary-grid {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

body.theme-light .confirm-dialog-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

@media print {
  .topbar-resources-wrap,
  #btn-toggle-dept-grouping,
  .scheduler-dept-group-row,
  #modal-confirm-dialog {
    display: none !important;
  }
}


