/* AttendFast Professional CSS Design System - Enhanced Vibrant & Flexible Edition */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette - Light Mode */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --border-color: #e2e8f0;
  --border-glass: rgba(226, 232, 240, 0.8);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --purple: #8b5cf6;
  --purple-bg: #f5f3ff;
  --cyan: #06b6d4;
  --cyan-bg: #ecfeff;
  --pink: #ec4899;
  --pink-bg: #fdf2f8;
  --indigo: #6366f1;
  --indigo-bg: #eef2ff;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --sidebar-width: 270px;
}

[data-theme="dark"] {
  --bg-primary: #0b1329;
  --bg-surface: #1e293b;
  --bg-glass: rgba(30, 41, 59, 0.88);
  --border-color: #334155;
  --border-glass: rgba(51, 65, 85, 0.7);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --accent-primary: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.18);

  --success-bg: rgba(16, 185, 129, 0.18);
  --warning-bg: rgba(245, 158, 11, 0.18);
  --danger-bg: rgba(239, 68, 68, 0.18);
  --purple-bg: rgba(139, 92, 246, 0.18);
  --cyan-bg: rgba(6, 182, 212, 0.18);
  --pink-bg: rgba(236, 72, 153, 0.18);
  --indigo-bg: rgba(99, 102, 241, 0.18);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* App Container Layout */
#app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #2563eb, #8b5cf6, #ec4899);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.3rem;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.brand-text {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  padding: 1.25rem 0.85rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 0.85rem 0.25rem;
}

.nav-item button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.nav-item button:hover {
  background: var(--accent-soft);
  color: var(--accent-primary);
  transform: translateX(3px);
}

