:root {
  /* Brand Palette - Anchor & Accent */
  --navy: #091E36;
  --navy-secondary: #0F2B4A;
  --teal: #38C2B7;
  --teal-dark: #00B2B6;
  --teal-light: #4FE0D3;
  --coral: #FF9E7D;
  --coral-light: #FFD3C4;
  --bg-main: #F7F9FB;
  --ink: #0B2038;
  --muted: #6B7C93;
  --line: #E3E9EF;
  --success: #17B685;
  --success-dark: #0C9A6E;
  --success-bg: #E9F8F1;
  --destructive: #E5484D;
  --destructive-bg: #FDEDEE;

  /* M3 Mapping */
  --background: #F7F9FB;
  --on-background: #0B2038;
  --surface: #F7F9FB;
  --on-surface: #0B2038;
  --surface-variant: #E3E9EF;
  --on-surface-variant: #6B7C93;
  --inverse-surface: #091E36;
  --inverse-on-surface: #ECF2F4;
  --outline: #7C8CA1;
  --outline-variant: #E3E9EF;

  --primary: #00695F;
  --on-primary: #FFFFFF;
  --primary-container: #38C2B7;
  --on-primary-container: #091E36;

  --secondary: #3E5771;
  --on-secondary: #FFFFFF;
  --secondary-container: #D7E3F5;
  --on-secondary-container: #091E36;

  --tertiary: #8A3B23;
  --on-tertiary: #FFFFFF;
  --tertiary-container: #FF9E7D;
  --on-tertiary-container: #8A3B23;

  --error: #E5484D;
  --on-error: #FFFFFF;
  --error-container: #FDEDEE;
  --on-error-container: #7A1315;

  /* Keep legacy variable names but map them to the new design tokens to prevent breakage */
  --tk-cyan-light: #4FE0D3;
  --tk-cyan-main: #38C2B7;
  --tk-blue-main: #38C2B7;
  --tk-blue-dark: #091E36;
  
  --tk-gradient-primary: linear-gradient(135deg, #38C2B7 0%, #00695F 100%);
  --tk-gradient-dark: linear-gradient(135deg, #0F2B4A 0%, #091E36 100%);
  --tk-gradient-text: linear-gradient(90deg, #0B2038 0%, #3E5771 100%);
  --tk-gradient-header: linear-gradient(180deg, #0F2B4A 0%, #091E36 100%);
  --tk-gradient-sidebar: linear-gradient(180deg, #091E36 0%, #0F2B4A 100%);
  
  --tk-bg-canvas: #F7F9FB;
  --tk-bg-app: #F7F9FB;
  --tk-bg-surface: #FFFFFF;
  --tk-glass-bg: rgba(255, 255, 255, 0.9);
  --tk-glass-border: 1px solid #E3E9EF;
  --tk-glass-shadow: 0px 4px 20px rgba(9, 30, 54, 0.05);

  --tk-text-heading: #0B2038;
  --tk-text-main: #0B2038;
  --tk-text-body: #6B7C93;
  --tk-text-muted: #6B7C93;
  --tk-text-inverse: #FFFFFF;
  
  --tk-border-light: #E3E9EF;
}

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@300;400;500;600;700;800;900&family=Geist:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

html, body { 
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    height: 100%;
    width: 100%;
}

body, .app-root, #app {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background-color: var(--tk-bg-canvas) !important;
    background-image: 
      radial-gradient(at 0% 0%, rgba(0, 229, 255, 0.12) 0px, transparent 50%),
      radial-gradient(at 100% 100%, rgba(0, 85, 165, 0.08) 0px, transparent 50%) !important;
    background-attachment: fixed !important;
}

/* Empty State Pastel Icon Container */
.empty-state-icon-bg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(34, 211, 238, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}

/* Roster Summary Metric Pill Badges */
.pill-badge-spend {
    background: rgba(0, 136, 204, 0.1) !important;
    color: var(--tk-blue-main) !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    display: inline-block !important;
}

.pill-badge-target {
    background: rgba(100, 116, 139, 0.1) !important;
    color: var(--tk-text-muted) !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    display: inline-block !important;
}

.pill-badge-remaining {
    background: rgba(0, 229, 255, 0.15) !important;
    color: var(--tk-blue-dark) !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    display: inline-block !important;
}

/* Roster Action Toolbar Buttons */
.btn-publish-hero {
    background: var(--tk-gradient-primary) !important;
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.3) !important;
    border: none !important;
    color: #FFFFFF !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-publish-hero:hover {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.4) !important;
}

.btn-magic-blanks {
    border: 2px solid var(--tk-cyan-main) !important;
    color: var(--tk-blue-dark) !important;
    background: transparent !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-magic-blanks:hover {
    background: rgba(0, 229, 255, 0.1) !important;
    transform: translateY(-1px) !important;
}

/* Break Indicator Badge */
.break-indicator-pill {
    color: var(--tk-blue-main) !important;
    background: rgba(0, 136, 204, 0.1) !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* ==================================================
   UNIVERSAL TABKEY DIGITAL DESIGN SYSTEM UTILITIES
   ================================================== */

/* Universal Header Container */
.tk-header-container {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 16px !important;
    border-bottom: 2px solid rgba(0, 229, 255, 0.15) !important;
    padding-bottom: 16px !important;
    margin-bottom: 24px !important;
}

/* Universal Content Card Canvas */
.tk-content-card {
    background: var(--tk-glass-bg) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: var(--tk-glass-shadow) !important;
    border-radius: 24px !important;
    padding: 24px !important;
}

/* Universal Inner Divider */
.tk-divider {
    border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
}

/* Universal Primary Action Buttons */
.tk-btn-primary {
    background: var(--tk-gradient-primary) !important;
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.3) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 10px 20px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
}
.tk-btn-primary:hover {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.4) !important;
}

/* Universal Empty State Circle Container */
.tk-empty-state-icon-bg {
    background: rgba(34, 211, 238, 0.15) !important;
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 16px auto !important;
}

/* Universal Interactive Row Hover */
.tk-row-hover {
    padding: 16px 0 !important;
    transition: all 0.2s ease !important;
}
.tk-row-hover:hover {
    background: rgba(0, 136, 204, 0.03) !important;
    transform: translateX(4px) !important;
    border-radius: 8px !important;
    padding: 16px !important;
}

/* Universal Status Badges */
.tk-status-active {
    background: rgba(0, 229, 255, 0.15) !important;
    color: var(--tk-blue-dark) !important;
    padding: 4px 12px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    display: inline-block !important;
}

.tk-status-pending {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #B45309 !important;
    padding: 4px 12px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    display: inline-block !important;
}

.kiosk-container {
    overscroll-behavior: none !important;
}

html { 
    font-size: 17.5px; 
    scroll-behavior: smooth;
} 
@media (min-width: 768px) { html { font-size: 17px; } } 
@media (min-width: 1280px) { html { font-size: 18px; } } 

body { 
    font-family: 'Hanken Grotesk', 'Plus Jakarta Sans', sans-serif; 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
    background-color: var(--tk-bg-app) !important; 
    color: var(--tk-text-main); 
}

/* Premium Animations & Transitions */
.animate-fade-in { 
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
}

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

/* Micro-Interaction Transitions */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hover-lift:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 22px -4px rgba(0, 136, 204, 0.18), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}
.hover-lift:active {
    transform: scale(0.98);
}

/* Custom High-Fidelity Scrollbars */
.custom-scrollbar::-webkit-scrollbar { 
    height: 6px; 
    width: 6px; 
}
.custom-scrollbar::-webkit-scrollbar-track { 
    background: rgba(0, 0, 0, 0.02); 
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb { 
    background: rgba(203, 213, 225, 0.85); 
    border-radius: 10px; 
    transition: background 0.3s;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover { 
    background: rgba(148, 163, 184, 0.9); 
}

/* Master Glassmorphism & Cards (Light Theme Surface) */
.glass-panel { 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(20px) saturate(180%); 
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--line); 
}

.glass-card,
.tk-card,
.card-surface,
.bg-white {
    background-color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(9, 30, 54, 0.04) !important;
    border-radius: 24px !important;
    border: 1px solid #E3E9EF !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: var(--ink) !important;
}
.glass-card:hover,
.tk-card:hover,
.card-surface:hover,
.bg-white:hover {
    border-color: rgba(56, 194, 183, 0.3) !important;
    box-shadow: 0 10px 30px rgba(56, 194, 183, 0.08) !important;
    transform: scale(1.01) !important;
}

/* Glowing Shadows */
.shadow-primary-glow {
    box-shadow: 0 10px 25px -5px rgba(56, 194, 183, 0.35), 0 8px 10px -6px rgba(56, 194, 183, 0.2);
}
.shadow-emerald-glow {
    box-shadow: 0 10px 25px -5px rgba(23, 182, 133, 0.3), 0 8px 10px -6px rgba(23, 182, 133, 0.15);
}
.shadow-red-glow {
    box-shadow: 0 10px 25px -5px rgba(229, 72, 77, 0.3), 0 8px 10px -6px rgba(229, 72, 77, 0.15);
}

/* Tabkey Digital Brand Gradient Utilities */
/* Midnight Kinetic Buttons styling */
.bg-brand-gradient {
    background: var(--tk-gradient-primary) !important;
}
.btn-brand-gradient,
.btn-primary-action,
.tk-btn-primary {
    background: #38C2B7 !important;
    color: #091E36 !important;
    font-weight: 800 !important;
    border: none !important;
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.4), 0 4px 14px 0 rgba(56, 194, 183, 0.35) !important;
    border-radius: 16px !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer !important;
}
.btn-brand-gradient:hover,
.btn-primary-action:hover,
.tk-btn-primary:hover {
    transform: scale(1.02) !important;
    opacity: 0.96;
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.45), 0 6px 20px 0 rgba(56, 194, 183, 0.45) !important;
}

/* Secondary Translucent Glass Buttons */
.btn-secondary,
.btn-outline,
.btn-outline-tk,
.btn-secondary-action {
    background: rgba(9, 30, 54, 0.03) !important;
    border: 1px solid #E3E9EF !important;
    color: #0B2038 !important;
    font-weight: 700 !important;
    border-radius: 16px !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.btn-secondary:hover,
.btn-outline:hover,
.btn-outline-tk:hover,
.btn-secondary-action:hover {
    transform: scale(1.02) !important;
    background-color: rgba(9, 30, 54, 0.07) !important;
    border-color: #7C8CA1 !important;
}

/* Universal Button Hover & Scale Micro-Interactions */
button, .btn, input[type="button"], input[type="submit"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}
button:hover, .btn:hover {
    transform: scale(1.02);
}
button:active, .btn:active {
    transform: scale(0.98);
}

/* Typography & Section Headers */
.tk-gradient-title,
.gradient-title,
.section-title,
.section-header-title,
.tk-section-title {
    background: var(--tk-gradient-text) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    display: inline-block;
    font-weight: 800;
}

/* Section heading component from DESIGN.md */
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(120deg, rgba(56,194,183,.10), rgba(9,30,54,.03));
  border: 1px solid rgba(56,194,183,.25);
  border-radius: 14px; padding: 16px 22px; margin-bottom: 14px;
}
.sec-head .ic {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--navy); color: var(--teal);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}

