/* ==========================================================================
   Labour Supply Admin Portal - Modern CSS Design System
   ========================================================================== */

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

:root {
  /* Color Palette - Light / White Theme */
  --bg-dark: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  /* Card Accent Colors */
  --munshi-color: #2563eb;
  --munshi-glow: rgba(37, 99, 235, 0.2);
  --munshi-gradient: linear-gradient(135deg, #1d4ed8, #3b82f6);

  --admin-color: #db2777;
  --admin-glow: rgba(219, 39, 119, 0.2);
  --admin-gradient: linear-gradient(135deg, #be185d, #ec4899);

  --demo-color: #059669;
  --demo-glow: rgba(5, 150, 105, 0.2);
  --demo-gradient: linear-gradient(135deg, #047857, #10b981);

  --border-glass: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.18);

  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(at 10% 10%, rgba(37, 99, 235, 0.07) 0px, transparent 50%),
    radial-gradient(at 90% 20%, rgba(219, 39, 119, 0.07) 0px, transparent 50%),
    radial-gradient(at 50% 90%, rgba(5, 150, 105, 0.07) 0px, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Navbar Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.8);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.brand-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-badges {
  display: flex;
  gap: 12px;
  align-items: center;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Main Layout */
.hero-container {
  flex: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  width: 100%;
}

.hero-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 4rem auto;
}

.hero-header .subtitle {
  color: #3b82f6;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 16px;
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* 3 Cards Grid Layout */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

/* Card General Styling */
.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  transition: var(--transition-smooth);
}

.portal-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

/* Specific Card Themes */
/* 1. Munshi Login Card */
.portal-card.munshi-card:hover {
  box-shadow: 0 20px 40px -15px var(--munshi-glow);
}
.portal-card.munshi-card::before {
  background: var(--munshi-gradient);
}
.portal-card.munshi-card .card-icon-box {
  background: rgba(59, 130, 246, 0.12);
  color: var(--munshi-color);
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.portal-card.munshi-card .btn-card {
  background: var(--munshi-gradient);
  box-shadow: 0 4px 15px var(--munshi-glow);
}

/* 2. Admin Login Card */
.portal-card.admin-card:hover {
  box-shadow: 0 20px 40px -15px var(--admin-glow);
}
.portal-card.admin-card::before {
  background: var(--admin-gradient);
}
.portal-card.admin-card .card-icon-box {
  background: rgba(236, 72, 153, 0.12);
  color: var(--admin-color);
  border: 1px solid rgba(236, 72, 153, 0.25);
}
.portal-card.admin-card .btn-card {
  background: var(--admin-gradient);
  box-shadow: 0 4px 15px var(--admin-glow);
}

/* 3. Demo Card */
.portal-card.demo-card:hover {
  box-shadow: 0 20px 40px -15px var(--demo-glow);
}
.portal-card.demo-card::before {
  background: var(--demo-gradient);
}
.portal-card.demo-card .card-icon-box {
  background: rgba(16, 185, 129, 0.12);
  color: var(--demo-color);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.portal-card.demo-card .btn-card {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: none;
  cursor: not-allowed;
}

.portal-card.demo-card.disabled-option {
  opacity: 0.8;
}

.portal-card.demo-card .btn-card:hover {
  filter: none;
  transform: none;
  background: rgba(148, 163, 184, 0.2);
}

/* Card Internal Layout */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.card-icon-box {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.badge-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.card-body h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #fff;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.card-features {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card-features li {
  font-size: 0.88rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-features li i {
  font-size: 14px;
}

/* Card Action Buttons */
.card-footer {
  margin-top: auto;
}

.btn-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-card:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

.btn-card i {
  transition: transform 0.2s ease;
}

.btn-card:hover i {
  transform: translateX(4px);
}

/* Authentication Page Forms & Glass Box */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 450px;
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem auto;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.auth-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #cbd5e1;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.6rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(15, 23, 42, 0.8);
}

.btn-submit {
  width: 100%;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-top: 0.5rem;
}

.quick-demo-btn {
  display: block;
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: #38bdf8;
  text-decoration: none;
  cursor: pointer;
}

.quick-demo-btn:hover {
  text-decoration: underline;
}

/* Alert Notification Banner */
.alert-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

/* Dashboard Styling */
.dashboard-container {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

.dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 1.2rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  margin-bottom: 2rem;
}

.dash-user-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

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

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-details span {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-details h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 2px;
}

/* Navigation Tabs (Admin & Staff) */
.admin-nav-tabs, .dashboard-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-glass);
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-tab-btn, .tab-btn {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transition: var(--transition-fast);
  backdrop-filter: blur(12px);
  user-select: none;
}

.admin-tab-btn:hover, .tab-btn:hover {
  background: rgba(236, 72, 153, 0.15);
  color: #fff;
  border-color: rgba(236, 72, 153, 0.4);
  transform: translateY(-2px);
}

.admin-tab-btn.active {
  background: var(--admin-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px var(--admin-glow);
}

.tab-btn.active {
  background: var(--munshi-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px var(--munshi-glow);
}

/* Modal Overlay & Dialog Windows */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-box {
  background: #1e293b;
  border: 1px solid var(--border-hover);
  border-radius: 24px;
  padding: 2.2rem;
  max-width: 520px;
  width: 100%;
  color: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(236, 72, 153, 0.15);
  position: relative;
  animation: modalScaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  transform: rotate(90deg);
}

/* Credential Display Box */
.cred-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
}

.cred-box b {
  color: #60a5fa;
}

.cred-box button {
  transition: transform 0.2s ease;
}

.cred-box button:hover {
  transform: scale(1.2);
}

/* Action Buttons Grid inside Tables */
.action-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-edit {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action-edit:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
  color: #fff;
  transform: translateY(-1px);
}

.btn-action-delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action-delete:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #fff;
  transform: translateY(-1px);
}

/* Form Layout Rows */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(16px);
}

/* Table Card Enhancements */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow: visible;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  position: relative;
  margin-top: 4px;
  margin-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.4) rgba(15, 23, 42, 0.5);
}

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

.table-responsive::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.4);
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.8);
}