.nav-item.active button {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* Colorful Nav Icon Badges */
.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.nav-item.active .nav-icon {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

.sidebar-user {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-primary);
  margin: 0.75rem;
  border-radius: var(--radius-md);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.user-name {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* Main Content Wrapper */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header Navbar */
.top-header {
  height: 72px;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-title h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: all 0.2s;
}

.theme-toggle-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-primary);
}

/* Main Content Body */
.content-body {
  padding: 2rem;
  flex: 1;
}

/* Easy Guided Tour / Demo Banner */
.demo-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.demo-banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.demo-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.demo-banner-text h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.demo-banner-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

/* Cards & Containers */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Colorful Icon Containers */
.icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.icon-box:hover {
  transform: scale(1.08);
}

.icon-blue { background: var(--accent-soft); color: var(--accent-primary); }
.icon-emerald { background: var(--success-bg); color: var(--success); }
.icon-amber { background: var(--warning-bg); color: var(--warning); }
.icon-rose { background: var(--danger-bg); color: var(--danger); }
.icon-purple { background: var(--purple-bg); color: var(--purple); }
.icon-cyan { background: var(--cyan-bg); color: var(--cyan); }
.icon-pink { background: var(--pink-bg); color: var(--pink); }
.icon-indigo { background: var(--indigo-bg); color: var(--indigo); }

/* Grid System */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

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

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

/* KPI Stat Cards */
.stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Punch Card Widget */
.punch-widget {
  background: linear-gradient(135deg, #1e293b, #0f172a, #172554);
  color: white;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-time {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.live-date {
  font-size: 1rem;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.punch-btn-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Colorful Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.badge-present { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-late { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-leave { background: var(--purple-bg); color: var(--purple); border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-absent { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-remote { background: var(--accent-soft); color: var(--accent-primary); border: 1px solid rgba(37, 99, 235, 0.3); }

.badge i {
  margin-right: 0.25rem;
}

/* Custom Data Tables & Modern Horizontal Scroll Engine */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  position: relative;
}

.table-container::-webkit-scrollbar {
  height: 6px;
}

.table-container::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 99px;
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.3);
  border-radius: 99px;
  transition: background 0.2s ease;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-primary);
  padding: 0.9rem 1.15rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 5;
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  white-space: nowrap;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: var(--accent-soft); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
}

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover { background: var(--bg-primary); }

.btn-lg {
  padding: 0.9rem 2.25rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* Form Controls */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-container {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 580px;
  padding: 2rem;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform 0.25s ease;
  border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-container { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-title { font-size: 1.25rem; font-weight: 800; }

.close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* Kiosk Entrance Mode Styling */
.kiosk-wrapper {
  min-height: 100vh;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: white;
}

.kiosk-card {
  background: rgba(30, 41, 59, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 3rem;
  width: 100%;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.pin-display {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.pin-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #64748b;
  transition: all 0.2s;
}

.pin-dot.filled {
  background: #3b82f6;
  border-color: #3b82f6;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.9);
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 330px;
  margin: 0 auto;
}

.num-btn {
  height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1.6rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.num-btn:hover {
  background: rgba(59, 130, 246, 0.35);
  border-color: #3b82f6;
  transform: scale(1.05);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-left: 4px solid var(--accent-primary);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Mobile Toggle Button & Drawer Backdrop */
.mobile-toggle-btn {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.mobile-toggle-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* Responsive Media Queries & Mobile Aesthetics Enhancements */
@media (max-width: 900px) {
  .mobile-toggle-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 12px !important;
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
    z-index: 50 !important;
  }
  
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4) !important;
  }

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

  .sidebar-backdrop {
    z-index: 999 !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .top-header {
    height: 60px !important;
    padding: 0 0.85rem !important;
    background: var(--bg-glass) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  }

  .header-title {
    min-width: 0;
    flex: 1;
  }

  .header-title h1 {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 180px;
  }

  .header-actions {
    gap: 0.5rem !important;
    flex-shrink: 0;
  }

  .theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.15rem;
  }

  .content-body {
    padding: 1rem 0.85rem;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .card {
    padding: 1.15rem;
    border-radius: var(--radius-md);
  }

  .punch-widget {
    padding: 1.5rem 1rem;
    border-radius: 20px;
  }

  .live-time {
    font-size: 2.2rem;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .demo-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .btn-lg {
    width: 100%;
    padding: 0.85rem 1.25rem;
  }
}

@media (max-width: 640px) {
  .hide-mobile {
    display: none !important;
  }

  .header-title h1 {
    max-width: 135px !important;
  }
}

/* Mobile Data Table Horizontal Scroll Engine (< 768px) */
@media (max-width: 768px) {
  .table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-surface) !important;
    border-radius: 14px !important;
    box-shadow: var(--shadow-sm) !important;
  }

  .data-table {
    display: table !important;
    width: 100% !important;
    min-width: 680px !important;
  }

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

  .data-table tbody {
    display: table-row-group !important;
  }

  .data-table tr {
    display: table-row !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
  }

  .data-table th {
    display: table-cell !important;
    padding: 0.75rem 0.9rem !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
  }

  .data-table td {
    display: table-cell !important;
    padding: 0.75rem 0.9rem !important;
    font-size: 0.83rem !important;
    white-space: nowrap !important;
    border-bottom: 1px solid var(--border-color) !important;
    text-align: left !important;
  }

  .data-table td::before {
    display: none !important;
  }
}

  .modal-container {
    padding: 1.25rem !important;
    border-radius: 20px !important;
    width: 95% !important;
  }

  .form-input, .form-select, .form-textarea, .sleek-select-trigger, .sleek-picker-input {
    min-height: 46px !important;
    font-size: 0.92rem !important;
  }
}

/* -------------------------------------------------------------
   GLOBAL LOADER & SKELETON SHIMMER SYSTEM
   ------------------------------------------------------------- */
#topLoadingBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #60a5fa);
  z-index: 99999;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.7);
  pointer-events: none;
}

.global-loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.global-loader-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loader-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.75rem 2.25rem;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.loader-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, var(--bg-primary) 25%, var(--bg-surface) 50%, var(--bg-primary) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
