/* GWAMS - Modern Light Theme CSS */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #0ea5e9;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Android Material Design Font Size Guidelines */
  --sp-page-title: 22px;        /* 22sp - Page titles */
  --sp-paragraph: 14px;         /* 14sp - Paragraph text */
  --sp-list-title: 14px;        /* 14sp - List titles (Medium weight) */
  --sp-list-item-title: 16px;   /* 16sp - List item titles, Important text snippets */
  --sp-secondary-caption: 14px; /* 14sp - Secondary text, Captions (Lighter color) */
  --sp-button-tab: 14px;        /* 14sp - Buttons, Tabs (Medium weight) */
  --sp-text-input: 16px;        /* 16sp - Text inputs */
}

/* Material Design Typography Helper Classes */
.sp-page-title {
  font-size: var(--sp-page-title) !important;
  font-weight: 700 !important;
  line-height: 1.3;
}
.sp-paragraph {
  font-size: var(--sp-paragraph) !important;
  font-weight: 400 !important;
  line-height: 1.5;
}
.sp-list-title {
  font-size: var(--sp-list-title) !important;
  font-weight: 500 !important; /* Medium weight for list titles */
}
.sp-list-item-title,
.sp-important {
  font-size: var(--sp-list-item-title) !important;
  font-weight: 600 !important;
}
.sp-caption,
.sp-secondary {
  font-size: var(--sp-secondary-caption) !important;
  color: var(--text-muted) !important; /* Lighter color to show lowered importance */
}
.sp-button,
.sp-tab {
  font-size: var(--sp-button-tab) !important;
  font-weight: 500 !important; /* Medium weight */
}
.sp-input {
  font-size: var(--sp-text-input) !important;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  font-size: var(--sp-paragraph);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Premium Glassmorphism Navbar */
.navbar-custom {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
  padding: 0.65rem 2rem !important;
  transition: all 0.2s ease;
}

.navbar-brand {
  font-weight: 800;
  color: var(--text-main) !important;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
}

/* Desktop Modern Nav Pills */
.desktop-nav-pill {
  color: #475569 !important;
  font-weight: 600 !important;
  font-size: 0.86rem !important;
  padding: 0.45rem 1rem !important;
  border-radius: 50rem !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: 1px solid transparent !important;
  display: flex !important;
  align-items: center !important;
}

.desktop-nav-pill:hover {
  color: #1e293b !important;
  background-color: #f1f5f9 !important;
  transform: translateY(-1px);
}

.desktop-nav-pill.active {
  color: #2563eb !important;
  background-color: #eff6ff !important;
  border-color: #bfdbfe !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12) !important;
}

.hover-bg-white:hover {
  background-color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

.hover-border-primary:hover {
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
}

/* Cards & Widgets */
.card-stat {
  background: #ffffff;
  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-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.stat-icon.primary { background: #dbeafe; color: var(--primary-color); }
.stat-icon.success { background: #d1fae5; color: var(--success-color); }
.stat-icon.warning { background: #fef3c7; color: var(--warning-color); }
.stat-icon.danger { background: #fee2e2; color: var(--danger-color); }

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.5rem;
}
.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Content Container */
.main-wrapper {
  padding: 2rem 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* Table Design */
.custom-table-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.custom-table-card .table {
  margin-bottom: 0;
}
.custom-table-card th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.custom-table-card td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}
.custom-table-card tr:last-child td {
  border-bottom: none;
}

/* Badges */
.badge-status {
  padding: 0.35em 0.8em;
  font-weight: 600;
  border-radius: 50px;
  font-size: 0.78rem;
}
.badge-present { background: #d1fae5; color: #065f46; }
.badge-late { background: #fef3c7; color: #92400e; }
.badge-halfday { background: #e0f2fe; color: #075985; }
.badge-absent { background: #fee2e2; color: #991b1b; }
.badge-manual { background: #f3e8ff; color: #6b21a8; }

/* Buttons & Controls */
.btn-primary-custom {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.btn-primary-custom:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Leaflet Map Embed */
.map-container {
  width: 100%;
  height: 350px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  z-index: 1;
}

/* Selfie Thumbnails */
.selfie-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s;
}
.selfie-thumb:hover {
  transform: scale(1.15);
}

/* Attendance Table Row Highlights */
tr.row-att-red > td {
  background-color: #fee2e2 !important; /* Location Invalid or Absent */
  color: #991b1b !important;
}
tr.row-att-yellow > td {
  background-color: #fef9c3 !important; /* Clocked In only (Out not marked) */
  color: #854d0e !important;
}
tr.row-att-blue > td {
  background-color: #dbeafe !important; /* Late */
  color: #1e40af !important;
}
tr.row-att-green > td {
  background-color: #d1fae5 !important; /* Present (inside radius) */
  color: #065f46 !important;
}

/* Action Buttons Mobile Optimization */
.action-btn-group .btn {
  white-space: nowrap !important;
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
}

@media (max-width: 768px) {
  .page-header-wrap,
  .main-wrapper > .d-flex.justify-content-between {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }
  .action-btn-group {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 0.25rem !important;
  }
  .action-btn-group .btn,
  .action-btn-group a.btn {
    font-size: 0.72rem !important;
    padding: 0.35rem 0.5rem !important;
    white-space: nowrap !important;
    height: auto !important;
    min-height: 32px !important;
    line-height: 1.2 !important;
    flex: 1 1 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
  }
  .action-btn-group .btn i,
  .action-btn-group a.btn i {
    font-size: 0.78rem !important;
    margin-right: 4px !important;
  }
}


/* Mobile App Bottom Bar - Equal Grid & Centered Layout */
.admin-mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 1050;
  justify-content: space-evenly;
  align-items: center;
  padding: 0 4px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mobile-nav-item {
  flex: 1 1 0px !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b;
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 5px 2px !important;
  border-radius: 12px;
  transition: all 0.2s ease;
  text-align: center !important;
}

.mobile-nav-item i {
  font-size: 1.12rem;
  margin-bottom: 2px;
  display: block;
}

.mobile-nav-item span {
  display: block;
  font-size: 0.63rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mobile-nav-item.active {
  color: #2563eb;
  background: #eff6ff;
}

.mobile-nav-item:hover {
  color: #2563eb;
}

/* Mobile Card View Layout Rules */
@media (max-width: 991px) {
  body {
    padding-bottom: 75px !important; /* Space for bottom app bar */
  }
  .admin-mobile-bottom-bar {
    display: flex !important;
  }
  .main-wrapper {
    padding: 1rem 0.75rem !important;
  }
  .card-stat {
    padding: 1rem !important;
  }
  .stat-value {
    font-size: 1.4rem !important;
  }
}

/* Mobile Card Component for Lists & Tables */
.mobile-card-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mobile-card-item:active {
  transform: scale(0.99);
}
.mobile-card-item.row-att-red {
  border-left: 5px solid #ef4444 !important;
  background-color: #ffffff !important;
}
.mobile-card-item.row-att-yellow {
  border-left: 5px solid #f59e0b !important;
  background-color: #ffffff !important;
}
.mobile-card-item.row-att-blue {
  border-left: 5px solid #3b82f6 !important;
  background-color: #ffffff !important;
}
.mobile-card-item.row-att-green {
  border-left: 5px solid #10b981 !important;
  background-color: #ffffff !important;
}

/* Avatar Circle Initial Icon Utility */
.avatar-circle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  background-color: var(--primary-color, #2563eb);
  color: #ffffff;
}
.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bottom App Navigation Bar for Staff Mobile UI */
.app-bottom-bar,
.bottom-nav {
  position: fixed !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 480px !important;
  height: 65px !important;
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-around !important;
  z-index: 1000 !important;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.05) !important;
}
.nav-item-custom {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  color: #64748b !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  gap: 2px !important;
  transition: color 0.2s !important;
  padding: 4px 8px !important;
}
.nav-item-custom i {
  font-size: 1.25rem !important;
}
.nav-item-custom.active {
  color: #2563eb !important;
  font-weight: 700 !important;
}

/* Floating Action Button (FAB) for Staff Attendance Marking */
.fab-container {
  position: fixed !important;
  bottom: 85px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 440px !important;
  display: flex !important;
  justify-content: center !important;
  z-index: 1040 !important;
  padding: 0 15px !important;
}
.fab-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 380px !important;
  padding: 14px 24px !important;
  border-radius: 50px !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}
.fab-btn:active {
  transform: scale(0.97) !important;
}
.fab-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45) !important;
}
.fab-clockout {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.45) !important;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* Android Material Design Mobile Typography Responsive Rules               */
/* ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* 1. Page titles: 22sp */
  .page-title,
  .mobile-page-title,
  .app-header h1, .app-header h2, .app-header h3, .app-header h4, .app-header h5,
  .main-wrapper h1, .main-wrapper h2, .main-wrapper h3, .main-wrapper h4,
  h1.sp-page-title, h2.sp-page-title, h3.sp-page-title {
    font-size: var(--sp-page-title, 22px) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
  }

  /* 2. Paragraph text: 14sp */
  p, body, .paragraph-text, .card-text {
    font-size: var(--sp-paragraph, 14px) !important;
    line-height: 1.5 !important;
  }

  /* 3. List titles: 14sp (Medium weight) */
  .list-title,
  .card-title-medium,
  .custom-table-card th,
  .list-group-header,
  .sp-list-title {
    font-size: var(--sp-list-title, 14px) !important;
    font-weight: 500 !important;
  }

  /* 4. List item titles, Important text snippets: 16sp */
  .list-item-title,
  .important-snippet,
  .mobile-card-item .fw-bold,
  .mobile-card-title,
  .item-title-important,
  .sp-list-item-title,
  .sp-important {
    font-size: var(--sp-list-item-title, 16px) !important;
    font-weight: 600 !important;
  }

  /* 5. Secondary text, Captions: 14sp (Lighter color) */
  small,
  .small,
  .text-muted,
  .caption-text,
  .secondary-text,
  .sp-caption,
  .sp-secondary {
    font-size: var(--sp-secondary-caption, 14px) !important;
    color: var(--text-muted, #64748b) !important;
  }

  /* 6. Buttons, Tabs: 14sp (Medium weight) */
  .btn,
  .nav-tabs .nav-link,
  .nav-pills .nav-link,
  .nav-item-custom span,
  .mobile-nav-item span,
  .sp-button,
  .sp-tab {
    font-size: var(--sp-button-tab, 14px) !important;
    font-weight: 500 !important;
  }

  /* 7. Text inputs: 16sp */
  .form-control,
  .form-select,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="tel"],
  input[type="date"],
  input[type="time"],
  select,
  textarea,
  .sp-input {
    font-size: var(--sp-text-input, 16px) !important;
  }
}