.custom-table th,
.custom-table td {
  padding: 10px 14px;
  white-space: nowrap !important;
  vertical-align: middle;
}

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

.table-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
}

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

.custom-table th, .custom-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.custom-table th {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.custom-table td {
  font-size: 0.92rem;
}

.custom-table tbody tr {
  transition: background-color 0.2s ease;
}

.custom-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.status-tag {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-block;
}

.status-active { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Footer */
.site-footer {
  margin-top: auto;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-glass);
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ==========================================================================
   Mobile Responsive & Native App Polish (PWA Optimization)
   ========================================================================== */

/* ==========================================================================
   Mobile Attendance & Daily Log System (P, A, OT, N Badges)
   ========================================================================== */

.app-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 1.5rem;
}

.summary-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 0.9rem 0.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.summary-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 4px;
}

.summary-card-val {
  font-size: 1.15rem;
  font-weight: 800;
}

.summary-card-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.month-picker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 1.2rem;
}

.month-picker-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.open-report-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* P, A, H/D, OUT, OT, N Circle Badges */
.attend-badge-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.badge-pill {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.badge-pill:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.badge-pill-p {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.badge-pill-p.selected {
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
}

.badge-pill-a {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.badge-pill-a.selected {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

/* Half Day Badge: H/D */
.badge-pill-hd {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.badge-pill-hd.selected {
  background: #eab308;
  border-color: #eab308;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.6);
}

/* Shift Out Badge: OUT */
.badge-pill-out {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.64rem;
  font-weight: 800;
  margin-right: 14px; /* Tab Gap space after OUT before OT */
}
.badge-pill-out.selected {
  background: #64748b;
  border-color: #94a3b8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(100, 116, 139, 0.6);
}

.badge-pill-ot {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.badge-pill-ot.selected {
  background: #f97316;
  border-color: #f97316;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.6);
}

.badge-pill-n {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}
.badge-pill-n.selected {
  background: #a855f7;
  border-color: #a855f7;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

/* ==========================================================================
   Payment & Advance Mobile Cards Layout (No Side Scroll)
   ========================================================================== */

.payment-cards-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.payment-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 1.4rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.payment-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.pay-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pay-worker-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.pay-trade-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pay-badge-work {
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  color: #60a5fa;
  font-size: 0.8rem;
  font-weight: 700;
}

.pay-dates-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.2rem;
}

.pay-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pay-calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 1.2rem;
}

.pay-calc-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pay-calc-box.highlight-box {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.pay-calc-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.pay-calc-val {
  font-size: 1.1rem;
  font-weight: 800;
}

.pay-card-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-mode-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pay-mode-wrapper label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pay-action-btn {
  width: 100%;
  padding: 12px;
  background: var(--demo-gradient);
  font-size: 0.92rem;
  justify-content: center;
}

@media (max-width: 580px) {
  .pay-calc-grid {
    grid-template-columns: 1fr;
  }
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.mobile-menu-toggle:active {
  transform: scale(0.92);
}

/* Side Backdrop Overlay */
.side-nav-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.side-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Side Drawer Panel */
.side-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: #0f172a;
  border-left: 1px solid var(--border-glass);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.2rem;
  overflow-y: auto;
}

.side-nav-drawer.active {
  transform: translateX(0);
}

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

.side-drawer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.side-drawer-brand h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.side-drawer-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-menu-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.side-menu-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
  padding-left: 8px;
}

.side-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.side-menu-item:hover, .side-menu-item.active {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.side-menu-item i {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
}



@media (max-width: 768px) {
  /* Navbar Mobile Layout: Clean flex header without overlapping */
  .navbar {
    padding: 0.6rem 3% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  .brand-logo {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .brand-logo-img {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
    border-radius: 10px !important;
  }

  .brand-text {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .brand-text h1 {
    font-size: 0.98rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
  }

  .brand-text span {
    font-size: 0.65rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }

  .nav-badges {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }

  .nav-badges > *:not(.pwa-install-btn):not(.mobile-menu-toggle) {
    display: none !important;
  }

  .pwa-install-btn {
    padding: 5px 10px !important;
    font-size: 0.76rem !important;
    border-radius: 14px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Hero Section Mobile */
  .hero-container {
    padding: 2rem 1rem;
  }

  .hero-header {
    margin-bottom: 2.2rem;
  }

  .hero-header h2 {
    font-size: 1.8rem;
    line-height: 1.25;
  }

  .hero-header p {
    font-size: 0.98rem;
  }

  /* Cards Mobile Grid */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .portal-card {
    padding: 1.6rem 1.3rem;
    border-radius: var(--radius-lg);
  }

  .card-body h3 {
    font-size: 1.3rem;
  }

  .card-features li {
    font-size: 0.84rem;
  }

  .btn-card {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    min-height: 48px; /* Touch target standards */
  }

  /* Auth Forms Mobile */
  .auth-wrapper {
    padding: 1.5rem 1rem;
  }

  .auth-box {
    padding: 2rem 1.4rem;
    border-radius: var(--radius-lg);
  }

  .auth-header h2 {
    font-size: 1.45rem;
  }

  .form-input {
    font-size: 16px !important; /* Prevents iOS safari zoom on input focus */
    padding: 0.8rem 1rem 0.8rem 2.6rem;
    min-height: 48px;
  }

  /* Dashboards Mobile Layout */
  .dashboard-container {
    padding: 0 0.8rem;
    margin: 1.2rem auto;
  }

  .dash-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.2rem;
  }

  .dash-topbar .btn-card {
    width: 100%;
    justify-content: center;
  }

  .dash-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }

  .stat-box {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .stat-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .stat-details h3 {
    font-size: 1.3rem;
  }

  .stat-details span {
    font-size: 0.72rem;
  }

  /* Mobile horizontal scrollable tab bars */
  .dashboard-tabs, .admin-nav-tabs {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    margin-bottom: 1.2rem;
    gap: 8px;
    width: 100%;
    scrollbar-width: none; /* Firefox */
  }

  .dashboard-tabs::-webkit-scrollbar,
  .admin-nav-tabs::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
  }

  .tab-btn, .admin-tab-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 12px;
  }

  /* Forms & Tables Responsive Scroll */
  .form-card {
    padding: 1.3rem 1rem;
    border-radius: var(--radius-md);
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .attend-type-group {
    flex-wrap: wrap;
  }

  .table-card {
    padding: 1rem 0.8rem;
    border-radius: var(--radius-md);
  }

  .table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .custom-table th, .custom-table td {
    padding: 0.75rem 0.6rem;
    font-size: 0.82rem;
  }

  .payment-amount-input {
    width: 100px;
    font-size: 0.9rem;
  }

  /* Modals Mobile Bottom Sheet Style */
  .modal-box {
    padding: 1.6rem 1.2rem;
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .cred-box {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .dash-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Calendar Picker Visual Component
   ========================================================================== */
.calendar-picker-wrapper {
  position: relative;
  display: inline-block;
}

.calendar-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.calendar-trigger-btn:hover {
  background: rgba(30, 41, 59, 1);
  border-color: #3b82f6;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.calendar-popover-card {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 16px;
  padding: 14px;
  z-index: 1000;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(15px);
  animation: popoverFadeIn 0.2s ease-out;
}

.calendar-popover-card.active {
  display: block;
}

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

.cal-pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-pop-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #3b82f6;
}

.cal-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cal-nav-btn:hover {
  background: #3b82f6;
  color: #ffffff;
}

.cal-weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.15s ease;
}

.cal-day-cell:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #ffffff;
}

.cal-day-cell.empty {
  background: transparent;
  cursor: default;
}

.cal-day-cell.sunday {
  color: #fca5a5;
}

.cal-day-cell.active-day {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
  border: 1px solid #60a5fa;
}

.cal-pop-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mobile View Specific Refinements */
@media (max-width: 600px) {
  .app-summary-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .table-card {
    padding: 0.8rem 0.5rem !important;
  }

  .table-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .table-header h3 {
    font-size: 1.02rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }

  .table-header > div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .calendar-picker-wrapper {
    width: 100%;
  }

  .calendar-trigger-btn {
    width: 100%;
    justify-content: space-between;
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .calendar-popover-card {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90vw !important;
    max-width: 320px !important;
    margin: 0 !important;
    z-index: 10005 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85) !important;
  }

  .attend-badge-group {
    gap: 4px !important;
    flex-wrap: nowrap !important;
  }

  .badge-pill {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.78rem !important;
  }

  .badge-pill-hd {
    font-size: 0.58rem !important;
  }

  .badge-pill-out {
    font-size: 0.60rem !important;
    margin-right: 4px !important;
  }

  .custom-table {
    white-space: nowrap !important;
  }

  .custom-table th, .custom-table td {
    padding: 0.75rem 0.6rem !important;
    font-size: 0.82rem !important;
  }
}

/* ==========================================================================
   Light Theme Overrides
   (These override hardcoded dark colors to match the light palette)
   ========================================================================== */

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
}

.brand-text h1 { color: #0f172a !important; }

.badge-status { color: #059669 !important; }

/* Hero heading — replace white-to-slate gradient with solid dark */
.hero-header h2 {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: #0f172a !important;
}

.hero-header .subtitle {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.2) !important;
}

/* Portal cards */
.portal-card {
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06) !important;
}

.card-body h3 { color: #0f172a !important; }
.card-features li { color: #334155 !important; }

.badge-tag {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

/* Demo card disabled button */
.portal-card.demo-card .btn-card {
  background: #e2e8f0 !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
}

/* Auth Box */
.auth-box {
  background: #ffffff !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.10) !important;
}

.auth-header h2 { color: #0f172a !important; }

.form-group label { color: #334155 !important; }

.form-input {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.form-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  background: #ffffff !important;
}

.quick-demo-btn { color: #2563eb !important; }

.alert-error { background: rgba(239,68,68,0.1) !important; border-color: rgba(239,68,68,0.25) !important; color: #dc2626 !important; }
.alert-info { background: rgba(37,99,235,0.1) !important; border-color: rgba(37,99,235,0.25) !important; color: #1d4ed8 !important; }

/* Dashboard top bar & stat boxes */
.dash-topbar { background: #ffffff !important; box-shadow: 0 2px 12px rgba(15,23,42,0.05) !important; }
.dash-user-info h2 { color: #0f172a !important; }

.stat-box { background: #ffffff !important; box-shadow: 0 2px 12px rgba(15,23,42,0.05) !important; }
.stat-details h3 { color: #0f172a !important; }

/* Tabs */
.admin-tab-btn, .tab-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

.admin-tab-btn:hover, .tab-btn:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* Table cards */
.table-card {
  background: #ffffff !important;
  box-shadow: 0 2px 12px rgba(15,23,42,0.05) !important;
}

.table-header h3 { color: #0f172a !important; }

.custom-table th {
  background: #f8fafc !important;
  color: #475569 !important;
}

.custom-table th, .custom-table td {
  border-bottom-color: #e2e8f0 !important;
}

.custom-table td { color: #0f172a !important; }

.custom-table tbody tr:hover {
  background-color: #f8fafc !important;
}

/* Form cards */
.form-card { background: #ffffff !important; }

/* Modals */
.modal-overlay { background: rgba(15, 23, 42, 0.45) !important; backdrop-filter: blur(8px) !important; }

.modal-box {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.15) !important;
  border-color: #e2e8f0 !important;
}

.modal-close {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

.modal-close:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

/* Cred box */
.cred-box {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

.cred-box b { color: #2563eb !important; }

/* Summary cards & month picker */
.summary-card { background: #ffffff !important; border-color: #e2e8f0 !important; }
.summary-card-lbl { color: #64748b !important; }

.month-picker-bar { background: #ffffff !important; border-color: #e2e8f0 !important; }
.month-picker-btn { background: #f1f5f9 !important; border: 1px solid #cbd5e1 !important; color: #0f172a !important; }

/* Attendance badge pills — unselected state (light gray) */
.badge-pill {
  border-color: #cbd5e1 !important;
  color: #334155 !important;
  background: #f1f5f9 !important;
}

.badge-pill:hover {
  border-color: #94a3b8 !important;
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Unselected per-type pills */
.badge-pill-p:not(.selected)  { border-color: #cbd5e1 !important; color: #334155 !important; background: #f1f5f9 !important; }
.badge-pill-a:not(.selected)  { border-color: #cbd5e1 !important; color: #334155 !important; background: #f1f5f9 !important; }
.badge-pill-hd:not(.selected) { border-color: #cbd5e1 !important; color: #334155 !important; background: #f1f5f9 !important; }
.badge-pill-out:not(.selected){ border-color: #cbd5e1 !important; color: #334155 !important; background: #f1f5f9 !important; }
.badge-pill-ot:not(.selected) { border-color: #cbd5e1 !important; color: #334155 !important; background: #f1f5f9 !important; }
.badge-pill-n:not(.selected)  { border-color: #cbd5e1 !important; color: #334155 !important; background: #f1f5f9 !important; }

/* Selected states — vivid fill colors */
.badge-pill-p.selected  { background: #22c55e !important; border-color: #22c55e !important; color: #ffffff !important; box-shadow: 0 0 12px rgba(34,197,94,0.5) !important; }
.badge-pill-a.selected  { background: #ef4444 !important; border-color: #ef4444 !important; color: #ffffff !important; box-shadow: 0 0 12px rgba(239,68,68,0.5) !important; }
.badge-pill-hd.selected { background: #eab308 !important; border-color: #eab308 !important; color: #ffffff !important; box-shadow: 0 0 12px rgba(234,179,8,0.5) !important; }
.badge-pill-out.selected{ background: #64748b !important; border-color: #64748b !important; color: #ffffff !important; box-shadow: 0 0 12px rgba(100,116,139,0.5) !important; }
.badge-pill-ot.selected { background: #f97316 !important; border-color: #f97316 !important; color: #ffffff !important; box-shadow: 0 0 12px rgba(249,115,22,0.5) !important; }
.badge-pill-n.selected  { background: #a855f7 !important; border-color: #a855f7 !important; color: #ffffff !important; box-shadow: 0 0 12px rgba(168,85,247,0.5) !important; }

/* Payment cards */
.payment-card { background: #ffffff !important; border-color: #e2e8f0 !important; box-shadow: 0 4px 16px rgba(15,23,42,0.05) !important; }
.pay-card-header { border-bottom-color: #e2e8f0 !important; }
.pay-worker-info h4 { color: #0f172a !important; }
.pay-badge-work { background: rgba(37,99,235,0.1) !important; border-color: rgba(37,99,235,0.25) !important; color: #2563eb !important; }
.pay-calc-box { background: #f8fafc !important; border-color: #e2e8f0 !important; }
.pay-calc-box.highlight-box { background: rgba(5,150,105,0.08) !important; border-color: rgba(5,150,105,0.25) !important; }

/* Side Drawer */
.side-nav-backdrop { background: rgba(15, 23, 42, 0.4) !important; }

.side-nav-drawer {
  background: #ffffff !important;
  border-left-color: #e2e8f0 !important;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.12) !important;
}

.side-drawer-header { border-bottom-color: #e2e8f0 !important; }
.side-drawer-brand h3 { color: #0f172a !important; }
.side-drawer-close { background: #f1f5f9 !important; color: #475569 !important; border: 1px solid #cbd5e1 !important; }

.side-menu-item {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

.side-menu-item:hover, .side-menu-item.active {
  background: rgba(37, 99, 235, 0.1) !important;
  border-color: #2563eb !important;
  color: #1d4ed8 !important;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Calendar */
.calendar-trigger-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.calendar-trigger-btn:hover {
  background: #f8fafc !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 12px rgba(37,99,235,0.15) !important;
}

.calendar-popover-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 15px 35px rgba(15,23,42,0.15) !important;
  backdrop-filter: none !important;
}

.cal-pop-title { color: #2563eb !important; }
.cal-nav-btn { background: #f1f5f9 !important; border: 1px solid #cbd5e1 !important; color: #475569 !important; }
.cal-nav-btn:hover { background: #2563eb !important; color: #fff !important; border-color: #2563eb !important; }

.cal-day-cell { color: #334155 !important; background: #f8fafc !important; }
.cal-day-cell:hover { background: rgba(37,99,235,0.12) !important; color: #1d4ed8 !important; }
.cal-day-cell.sunday { color: #ef4444 !important; }
.cal-day-cell.empty { background: transparent !important; }
.cal-day-cell.active-day { background: linear-gradient(135deg, #1d4ed8, #3b82f6) !important; color: #fff !important; border-color: #2563eb !important; box-shadow: 0 4px 12px rgba(37,99,235,0.3) !important; }

.cal-pop-footer { border-top-color: #e2e8f0 !important; }

/* Table scrollbar light */
.table-responsive { scrollbar-color: rgba(37,99,235,0.3) #f1f5f9 !important; }
.table-responsive::-webkit-scrollbar-track { background: #f1f5f9 !important; }
.table-responsive::-webkit-scrollbar-thumb { background: rgba(37,99,235,0.3) !important; }

/* Site footer */
.site-footer { border-top-color: #e2e8f0 !important; }

/* ==========================================================================
   No-Scroll Attendance Card List Layout
   ========================================================================== */

.attend-card-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.attend-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  transition: background 0.15s ease;
}

.attend-row-card:first-child { border-radius: 12px 12px 0 0; }
.attend-row-card:last-child  { border-bottom: none; border-radius: 0 0 12px 12px; }
.attend-row-card:hover       { background: #f8fafc; }

/* Left: worker name + role */
.attend-worker-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.attend-worker-info strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attend-worker-info small {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Right: two rows of badges + inline advance */
.attend-right {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.attend-badge-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Inline advance (sits in second badge row) */
.attend-adv-inline {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid #e2e8f0;
}

.adv-add-btn {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #2563eb;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.adv-add-btn:hover {
  background: #2563eb;
  color: #fff;
  transform: scale(1.15);
}

/* Badge size tuning inside the 2-row layout */
.attend-badge-row .badge-pill {
  width: 30px !important;
  height: 30px !important;
  font-size: 0.74rem !important;
}

.attend-badge-row .badge-pill-hd,
.attend-badge-row .badge-pill-out {
  font-size: 0.60rem !important;
  margin-right: 0 !important;
}

/* 2-row badge grid inside table cell (3 per row via CSS grid) */
.badge-grid-2row {
  display: grid;
  grid-template-columns: repeat(3, 32px);
  gap: 4px;
}

.badge-grid-2row .badge-pill {
  width: 32px !important;
  height: 32px !important;
  font-size: 0.74rem !important;
  margin: 0 !important;
}

.badge-grid-2row .badge-pill-hd,
.badge-grid-2row .badge-pill-out {
  font-size: 0.58rem !important;
}

/* Advance button in table */
.adv-add-btn {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #2563eb;
  padding: 3px 8px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.adv-add-btn:hover {
  background: #2563eb;
  color: #fff;
}

/* ==========================================================================
   Mobile 100% Fit & No Overflow Overrides
   ========================================================================== */
@media (max-width: 600px) {
  .dashboard-container {
    padding: 0 0.3rem !important;
  }

  .table-card {
    padding: 0.6rem 0.3rem !important;
    border-radius: 12px !important;
  }

  .custom-table th,
  .custom-table td {
    padding: 10px 12px !important;
    font-size: 0.84rem !important;
    white-space: nowrap !important;
  }

  /* Attendance table specific 3-column mobile layout */
  #grid-attendance-body th:nth-child(1),
  #grid-attendance-body td:nth-child(1) {
    min-width: 0 !important;
    width: auto !important;
  }

  #grid-attendance-body th:nth-child(2),
  #grid-attendance-body td:nth-child(2) {
    min-width: 0 !important;
    width: 100px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  #grid-attendance-body th:nth-child(3),
  #grid-attendance-body td:nth-child(3) {
    min-width: 0 !important;
    width: auto !important;
    text-align: right !important;
  }

  .badge-grid-2row {
    grid-template-columns: repeat(3, 29px) !important;
    gap: 3px !important;
  }

  .badge-grid-2row .badge-pill {
    width: 29px !important;
    height: 29px !important;
    font-size: 0.70rem !important;
  }

  .badge-grid-2row .badge-pill-hd,
  .badge-grid-2row .badge-pill-out {
    font-size: 0.55rem !important;
  }

  .adv-add-btn {
    padding: 2px 6px !important;
    font-size: 0.70rem !important;
  }
}

/* ==========================================================================
   Unbroken Single-Line Rule for Credential Boxes & Phone Numbers
   ========================================================================== */
.cred-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
  font-size: 0.82rem;
  color: #e2e8f0;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.cred-box span,
.cred-box b,
.cred-box button {
  white-space: nowrap !important;
}

/* General table cells keep phone numbers & credentials on 1 unbroken line */
.custom-table td {
  white-space: nowrap !important;
}


/* ==========================================================================
   PWA Install Button Styling & Animations
   ========================================================================== */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
  user-select: none;
}

.pwa-install-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.pwa-install-btn:active {
  transform: scale(0.96);
}

@keyframes pwaGlowPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.pulse-install {
  animation: pwaGlowPulse 2s infinite !important;
}