/* Dividers & Borders */
table, th, td, tr, hr, .border-light, .divide-y > * {
    border-color: var(--tk-border-light) !important;
}

/* Sidebar (Navigation) Overhaul */
aside, .sidebar-container {
    background: var(--tk-gradient-sidebar) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.sidebar-item { 
    position: relative; 
    padding: 12px 18px; 
    border-radius: 12px; 
    color: var(--tk-text-inverse) !important;
    opacity: 0.7; 
    font-weight: 600; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    cursor: pointer; 
    margin-bottom: 5px; 
    overflow: hidden; 
    white-space: nowrap; 
}

.sidebar-item i,
.sidebar-item span {
    color: var(--tk-text-inverse) !important;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-item:hover {
    opacity: 1 !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--tk-text-inverse) !important;
}

.sidebar-item:hover i,
.sidebar-item:hover span {
    color: var(--tk-text-inverse) !important;
    opacity: 1 !important;
}

/* Unified Active State (Teal Pill with Navy Text/Icon) */
.sidebar-item.sidebar-active,
.sidebar-item-home.sidebar-active,
.sidebar-item-roster.sidebar-active,
.sidebar-item-staff.sidebar-active,
.sidebar-item-compliance.sidebar-active,
.sidebar-item-swaps.sidebar-active,
.sidebar-item-leave.sidebar-active,
.sidebar-item-time.sidebar-active,
.sidebar-item-reports.sidebar-active,
.sidebar-item-payroll.sidebar-active,
.sidebar-item-system.sidebar-active,
.sidebar-item-tasks.sidebar-active { 
    background: #38C2B7 !important; 
    color: #091E36 !important; 
    opacity: 1 !important;
    font-weight: 800 !important; 
    border-left: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(56, 194, 183, 0.4) !important;
}

.sidebar-item.sidebar-active i,
.sidebar-item.sidebar-active span {
    color: #091E36 !important;
    opacity: 1 !important;
}

/* Data Visualizations & Status Badges */
.metric-actual-bar, .bg-cyan-main {
    background-color: var(--tk-cyan-main) !important;
}
.metric-scheduled-bar, .bg-blue-main {
    background-color: var(--tk-blue-main) !important;
}

.badge-active, .toggle-active, .status-enabled {
    background-color: var(--tk-cyan-main) !important;
    color: var(--tk-on-primary-container) !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
}

.status-disabled, .badge-danger, .btn-destructive {
    background-color: #E5484D !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
}

/* Custom Interactive Clocking Dial Pulse */
.clock-pulsator {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.15;
    animation: pulsateRing 2.2s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
    pointer-events: none;
}

@keyframes pulsateRing {
    0% { transform: scale(0.92); opacity: 0.4; }
    50% { opacity: 0.15; }
    100% { transform: scale(1.15); opacity: 0; }
}

/* Numpad Button Enhancements */
.numpad-btn { 
    width: 100%; 
    aspect-ratio: 1; 
    font-size: 28px; 
    font-weight: 800; 
    font-family: 'Geist', monospace !important;
    border-radius: 24px; 
    background: rgba(255, 255, 255, 0.06); 
    color: #FFFFFF; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); 
    border: 1px solid rgba(56, 194, 183, 0.35); 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); 
}
.numpad-btn:hover {
    border-color: #38C2B7;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    transform: scale(1.04);
}
.numpad-btn:active { 
    transform: scale(0.96); 
    background: rgba(255, 255, 255, 0.04); 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

/* Styling Color Inputs */
input[type="color"] { 
    -webkit-appearance: none; 
    border: none; 
    padding: 0; 
    overflow: hidden; 
}
input[type="color"]::-webkit-color-swatch-wrapper { 
    padding: 0; 
}
input[type="color"]::-webkit-color-swatch { 
    border: none; 
    border-radius: 0.75rem; 
}

/* Premium Scroll indicators for Roster/Swiping grids */
.swipe-indicator {
    position: relative;
}
.swipe-indicator::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(90deg, transparent 0%, rgba(248, 250, 252, 0.8) 100%);
    pointer-events: none;
}

/* Birthday Alert Pulsing Highlight */
@keyframes softPulse {
    0% { border-color: rgba(168, 85, 247, 0.35); box-shadow: 0 0 10px rgba(168, 85, 247, 0.08); }
    50% { border-color: rgba(236, 72, 153, 0.55); box-shadow: 0 0 20px rgba(236, 72, 153, 0.18); }
    100% { border-color: rgba(168, 85, 247, 0.35); box-shadow: 0 0 10px rgba(168, 85, 247, 0.08); }
}
.birthday-alert-pulse {
    animation: softPulse 3.5s infinite ease-in-out;
}

@media print { 
    body * { visibility: hidden; } 
    .print-area, .print-area * { visibility: visible; } 
    .print-area { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: none; overflow: visible !important; padding: 0 !important; background: white !important; } 
    .no-print { display: none !important; } 
    .print-bg-fix { print-color-adjust: exact; -webkit-print-color-adjust: exact; } 
}

