@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

/* Base Styles */
html, body {
    height: 100%;
}


/* User Management Styles */
.user-item {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.user-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    margin-right: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-main {
    flex-grow: 1;
    margin-right: 1.25rem;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.35rem;
}

.user-email {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.user-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8rem;
}

.user-role-badge {
    background: #e3f2fd;
    color: #1f4ea6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.user-role-badge.pending-role {
    background: #fff3e0;
    color: #f57c00;
}

.user-role-badge.admin-role {
    background: #e8f5e9;
    color: #2e7d32;
}

.user-note, .user-date {
    color: #666;
    font-size: 0.85rem;
}

.user-id {
    color: #666;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
    align-items: center;
    min-width: max-content;
}

.user-qr-display {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 1rem;
    flex-shrink: 0;
}

.user-qr-display img {
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* QR thumbnail and modal styles */
.user-qr-thumb { width:48px; height:48px; object-fit:cover; border-radius:6px; border:1px solid #eee; }
.user-qr-placeholder { display:flex; align-items:center; justify-content:center; width:48px; height:48px; background:#f6f7fb; color:#666; border-radius:6px; }
.user-qr-thumb.clickable { cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.user-extra { font-size:0.9rem; color:#666; margin-top:6px; display:flex; gap:12px; }
.user-dept, .user-shift { background:#f5f7fb; padding:4px 8px; border-radius:6px; }
.image-modal-backdrop { position:fixed;inset:0;background:rgba(0,0,0,0.6);display:flex;align-items:center;justify-content:center;z-index:1200 }
.image-modal-content { position:relative;max-width:90%;max-height:90%;background:transparent;padding:8px;border-radius:8px }
.image-modal-content img { max-width:100%; max-height:80vh; display:block; border-radius:8px; box-shadow:0 6px 30px rgba(0,0,0,0.4) }
.image-modal-close { position:absolute;top:-6px;right:-6px;background:#fff;border-radius:50%;border:none;width:24px;height:24px;cursor:pointer;font-size:12px; line-height:24px; display:flex; align-items:center; justify-content:center; }

/* Hotel Cards Styling */
.hotels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.hotel-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hotel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Authentication Button Styles */
.form-container .button-container {
  margin-top: 1.5rem;
  width: 100%;
}

.form-container .button-container.center-button {
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-container .button-container.center-button .action-btn {
  width: auto;
  min-width: 200px;
  max-width: 100%;
}

.text-center {
  text-align: center;
}

.form-container .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.form-container .action-btn.primary {
  width: 100%;
  background: linear-gradient(135deg, #4f8cff 0%, #6ed6ff 100%);
  color: white;
}

.mode-btn.active { background: #007bff; color: #fff; }

/* --- Payroll & Import preview (moved from inline) --- */
.action-btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; }
.action-btn.primary { background: #1f4ea6; color: #fff; }
.action-btn.secondary { background: #f3f5fb; color: #1f4ea6; border: 1px solid #e9f0ff; }

.payroll-actions { display:flex; gap:1rem; align-items:flex-start; flex-wrap:wrap; margin-bottom:1rem; }
.payroll-actions .group { display:flex; gap:0.75rem; align-items:center; }

/* Import preview (SSS modal) */
.sss-modal-backdrop { position: fixed; inset: 0; background: rgba(8, 10, 22, 0.45); display: none; align-items: center; justify-content: center; z-index: 10000; }
.sss-modal-backdrop.show { display:flex; }
.sss-modal { background: #fff; border-radius: 8px; width: 92%; max-width: 960px; box-shadow: 0 8px 40px rgba(0,0,0,0.18); padding: 0; overflow: hidden; }
.sss-modal-header, .sss-modal-footer { padding: 12px 16px; display:flex; justify-content:space-between; align-items:center; }
.sss-modal-body { padding: 16px; max-height: 60vh; overflow: auto; }

/* Buttons inside modal */
.sss-btn { padding: 8px 12px; border-radius:6px; font-weight:600; cursor: pointer; }
.sss-btn.secondary { background:#f3f5fb; color:#1f4ea6; border:1px solid #e9f0ff; }
.sss-btn:not(.secondary) { background:#1f4ea6; color:white; border: none; }

/* Reset-password helpers */
.reset-card { max-width:420px; margin: 2rem auto; background: white; border-radius: 10px; padding: 1.25rem; box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.reset-card h2 { color: #123a80; margin-top:0; }
.reset-card .form-control { width:100%; padding:8px 10px; border-radius:6px; border:1px solid #e6eefc; }

/* utility */
.hidden { display:none !important; }
.center { text-align:center; }

/* Payroll requests mini-panel */
#payroll-requests-panel { background: #fff; border: 1px solid #e7eefc; padding: 12px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
#payroll-requests-panel h3 { margin: 0 0 8px 0; color: #1f4ea6; }
.request-item { padding: 8px 6px; }

/* ---------------------------
   Admin page adjustments
   - Make admin panels follow the main theme
   - Ensure user profile and QR thumbnail sit side-by-side
   - Improve request / account card visuals
   --------------------------- */
.admin-dashboard {
  display: block;
  padding: 1rem 0 3rem 0;
}

.admin-section {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #e9f0ff;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 1rem;
  box-shadow: 0 6px 20px rgba(15, 30, 80, 0.03);
}
.admin-section .section-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px }
.admin-section h3 { margin:0; color:#123a80 }

.accounts-panel { display:block; }
.accounts-list { display:flex; flex-direction:column; gap:12px; }

/* Make each user item a compact card with profile details on the left and QR/actions on the right */
.user-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px; background: #fff; border-radius:10px; border:1px solid #eef6ff }
.user-item .user-left { display:flex; align-items:center; gap:12px; flex:1; min-width:0 }
.user-avatar { width:56px; height:56px; border-radius:10px; font-size:1rem; margin-right:0 }
.user-main { flex:1; min-width:0 }
.user-name { font-size:1.05rem; color:#102a54; margin-bottom:2px }
.user-email { color:#4b5b7a; font-size:0.95rem }

/* QR thumbnail sits to the right of the main info inside the user-item */
.user-qr-display { margin: 0 12px; width:72px; display:flex; align-items:center; justify-content:center }
.user-qr-thumb { width:64px; height:64px; border-radius:8px }

.user-actions { display:flex; gap:8px; align-items:center }
.user-actions .action-btn { padding:6px 10px; font-size:0.9rem }

/* Request card visuals */
.request-card { display:flex; gap:12px; align-items:flex-start; padding:12px; background:#fff; border-radius:8px; border:1px solid #eef6ff }
.request-avatar { width:48px; height:48px; border-radius:8px; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700 }
.request-main { flex:1 }
.request-actions { display:flex; gap:8px; align-items:center }

/* Small utility for compact action buttons */
.action-btn.small { padding:6px 8px; font-size:0.9rem }

/* Responsive: stack profile & qr on very small screens */
@media (max-width:720px) {
  .user-item { flex-direction:column; align-items:stretch }
  .user-left { width:100% }
  .user-qr-display { align-self:flex-start; margin-top:8px }
  #payroll-requests-panel { width:100%; max-width:100%; }
}

.request-item .action-btn.small { padding: 6px 8px; font-size: 0.9rem; border-radius: 6px; }

.form-container .action-btn.secondary {
  background: #e3f2fd;
  color: #1f4ea6;
  font-size: 0.9rem;
  padding: 8px 16px;
}

/* Make form labels and inline labels bold for account/user management */
.form-label, .employee-id-text strong, .user-meta .user-id strong, .user-extra strong, .user-note strong, .user-date strong { font-weight: 700; }

.form-container .link-btn {
  color: #4f8cff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.form-container .link-btn:hover {
  color: #6ed6ff;
}

/* Form container adjustments */
.form-container {
  position: relative;
}

.toggle-password.action-btn.secondary {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  margin: 0;
  padding: 0 12px;
  font-size: 0.85rem;
  border-radius: 0 8px 8px 0;
  border: 1px solid #ddd;
  border-left: none;
  background: transparent;
}

.hotel-name {
  background: linear-gradient(135deg, #4f8cff 0%, #6ed6ff 100%);
  color: white;
  margin: 0;
  padding: 1rem;
  font-size: 1.25rem;
}

.hotel-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.hotel-details {
  padding: 1rem;
}

.hotel-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 1rem 0;
}

.hotel-amenities,
.hotel-rooms {
  margin-top: 1rem;
}

.hotel-amenities ul,
.hotel-rooms ul {
  list-style: none;
  padding-left: 1rem;
  margin: 0.5rem 0;
}

.hotel-amenities li,
.hotel-rooms li {
  padding: 0.25rem 0;
  color: #444;
}

.auth-message {
  text-align: center;
  padding: 2rem;
  background: #e3f2fd;
  border-radius: 8px;
  margin: 1rem 0;
  color: #1f4ea6;
  font-size: 1.1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Account Request Styles */
.request-item.user-item {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.request-note {
  color: #666;
  font-size: 0.9rem;
  font-style: italic;
  margin-left: 1rem;
}

.request-date {
  color: #666;
  font-size: 0.8rem;
}

.request-actions {
  display: flex;
  gap: 8px;
  margin-left: auto; /* Push to far right */
}

/* Styles moved from inline <style> in index.html */
.public-only { display: none; }
.restricted { display: none; }
.auth-nav, .user-nav { display: inline-flex; gap: 1rem; }
nav { display: flex; align-items: center; gap: 1.5rem; }

/* Payroll page specific rules */
.payroll-actions {
  display:flex;
  align-items:center;
  gap:1rem;
  flex-wrap:wrap;
  width:100%;
  margin-bottom:1rem;
}

/* Make the first group take available space so the save/export group can sit on the right */
.payroll-actions > .group:first-child {
  flex:1 1 auto;
  min-width:0;
  display:flex;
  gap:0.75rem;
  align-items:center;
  flex-wrap:wrap;
}

.payroll-actions .group { display:flex; gap:0.75rem; align-items:center; }
.file-import-label { display:inline-block; margin-left:8px; cursor:pointer; }
.file-import-label input[type="file"] { display:none; }
.ml-8 { margin-left:8px !important; }
.ml-auto { margin-left:auto !important; }
.action-row { display:flex; gap:1rem; align-items:center }

/* Ensure compact pill-shaped action buttons */
.action-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:20px;
  border:1px solid rgba(31,78,166,0.08);
  background: #fff;
  color:#1f4ea6;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}
.action-btn.primary { background: linear-gradient(135deg,#4f8cff 0%,#6ed6ff 100%); color:#fff; border-color:transparent; }
.action-btn.secondary { background:#f3f5fb; color:#1f4ea6; border:1px solid #e9f0ff; }

/* SSS import modal adjustments */
#sssPreviewInfo { margin-bottom:8px; color:#333; font-size:13px; }
#sssPreviewWarn { margin-top:10px; color:#b45309; font-size:13px; display:none; }
.sss-modal-header .controls { display:flex; gap:8px; align-items:center; }

/* Holiday picker layout */
.holiday-pickers { margin-top:16px; display:flex; gap:24px; flex-wrap:wrap; }
.holiday-card { background:#fff; border:1px solid #eef6ff; padding:12px; border-radius:8px; min-width:260px; }
.calendar-actions { display:flex; align-items:center; gap:8px; margin-top:8px; }
.calendar-hint { color:#666; font-size:0.9rem; margin-top:8px; }
#holidayStatus { margin-top:8px; color:#2b6cb0; }

/* Table wrapping */
.table-wrap { overflow:auto; margin-top:12px; }

/* Payroll table column sizing (use nth-child to preserve approximate widths) */
.data-table.payroll-table th { white-space: normal; min-width:120px; }
.data-table.payroll-table th:nth-child(1) { min-width:40px; width:40px; }
.data-table.payroll-table th:nth-child(2) { min-width:180px; }
.data-table.payroll-table th:nth-child(3) { min-width:120px; }
.data-table.payroll-table th:nth-child(4) { min-width:80px; }
.data-table.payroll-table th:nth-child(5) { min-width:120px; }
.data-table.payroll-table th:nth-child(6) { min-width:100px; }
.data-table.payroll-table th:nth-child(7) { min-width:120px; }
.data-table.payroll-table th:nth-child(8) { min-width:100px; }
.data-table.payroll-table th:nth-child(9) { min-width:120px; }
.data-table.payroll-table th:nth-child(10) { min-width:120px; }
.data-table.payroll-table th:nth-child(11) { min-width:130px; }
.data-table.payroll-table th:nth-child(12) { min-width:150px; }
.data-table.payroll-table th:nth-child(13) { min-width:130px; }
.data-table.payroll-table th:nth-child(14) { min-width:130px; }
.data-table.payroll-table th:nth-child(15) { min-width:150px; }
.data-table.payroll-table th:nth-child(16) { min-width:150px; }
.data-table.payroll-table th:nth-child(17) { min-width:160px; }
.data-table.payroll-table th:nth-child(18) { min-width:170px; }
.data-table.payroll-table th:nth-child(19) { min-width:130px; }
.data-table.payroll-table th:nth-child(20) { min-width:150px; }
.data-table.payroll-table th:nth-child(21) { min-width:160px; }
.data-table.payroll-table th:nth-child(22) { min-width:130px; }
.data-table.payroll-table th:nth-child(23) { min-width:160px; }
.data-table.payroll-table th:nth-child(24) { min-width:120px; }
.data-table.payroll-table th:nth-child(25) { min-width:140px; }

/* small-note alignment */
.small-note { font-size:0.9rem; color:#444; display:inline-flex; align-items:center }

@media (max-width:900px) {
  .holiday-pickers { flex-direction:column; }
  .payroll-actions { gap:0.5rem }
  .payroll-actions > .group:first-child { width:100%; }
}

.request-item .user-role-badge {
  background: #fff3e0;
  color: #ff9800;
}

/* Style approve/reject buttons */
.approve-btn {
  background: #e8f5e9 !important;
  color: #2e7d32 !important;
}

.reject-btn {
  background: #ffebee !important;
  color: #c62828 !important;
}

.employee-id-text {
  color: #1f4ea6;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.employee-id-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.employee-id {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f4ea6;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    text-align: center;
    letter-spacing: 1px;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f6fb;
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

header {
    background: linear-gradient(90deg, #4f8cff 0%, #6ed6ff 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Additional page-specific polish: Payroll, QR Dashboard, Profile */

/* Payroll page */
.payroll-page, .payroll-container {
  padding: 1rem 1.25rem;
}
.payroll-actions { margin-bottom: 1.25rem; }
.payroll-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(8,10,22,0.04);
}
.payroll-table th, .payroll-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5fb;
  text-align: left;
  font-size: 0.95rem;
  color: #233;
}
.payroll-table thead th {
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  color: #1f4ea6;
  font-weight: 700;
}
.payroll-table tbody tr:hover { background: #fbfdff; }
.input-small {
  width: 5.25rem;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e9f0ff;
  background: #fbfdff;
  color: #123;
}
.payroll-summary {
  display:flex; gap:1rem; align-items:center; justify-content:flex-end; margin-top:0.75rem; color:#333;
}

/* QR Dashboard */
.scanner-controls { background: #fff; padding: 12px; border-radius: 8px; border: 1px solid #e9f3ff; box-shadow: 0 6px 24px rgba(15,40,85,0.02); }
#cameraPreview { border-radius: 8px; overflow: hidden; display:flex; align-items:center; justify-content:center; }
#cameraPreview video, #cameraPreview canvas { width: 100%; height: 100%; object-fit: cover; }
#cameraSelect { padding:6px 8px; border-radius:6px; border:1px solid #e9f0ff; background:#fff; color:#123; }
#scannerStatusLog, #scannerDebugLog { background:#fbfdff; border:1px solid #eef6ff; padding:8px; border-radius:6px; color:#123; }
.scanner-controls .mode-btn { padding:8px 12px; border-radius:8px; border:1px solid transparent; background:#f3f7ff; color:#1f4ea6; font-weight:700; }
.scanner-controls .mode-btn.active { background: linear-gradient(90deg,#1f4ea6,#4f8cff); color:#fff; box-shadow:0 6px 18px rgba(31,78,166,0.12); }
.generator-result-info { color:#123; font-size:0.95rem; }
.generator-qr-preview img { max-width:250px; border-radius:8px; border:1px solid #e6f0ff; box-shadow:0 6px 18px rgba(15,40,85,0.06); }

/* Profile page */
.profile-card { background:#fff; padding:1.25rem; border-radius:10px; box-shadow:0 8px 30px rgba(8,10,22,0.04); max-width:980px; margin:1rem auto; }
.profile-top { display:flex; gap:1rem; align-items:center; }
.profile-avatar { width:84px; height:84px; border-radius:12px; background:linear-gradient(135deg,#4f8cff,#6ed6ff); color:#fff; display:flex;align-items:center;justify-content:center;font-size:1.5rem; font-weight:700; }
.profile-info h2 { margin:0; color:#123a80; }
.profile-meta { color:#666; margin-top:6px; }
.profile-actions { margin-top:1rem; display:flex; gap:0.75rem; }
.payroll-view { margin-top:1rem; background:#fbfdff; padding:12px; border-radius:8px; border:1px solid #e9f3ff; }
.payroll-view .payroll-line { display:flex; justify-content:space-between; align-items:center; padding:8px; border-bottom:1px dashed #eef6ff; }
.payroll-view .payroll-line:last-child { border-bottom: none; }

/* Responsive adjustments */
@media (max-width:900px) {
  .hotels-grid { grid-template-columns: 1fr; }
  .scanner-controls { padding:10px; }
  #cameraPreview { width:100%; height:320px; }
  .profile-top { flex-direction:column; align-items:flex-start; }
}

/* Keep utility contrast and focus states consistent */
.action-btn:focus, .action-btn:active, button:focus { outline: 3px solid rgba(79,140,255,0.15); outline-offset: 2px; }

/* Auth page centered layout */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.auth-page .form-container {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  /* UPDATED SHADOW */
  box-shadow: 0 15px 40px rgba(14, 30, 62, 0.1); /* Deeper shadow */
  border: 1px solid rgba(31,78,166,0.06); /* Slightly stronger border */
}

.auth-page.login-page .form-container h2,
.auth-page.signup-page .form-container h2,
.auth-page.reset-page .form-container h2 {
  color: #123a80;
  margin-top: 0;
}

.auth-page .form-container .email-notice {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.35rem;
}

@media (max-width: 520px) {
  .auth-page { padding: 2rem 0.75rem; }
  .auth-page .form-container { padding: 1rem; border-radius: 10px; }
}

/* Holiday picker styles */
.holiday-card { background:#fff; padding:12px; border-radius:8px; box-shadow:0 1px 3px rgba(0,0,0,0.06); width:320px; }
.small-calendar { user-select:none; margin-top:8px; }
.small-calendar table { width:100%; border-collapse:collapse; }
.small-calendar th { text-align:center; padding:6px 0; font-weight:700; color:#333; }
.small-calendar td { text-align:center; padding:8px 0; cursor:pointer; border-radius:4px; }
.small-calendar td:hover { background:rgba(0,0,0,0.04); }
.small-calendar .other-month { color:#bbb; }
.small-calendar .selected-date { background:#007bff; color:#fff; font-weight:700; }
.calendar-actions { display:flex; align-items:center; gap:8px; margin-top:8px; }
.calendar-hint { margin-top:6px; font-size:12px; color:#666; }

/* QR Scanner Panel Styles */
.scanner-controls { display:flex; flex-direction:column; gap:8px; background: transparent; }
.scanner-controls .mode-btn { padding:8px 12px; border-radius:8px; border:1px solid rgba(31,78,166,0.12); background:#f3f5fb; color:#1f4ea6; font-weight:700; cursor:pointer; }
.scanner-controls .mode-btn:hover { filter:brightness(0.98); }
.scanner-controls .mode-btn.active { background:#1f4ea6; color:#fff; border-color:transparent; }
.scanner-controls select, .scanner-controls input[type="file"] { padding:8px 10px; border-radius:8px; border:1px solid #e6eefc; background:#fff; }
.scanner-controls button { padding:8px 12px; border-radius:8px; border:none; background:#1f4ea6; color:#fff; cursor:pointer; font-weight:600; }
.scanner-controls button:hover { opacity:0.95; }

#cameraPreview { width:100%; max-width:640px; height:360px; background:#000; margin-top:8px; border-radius:8px; overflow:hidden; border:1px solid #e6eefc; box-shadow: 0 6px 20px rgba(14,30,62,0.06); display:flex; align-items:center; justify-content:center; }
#cameraPreview.loading { background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.04)); }

#scannerStatusLog { margin-top:8px; max-height:200px; overflow:auto; border:1px solid #e7eefc; padding:12px; background:#fff; border-radius:8px; color:#1f4ea6; font-size:0.95rem; }
#scannerStatusLog .status-row { padding:6px 0; border-bottom:1px dashed rgba(31,78,166,0.06); }

#scannerDebugLog { max-height:200px; overflow:auto; padding:8px; background:#fff; border-radius:8px; border:1px solid #f0f3ff; color:#444; font-family:monospace; font-size:0.85rem; }

/* Small screens: make preview responsive */
@media (max-width: 920px) {
  #cameraPreview { height: calc(100vw * 0.6); max-height:420px; }
  .scanner-controls { flex-direction:column; }
}

/* Admin lists fixed height + scroll */
.admin-list {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 8px;
  gap: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: min-content;
  align-items: start;
}

/* Account Requests displayed like User Management cards */
.request-card {
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px;
  background:#fff;
  border-radius:8px;
  border:1px solid #eef4ff;
  box-shadow: 0 6px 18px rgba(17,20,50,0.04);
}

@media (max-width: 920px) {
  .admin-list { grid-template-columns: 1fr; }
}

.request-avatar {
  width:52px; height:52px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:white;
}

.request-main {
  flex:1; min-width:0;
}

.request-meta {
  font-size:0.9rem;
  color:#5b6d8a;
  margin-top:6px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.request-actions {
  display:flex;
  gap:8px;
  align-items:center;
}


.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
h1 {
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
}
nav {
    display: flex;
    gap: 10px;
}
.nav-btn {
    background: #fff;
    color: #4f8cff;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79,140,255,0.08);
    transition: background 0.3s, color 0.3s, transform 0.2s;
    outline: none;
}
.nav-btn:hover, .nav-btn:focus {
    background: #4f8cff;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
}
.nav-btn.active, .nav-btn.active:focus {
    background: #4f8cff;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
}

/* from pages/signup.html inline style */
nav { display: flex; align-items: center; gap: 1.5rem; }

/* Content Expansion Fixes */
.form-container,
.form-container.payroll-container,
.accounts-panel,
.requests-panel,
.page,
.content-container {
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

/* New: lightweight badges for department and shift */
.user-extra { font-size: 0.9rem; color: #666; margin-top: 6px; display:flex; gap:12px; }
.user-extra .user-dept, .user-extra .user-shift { background: #f5f7fb; padding:4px 8px; border-radius:6px; }

/* Prevent text wrapping in table cells and account items */
.data-table th,
.data-table td,
.user-item,
.request-item {
    white-space: nowrap;
}

/* Ensure tables fill their containers properly */
.data-table {
    width: 100%;
    min-width: 1800px; /* Minimum width to ensure all columns fit */
    border-collapse: collapse;
    table-layout: auto; /* Allow content to determine column widths */
}

/* Specific styles for payroll table */
#payrollTable.data-table {
    font-size: 14px; /* Slightly smaller font for better fit */
}

#payrollTable.data-table th,
#payrollTable.data-table td {
    padding: 12px 16px; /* Increased horizontal padding */
    white-space: nowrap; /* Prevent text wrapping */
}

.data-table th {
    text-align: left;
    background: #f8f9fd;
    font-weight: 600;
    position: sticky; /* Keep headers visible when scrolling */
    top: 0;
    z-index: 1;
}

.data-table td {
    border-bottom: 1px solid #eee;
}

/* Profile payroll tables - Center align value cells */
.profile-card .data-table td:last-child {
    text-align: center;
}

/* Column width adjustments for payroll table */
#payrollTable.data-table th:nth-child(1) { min-width: 50px; } /* # */
#payrollTable.data-table th:nth-child(2) { min-width: 220px; } /* Name */
#payrollTable.data-table th:nth-child(3) { min-width: 100px; } /* Rate */
#payrollTable.data-table th:nth-child(4) { min-width: 80px; } /* Days */
#payrollTable.data-table th[style*="width"] { width: auto !important; } /* Override inline styles */

/* Payroll editable styles */
.editable-input {
    border: 1px solid #4f8cff;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    background: white;
}

.editable-input:focus {
    outline: none;
    border-color: #6ed6ff;
    box-shadow: 0 0 0 2px rgba(79,140,255,0.2);
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal h2 {
    margin-top: 0;
    color: #1f4ea6;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal .form-group {
    margin-bottom: 1rem;
}

.modal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #444;
}

.modal .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.modal .form-group input:focus {
    outline: none;
    border-color: #4f8cff;
    box-shadow: 0 0 0 2px rgba(79,140,255,0.1);
}

.modal .button-group {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Animation for modals */
.modal {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.show {
    opacity: 1;
}

.modal .modal-content {
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* Prevent body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

.modal .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 50%;
}

.modal .close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* Style for manually edited cells */
.manually-edited {
    position: relative;
}

.manually-edited::after {
    content: '*';
    position: absolute;
    top: 2px;
    right: 2px;
    color: #ff4f8c;
    font-weight: bold;
}

#saveChanges, #cancelChanges {
    margin-left: 8px;
}

.data-table tbody tr td.editable {
    position: relative;
}

.data-table tbody tr td.editable::after {
    content: '✎';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    color: #4f8cff;
    opacity: 0.5;
}

/* Make sure flex elements inside sections don't squish */
.accounts-panel,
.requests-panel {
    flex: 1 1 auto;
    width: 100%;
}

/* Admin & Chatbot Container Styles */
.form-container.chatbot-data-container {
  max-width: 2000px; /* Further increased width for payroll table */
  margin: 0 auto;
  padding: 2rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(79,140,255,0.06);
  min-height: calc(100vh - 140px); /* Account for header and footer */
  display: flex;
  flex-direction: column;
}

/* Specific styles for admin page */
.admin-dashboard.chatbot-data-container {
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  padding: 2rem 3rem; /* Increased horizontal padding */
}

.admin-section {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(79,140,255,0.02), transparent);
  border-radius: 14px;
  border: 1px solid rgba(79,140,255,0.1);
  flex: 1;
  width: 100%;
  overflow-x: auto; /* Enable horizontal scroll only if needed */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on touch devices */
}

.admin-section:first-child {
  margin-top: 1rem;
}

.admin-dashboard h2 {
  margin-bottom: 2rem;
  color: #1f4ea6;
  font-size: 1.75rem;
}

/* Improved filter section styling */
.filters {
  margin-bottom: 2rem;
}

.filters .form-group {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.filters .flex-1 {
  flex: 1;
}

.filters select {
  width: 100%;
  padding: 8px 12px;
}

.button-group {
  display: flex;
  flex-wrap: nowrap; /* keep action buttons side-by-side */
  gap: 1rem;
  margin: 1.5rem 0;
  overflow-x: auto; /* allow horizontal scrolling on small screens */
  -webkit-overflow-scrolling: touch;
}

.button-group .action-btn {
  flex: 0 1 auto;
  white-space: nowrap;
}

.admin-section h3 {
  color: #1f4ea6;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

/* Profile styles */
.profile-card {
  background: linear-gradient(180deg, rgba(79,140,255,0.02), transparent);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  gap: 24px;
  width: fit-content;
  margin: 0 auto;
  border: 1px solid rgba(79,140,255,0.1);
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-details {
  flex: 0 1 auto; /* Don't force expansion */
  min-width: 200px;
}

/* Scanner container and cancel button styles */
.scanner-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 20px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scanner-container video {
  width: 100%;
  max-width: 100vw;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  background-color: #000;
}

.scanner-status {
  margin: 10px 0;
  padding: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border-radius: 4px;
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 90%;
}

.attendance-card {
  width: 100%;
  max-width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* === Styles moved from pages/payroll.html (consolidated) === */
/* small, non-intrusive styles for payroll table only */
.payroll-actions { display:flex; gap:12px; margin-bottom:12px; align-items:center; flex-wrap:wrap; }
.payroll-actions .group { display:flex; gap:8px; align-items:center; }
.payroll-table input { width:110px; padding:6px; text-align:center; box-sizing:border-box; }
.payroll-table th, .payroll-table td { padding:8px; vertical-align:middle; border-bottom:1px solid #eee; font-size:0.95rem; }
.payroll-table { table-layout: fixed; width: 100%; border-collapse: collapse; }
.payroll-table td.username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align:left; padding-left:8px; }
.action-btn { padding:8px 10px; border-radius:6px; border:1px solid #ccc; background:#fff; cursor:pointer; }
.action-btn.primary { background:#0b76ef; color:#fff; border-color:#0b76ef; }
.input-small { width:78px; }
@media (max-width:1100px) { .payroll-table input { width:84px; } }
@media (max-width:800px) { .payroll-table { font-size:0.8rem; } .payroll-table input { width:64px; } }

/* === OVERRIDE for payroll table width === */
/* Make the table wider than the container on desktop so columns have room.
   Container has overflow:auto so horizontal scroll will appear when needed. */
#payrollTable {
  width: auto !important;
  min-width: 1400px !important; /* increase as needed: 1400-2000px */
  table-layout: auto !important;
  white-space: normal !important;
}

#payrollTable th,
#payrollTable td {
  white-space: normal !important;      /* allow wrapping */
  word-break: break-word !important;   /* prevent overflow */
  text-align: center;                  /* cleaner layout */
}

/* reduce padding for tighter fit */
#payrollTable th,
#payrollTable td {
  padding: 6px 8px !important;
}

/* Modal styles for SSS import preview */
.sss-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.sss-modal {
  width: min(1100px, 96%);
  max-height: 90vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sss-modal-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
  border-bottom:1px solid #eee;
  background:linear-gradient(90deg,#fafafa,#fff);
}
.sss-modal-title { font-weight:600; font-size:16px; }
.sss-modal-body {
  padding:12px 16px;
  overflow:auto;
  flex:1;
}
.sss-modal-footer {
  padding:10px 16px;
  border-top:1px solid #eee;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}
.sss-table { width:100%; border-collapse:collapse; font-size:13px; }
.sss-table th, .sss-table td { border:1px solid #eee; padding:8px; text-align:left; }
.sss-btn { background:#2563eb; color:#fff; border:none; padding:8px 12px; border-radius:6px; cursor:pointer; }
.sss-btn.secondary { background:#e5e7eb; color:#111; }
.sss-close { background:transparent; border:none; cursor:pointer; font-size:18px; }
.sss-status { margin-left:12px; color:#444; font-size:13px; }

/* Additional import-preview styles for inline tabulation preview */
.import-preview { overflow:auto; max-height:520px; border:1px solid #eee; padding:8px; background:#fff; margin-top:8px; }
.import-preview table { width:100%; border-collapse:collapse; font-family: Arial, Helvetica, sans-serif; font-size:13px; }
.import-preview th, .import-preview td { border:1px solid #d6d6d6; padding:6px 8px; }
.import-preview thead th { background: #e8f7d6; font-weight:700; text-align:center; }
.import-preview thead .subheader { background:#ffffff; font-weight:700; color:#222; }
.import-preview tbody tr:nth-child(odd) { background: #fffaf0; }
.import-preview .col-right { text-align:right; }
.import-preview .col-center { text-align:center; }
.preview-info { margin-top:8px; font-size:13px; color:#333; }


.attendance-card.scanning {
  padding: 0;
  background: #000;
}

.cancel-btn {
  margin-top: 10px;
  background-color: #ff4f4f !important;
  color: white !important;
}

.cancel-btn:hover {
  background-color: #e63939 !important;
}

.profile-row {
  white-space: nowrap;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.profile-row strong {
  display: inline-block;
  width: 100px;
  color: #666;
}

.profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}

/* === Auto-adjust button widths based on content === */
button,
.action-btn,
.nav-btn,
.cancel-btn,
button.approve-btn,
button.reject-btn,
button.delete-btn,
button.archive-btn,
#login-btn,
#signup-btn,
button[id*="check-in"],
button[id*="check-out"] {
  display: inline-flex !important;          
  align-items: center !important;           
  justify-content: center !important;       
  width: auto !important;                   
  min-width: fit-content !important;        
  max-width: 100% !important;               
  white-space: nowrap !important;          
  padding: 0.5rem 1rem !important;        
  box-sizing: border-box !important;
  text-align: center !important;
}

/* Action buttons theme */
.action-btn,
.auth-buttons button,
.auth-buttons .action-btn {
  width: auto;
  min-width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
  box-sizing: border-box;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.auth-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,140,255,0.2);
}

/* Primary action button */
.action-btn.primary {
  background: linear-gradient(180deg, #4f8cff 0%, #6ed6ff 100%);
  color: white;
}

/* Secondary action button */
.action-btn.secondary {
  background: #f0f7ff;
  color: #4f8cff;
}

/* Profile edit modal styles */
#profile-edit-root {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none; /* Initially hidden, JS toggles this */
}

.profile-edit-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-edit-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #fff 0%, #f8faff 100%);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(79,140,255,0.15);
  z-index: 10001;
  width: 90%;
  max-width: 500px;
  border: 1px solid rgba(79,140,255,0.1);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-edit-modal h3 {
  color: #1f4ea6;
  font-size: 1.5rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(79,140,255,0.1);
}

.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-edit-form .form-group {
  margin-bottom: 1.5rem;
}

.profile-edit-form .form-label {
  display: block;
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.profile-edit-form .form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(79,140,255,0.2);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s;
  background: #fff;
}

.profile-edit-form .form-control:focus {
  outline: none;
  border-color: #4f8cff;
  box-shadow: 0 0 0 3px rgba(79,140,255,0.1);
}

/* Style the select element specifically */
.profile-edit-form select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f8cff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.profile-edit-form input[type="text"],
.profile-edit-form input[type="url"] {
  padding: 12px 16px;
  border: 1px solid rgba(79,140,255,0.2);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s;
  background: #fff;
}

.profile-edit-form input:focus {
  outline: none;
  border-color: #4f8cff;
  box-shadow: 0 0 0 3px rgba(79,140,255,0.1);
}

.profile-photo-section {
  background: linear-gradient(180deg, rgba(79,140,255,0.05) 0%, rgba(110,214,255,0.05) 100%);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.current-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.current-photo img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(79,140,255,0.2);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(79,140,255,0.1);
}

.modal-actions .action-btn {
  min-width: 120px;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.2s;
}

.modal-actions .action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79,140,255,0.2);
}

.modal-actions .action-btn.primary {
  background: linear-gradient(90deg, #4f8cff 0%, #6ed6ff 100%);
  color: white;
}

.modal-actions .action-btn.secondary {
  background: #f0f7ff;
  color: #4f8cff;
}

/* Responsive adjustments for edit modal */
@media (max-width: 480px) {
  .profile-edit-modal {
    padding: 24px;
    width: 95%;
    margin: 20px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions .action-btn {
    width: 100%;
  }
}

/* Form container styling */
.form-container {
  background: linear-gradient(180deg, #fff 0%, #f8faff 100%);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(79,140,255,0.15);
  width: 90%;
  max-width: 400px;
  margin: 0 auto;
  border: 1px solid rgba(79,140,255,0.1);
  min-height: min-content;
  height: auto;
  display: flex;
  flex-direction: column;
}

/* Wider container variant for payroll */
.form-container.payroll-container {
  max-width: 1400px;
  padding: 32px;
  overflow: visible;
}

.form-container h2 {
  color: #1f4ea6;
  font-size: 1.8rem;
  margin: 0 0 24px 0;
  text-align: center;
}

/* Form inputs */
.form-container input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(79,140,255,0.2);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s;
  background: #fff;
  box-sizing: border-box;
}

.form-container input:focus,
.form-container select:focus {
  outline: none;
  border-color: #4f8cff;
  box-shadow: 0 0 0 3px rgba(79,140,255,0.1);
}

/* Login/Signup button */
.form-container .action-btn {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  margin: 24px 0 16px 0;
  background: linear-gradient(90deg, #4f8cff 0%, #6ed6ff 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.form-container .action-btn:hover {
  transform: translateY(-2px);
  /* UPDATED SHADOW & TRANSITION */
  box-shadow: 0 8px 16px rgba(79,140,255,0.3); /* Stronger shadow */
  transition: all 0.15s ease-out; /* Quicker feedback */
}

/* Links styling */
.form-container a {
  color: #4f8cff;
  text-decoration: none;
  transition: color 0.2s;
}

.form-container a:hover {
  color: #6ed6ff;
}

.form-container p {
  text-align: center;
  color: #666;
  margin: 16px 0;
}

/* Password input wrap */
.form-container .password-wrap {
  margin-bottom: 16px;
}

.password-wrap {
  position: relative;
  width: 100%;
  display: block;
  background: #fff;
  border-radius: 8px;
}

.password-wrap input {
  width: 100%;
  margin: 0;
  padding-right: 70px;
  border-radius: 8px;
}

.password-wrap .toggle-password:hover {
  color: #6ed6ff;
  background-color: rgba(79,140,255,0.05);
}

/* Remove the previous toggle-password styles */
.form-container .toggle-password {
  background: transparent;
  box-shadow: none;
}

/* Role select styling */
.form-container select {
  appearance: none;
  width: 100%;
  padding: 12px 40px 12px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(79,140,255,0.2);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s;
  background-color: #fff;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f8cff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  box-sizing: border-box;
  color: #1f4ea6;
  font-weight: 500;
}

/* Form labels */
.form-container label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #1f4ea6;
  font-size: 0.95rem;
}

/* Admin specific styles */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  margin-top: 24px;
}

.admin-divider {
  width: 1px;
  background: linear-gradient(180deg, rgba(79,140,255,0.1) 0%, rgba(110,214,255,0.1) 100%);
}

.requests-panel, .accounts-panel {
  background: linear-gradient(180deg, #fff 0%, #f8faff 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(79,140,255,0.1);
  padding: 24px;
  border: 1px solid rgba(79,140,255,0.1);
}

.requests-panel h3, .accounts-panel h3 {
  color: #1f4ea6;
  font-size: 1.3rem;
  margin: 0 0 20px 0;
}

.request-item {
  background: linear-gradient(180deg, rgba(79,140,255,0.02) 0%, transparent 100%);
  border: 1px solid rgba(79,140,255,0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.request-item:hover {
  box-shadow: 0 4px 12px rgba(79,140,255,0.08);
  transform: translateY(-1px);
}

.request-actions {
  display: flex;
  gap: 8px;
  margin-left: auto; /* Push to far right */
}

.approve-btn {
  background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
  color: white;
}

.reject-btn, .delete-btn {
  background: linear-gradient(90deg, #f44336 0%, #ef5350 100%);
  color: white;
}

/* Email notice styling */
.email-wrap {
  position: relative;
  margin-bottom: 16px;
}

.email-notice {
  font-size: 0.8rem;
  color: #666;
  margin-top: 4px;
  padding-left: 4px;
  border-left: 2px solid rgba(79,140,255,0.3);
}

/* Responsive admin layout */
@media (max-width: 768px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-divider {
    display: none;
  }
}

/* Navigation visibility classes */
.restricted, .admin-only {
  display: none; /* Hidden by default */
}

/* Show public links when logged out */
.public-only {
  display: inline-block;
}

/* These will be controlled by JavaScript when logged in */
.nav-btn {
  transition: opacity 0.3s ease;
}

/* Additional Utility Classes */
.hidden {
  display: none !important;
}

/* Additional Layout Classes */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

/* === Admin Page Layout Fixes === */

/* Ensure admin content fits the viewport and wraps properly */
.page {
  width: 100%;
  max-width: 1500px; /* Increased to accommodate wider payroll table */
  margin: 2rem auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: visible;
  box-sizing: border-box;
}

/* Make each section auto-size to its content */
.content-container {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
  overflow: visible;
  position: relative; /* For absolute positioning context */
}

/* Ensure form containers and panels expand properly */
.form-container {
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: visible;
  box-sizing: border-box;
}

/* Avoid overlapping panels inside grid-like layouts */
.requests-panel,
.accounts-panel,
.filters {
  width: 100%;
  overflow: visible;
  display: block;
  box-sizing: border-box;
}

/* Table responsiveness improvements */
.table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  box-sizing: border-box;
  margin: 1rem -1.5rem;  /* Negative margin to break out of container */
  padding: 0 1.5rem;     /* Padding to maintain spacing */
}

/* Prevent table or buttons from spilling horizontally */
.data-table {
  width: 100%;
  min-width: 1200px;    /* Minimum width to ensure all columns are visible */
  table-layout: fixed;   /* Fixed layout for more predictable column widths */
  border-collapse: separate;
  border-spacing: 0;
}

/* Table header styling */
.data-table th {
  background: #f8faff;
  padding: 12px 16px;
  font-weight: 600;
  color: #1f4ea6;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid rgba(79,140,255,0.1);
}

/* Table cell styling */
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(79,140,255,0.05);
  white-space: nowrap;
}

/* Hover effect on table rows */
.data-table tbody tr:hover {
  background: rgba(79,140,255,0.02);
}

/* Button group layout */
.button-group {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
}

/* Center variant for button groups */
.button-group.center {
  justify-content: center;
}

/* Only wrap on very small screens */
@media (max-width: 768px) {
  .button-group {
    flex-wrap: wrap;
  }
}

/* Prevent any overlapping content */
* {
  max-width: 100%;
  box-sizing: border-box;
}

/* Weather Dashboard Styles */
.weather-dashboard {
  margin-top: 2rem;
  width: 100%;
}

.weather-dashboard h3 {
  color: #1f4ea6;
  text-align: center;
  margin-bottom: 1.5rem;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 1rem;
}

.weather-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(79,140,255,0.1);
  border: 1px solid rgba(79,140,255,0.1);
  text-align: center;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 1;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}


/* Logo image container placed at top of card */
.card-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.75rem;
}
.card-logo img {
  max-width: 140px;
  max-height: 120px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  opacity: 1;
}

.weather-card:hover {
  transform: translateY(-5px);
}

.weather-card h3 {
  color: #1f4ea6;
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
}

.weather-icon {
  font-size: 3rem;
  margin: 1rem 0;
}

.weather-details {
  text-align: center;
  margin-top: 0.5rem;
}

.weather-details p {
  margin: 0.5rem 0;
  color: #666;
}

.weather-details strong {
  color: #1f4ea6;
}

/* Responsive weather grid */
@media (max-width: 1024px) {
  .weather-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .weather-grid {
    grid-template-columns: 1fr;
  }
}

/* Admin Panel Styles */
.admin-panel {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-title {
  color: #4f8cff;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.panel-title {
  color: #4f8cff;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
  min-width: 150px;
}

.form-control:focus {
  border-color: #4f8cff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79,140,255,0.1);
}

.flex-1 {
  flex: 1;
}

.center {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.card {
  background: #f8fafc;
  border-radius: 8px;
  padding: 20px;
  margin: 12px 0;
}

/* Barcode styles removed — barcode features disabled */

/* Spacing Utilities */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }

/* === Profile Layout Fixes === */
#profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* === Reorder Profile Layout: Move photo above name === */
/* === Auto-resize profile card to fit content === */
.profile-card {
  width: fit-content;
  height: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  max-width: 100%;
  padding: 30px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(79,140,255,0.15);
  margin: 20px auto;
  border: 1px solid rgba(79,140,255,0.1);
  overflow-wrap: anywhere; /* wrap long text safely */
  word-break: break-word;
}

.id-header {
  text-align: center;
  margin-bottom: 15px;
  border-left: none;
  padding-left: 0;
}

.id-photo {
  margin: 10px auto 10px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 3px solid #4f8cff;
  background: #e0e8ff;
  font-size: 40px;
  color: #4f8cff;
}

.id-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.info-group {
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-label {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 4px;
  width: 100%;
}

.id-value {
  color: #333;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  width: 100%;
}

#profile-username {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f4ea6;
  margin: 0;
  text-align: center;
  width: 100%;
}

/* .id-barcode styles removed */

.profile-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid rgba(79,140,255,0.1);
}

.email-section {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  margin-top: 15px;
  padding: 15px;
  background: #f8faff;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(79,140,255,0.1);
  overflow-wrap: break-word;
}

.email-label {
  color: #666;
  font-weight: 500;
  margin: 0 0 8px 0;
  font-size: 0.9rem;
}

.email-value {
  color: #4f8cff;
  margin: 0;
  font-weight: 500;
}

/* Prevent overlapping content on small screens */
@media (max-width: 480px) {
  .profile-card {
    padding: 20px;
    max-width: 95%;
  }
  .id-photo {
    width: 100px;
    height: 100px;
  }
  .profile-actions {
    flex-direction: column;
  }
  .profile-actions .action-btn {
    width: 100%;
  }
  .email-section {
    max-width: 95%;
  }
  #profile-username {
    font-size: 1.1rem;
  }
  .id-value {
    font-size: 0.95rem;
  }
}

/* Profile ID Card Styles */
.profile-card {
  padding: 30px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(79,140,255,0.15);
  margin: 20px auto;
  width: 380px;
  border: 1px solid rgba(79,140,255,0.1);
}

.id-header {
  text-align: left;
  margin-bottom: 25px;
  border-left: 4px solid #4f8cff;
  padding-left: 15px;
}

.id-header h2 {
  color: #1f4ea6;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.id-header p {
  color: #666;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.id-photo {
  width: 100px;
  height: 100px;
  border-radius: 50px;
  margin: 0 auto 20px;
  background: #e0e8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #4f8cff;
  border: 3px solid #4f8cff;
  overflow: hidden;
}

.id-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-info {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px 10px;
  align-items: center;
  margin: 25px 0;
}

.id-label {
  font-weight: 500;
  color: #666;
  text-align: right;
  white-space: nowrap;
  font-size: 0.9rem;
}

.id-value {
  color: #333;
  text-align: left;
  font-weight: 500;
  padding-left: 5px;
}

/* .id-barcode styles removed */

.profile-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.profile-actions .action-btn {
  min-width: 100px;
}

.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }

/* User Management Styles */
.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
  border: 2px solid rgba(79,140,255,0.1);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.user-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.user-name {
  font-weight: 600;
  color: #1f4ea6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 0.9rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Account grid layout */
.accounts-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* 2 columns */
  gap: 20px;  /* Space between grid items */
  width: 100%;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  background: white;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(79,140,255,0.1);
  box-shadow: 0 2px 8px rgba(79,140,255,0.05);
}

.user-item .user-actions {
  margin-left: auto;
  min-width: fit-content;
}

/* Responsive grid adjustment */
@media (max-width: 1200px) {
  .accounts-list {
    grid-template-columns: 1fr;  /* Single column on smaller screens */
  }
}

.user-id {
  font-size: 0.9rem;
  color: #666;
  margin-left: 8px;
  padding: 2px 8px;
  background: rgba(79,140,255,0.1);
  border-radius: 12px;
}

.user-details {
  display: flex;
  align-items: center;
  margin-top: 4px;
  gap: 8px;
}

/* Profile Layout Styles */
.profile-layout {
    display: flex !important;
    flex-direction: row !important;
    gap: 2rem !important;
    padding: 2rem !important;
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 28px rgba(79,140,255,0.06);
}

.profile-section, .payroll-section {
    flex: 1;
    min-width: 0;
    max-width: 50%;
}

#profile-info {
    margin-bottom: 0 !important;
}

.profile-card {
    height: 100%;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
}

.email-section {
    margin-top: 1rem;
}

.profile-layout > div {
    flex: 1;
    min-width: 0;
}

/* Payroll Section Styles */
#payroll-info .profile-card {
    height: 100%;
    margin: 0;
    padding: 1.5rem;
}

#payroll-info .data-table {
    width: 100%;
    min-width: 0;
    margin: 1rem 0;
    font-size: 0.9rem;
}

#payroll-info .data-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

#payroll-info .data-table td:first-child {
    font-weight: 500;
    color: #666;
}

#payroll-info .data-table td:last-child {
    text-align: right;
}

.payroll-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.payroll-filters .form-group {
    flex: 1;
    min-width: 150px;
}

.payroll-summary h3 {
    margin: 1.5rem 0 1rem;
    color: #1f4ea6;
    font-size: 1.1rem;
}

#payroll-info select.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .profile-layout {
        flex-direction: column;
    }
    
    #profile-info,
    #payroll-info {
        width: 100%;
    }
}

/* Archive Details Modal Styles */
.archive-details-modal {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.archive-details h4 {
    margin: 1.5rem 0 0.5rem;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.details-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.details-section.scrollable {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
}

.record-item {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.record-item:last-child {
    border-bottom: none;
}

.record-item p {
    margin: 0.25rem 0;
}

/* Chatbot and Admin page styles */
body.chatbot-page {
    background: #f7f7f7;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.chatbot-data-container {
    padding: 20px;
    margin: 20px auto;
    max-width: 90%;
    width: fit-content;
    min-width: min-content;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.auth-message {
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.button-group {
    margin: 1.5rem 0;
    padding: 0 1rem;
}

h3.period-header {
    color: #1f4ea6;
    margin-bottom: 1rem;
}

/* Table column widths */
.payroll-table th.col-number { width: 40px; }
.payroll-table th.col-name { width: 200px; }
.payroll-table th.col-rate { width: 80px; }
.payroll-table th.col-days { width: 60px; }
.payroll-table th.col-basic { width: 100px; }
.payroll-table th.col-night-hrs { width: 80px; }
.payroll-table th.col-night-amount { width: 100px; }
.payroll-table th.col-ot-hrs { width: 80px; }
.payroll-table th.col-ot-amount { width: 100px; }
.payroll-table th.col-reg-hol-hrs { width: 80px; }
.payroll-table th.col-reg-hol-amount { width: 100px; }
.payroll-table th.col-gross { width: 100px; }
.payroll-table th.col-sss-emp { width: 100px; }
.payroll-table th.col-sss-er { width: 100px; }
.payroll-table th.col-philhealth { width: 100px; }
.payroll-table th.col-pagibig { width: 100px; }
.payroll-table th.col-other-deductions { width: 120px; }
.payroll-table th.col-net { width: 100px; }

/* Button group spacing */
.button-group.with-margin {
    margin-bottom: 1rem;
}

/* Profile styles */
#netPay {
    font-weight: bold;
    color: #1f4ea6;
}

#profile-edit-root.hidden {
    display: none;
}

/* ===== PAYROLL, SCANNER, GENERATOR PAGE STYLES ===== */

/* Page container and layout */
.utility-page {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f6fb;
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.utility-page-header {
    background: linear-gradient(90deg, #4f8cff 0%, #6ed6ff 100%);
    padding: 1.5rem 1.125rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.utility-page-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.utility-page-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.utility-page-header .subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.utility-page-header-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.utility-page-header-nav a {
    color: white;
    font-size: 0.85rem;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.utility-page-header-nav a:hover {
    opacity: 1;
}

.utility-page-main {
    flex: 1;
    padding: 2rem 1.125rem;
}

.utility-page-content {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(79, 140, 255, 0.1);
    padding: 2rem;
}

/* Controls and form sections */
.utility-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fd;
    border-radius: 8px;
    border: 1px solid #e8ecf5;
}

.utility-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #444;
}

.utility-controls input,
.utility-controls select {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.utility-controls input:focus,
.utility-controls select:focus {
    outline: none;
    border-color: #4f8cff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.utility-controls button {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.utility-controls button.primary {
    background: linear-gradient(135deg, #4f8cff 0%, #6ed6ff 100%);
    color: white;
}

.utility-controls button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.3);
}

.utility-controls button:not(.primary) {
    background: #e3f2fd;
    color: #1f4ea6;
}

.utility-controls button:not(.primary):hover {
    background: #d1e3f5;
}

/* Summary cards */
.utility-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(79, 140, 255, 0.02) 0%, transparent 100%);
    border-radius: 8px;
    border: 1px solid rgba(79, 140, 255, 0.08);
}

.utility-card {
    padding: 1.25rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #4f8cff;
}

.utility-card-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.utility-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f4ea6;
}

/* Tables */
.utility-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.utility-table thead {
    background: #f8f9fd;
    border-bottom: 2px solid #e8ecf5;
}

.utility-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #1f4ea6;
    font-size: 0.9rem;
}

.utility-table tbody tr {
    border-bottom: 1px solid #e8ecf5;
    transition: background-color 0.2s;
}

.utility-table tbody tr:hover {
    background: #f8f9fd;
}

.utility-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: #333;
}

.utility-table .muted {
    color: #666;
    font-size: 0.85rem;
}

.utility-table .actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.utility-table button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    background: #e3f2fd;
    color: #1f4ea6;
    cursor: pointer;
    transition: all 0.2s;
}

.utility-table button:hover {
    background: #bbdefb;
}

/* Modal styles */
.utility-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.utility-modal.show {
    display: flex;
}

.utility-modal-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
}

.utility-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8ecf5;
}

.utility-modal-header h2 {
    margin: 0;
    color: #1f4ea6;
    font-size: 1.35rem;
}

.utility-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.utility-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.utility-modal table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.utility-modal th,
.utility-modal td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e8ecf5;
}

.utility-modal th {
    background: #f8f9fd;
    font-weight: 600;
    color: #1f4ea6;
}

/* Status messages */
.utility-status {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.utility-status.info {
    background: #e3f2fd;
    color: #1f4ea6;
    border-left: 4px solid #4f8cff;
}

.utility-status.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.utility-status.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.utility-status.warning {
    color: #b45309;
}

/* Scanner specific */
.scanner-reader {
    width: 100%;
    max-width: 500px;
    height: 400px;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 2px solid #e8ecf5;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.scanner-debug {
    background: #1a1a1a;
    color: #00ff66;
    padding: 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    max-height: 200px;
    overflow: auto;
    margin-top: 1.5rem;
}

/* Generator specific */
.generator-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.generator-form input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
}

.generator-form button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #4f8cff 0%, #6ed6ff 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.generator-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.3);
}

.generator-result {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fd;
    border-radius: 8px;
    border: 1px solid #e8ecf5;
}

.generator-result h3 {
    color: #1f4ea6;
    margin-top: 0;
}

.generator-result-info {
    margin-bottom: 1.5rem;
}

.generator-qr-preview {
    text-align: center;
    margin: 1.5rem 0;
}

.generator-qr-image {
    width: 250px;
    height: 250px;
    border: 2px solid #e8ecf5;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.generator-result-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.generator-result-buttons button {
    padding: 0.7rem 1.25rem;
    background: #e3f2fd;
    color: #1f4ea6;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.generator-result-buttons button:hover {
    background: #bbdefb;
}

/* Payroll Controls Styling */
.payroll-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fd;
    border-radius: 8px;
    border: 1px solid #e8ecf5;
}

.payroll-controls .button-group {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

/* QR Generator Form Styling */
.qr-generator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fd;
    border-radius: 8px;
    border: 1px solid #e8ecf5;
}

.qr-generator-form button {
    grid-column: 1 / -1;
    width: 100%;
}

/* Scanner Controls Styling */
.scanner-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fd;
    border-radius: 8px;
    border: 1px solid #e8ecf5;
}

.scanner-controls .button-group {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.scanner-controls .file-input {
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* Form control - global base styles */
.form-control {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    color: #222;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-control:hover {
    border-color: #9ca3af;
}

.form-control:focus {
    outline: none;
    border-color: #4f8cff;
    box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.1);
}

/* Form group - label and input wrapper */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.9rem;
    color: #444;
    font-weight: 500;
    display: block;
}

/* Reset Password Page Styles */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 24px;
}

input,
button {
    padding: 8px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
}

button.primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 8px 12px;
}

.muted {
    color: #666;
}

.error {
    color: #b91c1c;
}

.success {
    color: #16a34a;
}

#message {
    margin-top: 12px;
}

/* Reset Password Page Styles */
.reset-password-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.back-button {
    align-self: flex-start;
    padding: 0.5rem 1rem;
    color: #1f4ea6;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    background: rgba(79, 140, 255, 0.1);
    color: #4f8cff;
    transform: translateX(-4px);
}

.reset-password-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.reset-password-header {
    background: linear-gradient(135deg, #4f8cff 0%, #6ed6ff 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.reset-password-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.reset-password-subtitle {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.reset-password-content {
    padding: 2rem;
}

.reset-password-info {
    background: rgba(79, 140, 255, 0.05);
    border-left: 4px solid #4f8cff;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 1.5rem;
    min-width: 2rem;
    text-align: center;
}

.reset-password-info p {
    margin: 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
}

.reset-password-form {
    margin-bottom: 1.5rem;
}

.reset-password-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.reset-password-form .form-group label {
    font-weight: 600;
    color: #1f4ea6;
    font-size: 0.95rem;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #4f8cff;
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.reset-password-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(135deg, #4f8cff 0%, #6ed6ff 100%);
    color: white;
    transition: all 0.3s ease;
}

.reset-password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 140, 255, 0.3);
}

.reset-password-btn:active {
    transform: translateY(0);
}

.message-box {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.95rem;
    display: none;
    text-align: center;
}

.message-box.muted {
    background: #f3f4f6;
    color: #666;
    display: block;
}

.message-box.error {
    background: #fee2e2;
    color: #b91c1c;
    display: block;
    border-left: 4px solid #b91c1c;
}

.message-box.success {
    background: #dcfce7;
    color: #16a34a;
    display: block;
    border-left: 4px solid #16a34a;
}

.message-box.success-message {
    background: #dcfce7;
    color: #16a34a;
    display: block;
    border-left: 4px solid #16a34a;
}

.message-box.error-message {
    background: #fee2e2;
    color: #b91c1c;
    display: block;
    border-left: 4px solid #b91c1c;
}

.reset-password-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 2rem;
    text-align: center;
    background: #f9fafb;
}

.footer-text {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.footer-link {
    color: #4f8cff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #1f4ea6;
    text-decoration: underline;
}

.reset-password-help {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.reset-password-help h3 {
    margin: 0 0 1rem 0;
    color: #1f4ea6;
    font-size: 1.1rem;
    font-weight: 600;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.help-list li {
    padding-left: 1.75rem;
    position: relative;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.help-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4f8cff;
    font-weight: bold;
}

@media (max-width: 600px) {
    .reset-password-container {
        padding: 1rem 0.5rem;
        gap: 1rem;
    }

    .reset-password-card,
    .reset-password-help {
        border-radius: 8px;
    }

    .reset-password-header {
        padding: 1.5rem;
    }

    .reset-password-header h2 {
        font-size: 1.5rem;
    }

    .reset-password-content,
    .reset-password-footer {
        padding: 1.5rem;
    }

    .reset-password-help {
        padding: 1.5rem;
    }

    .back-button {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }
}

/* ========================================
   RESPONSIVE ADMIN PAGE STYLES
   ======================================== */

/* Mobile devices (up to 480px) */
@media (max-width: 480px) {
  .admin-dashboard.chatbot-data-container {
    padding: 1rem;
    margin: 0;
    border-radius: 0;
  }

  .admin-section {
    margin-top: 1rem;
    padding: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .admin-dashboard h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .user-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .user-avatar {
    margin-right: 0;
    margin-bottom: 0.75rem;
  }

  .user-main {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0.75rem;
  }

  .user-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .user-qr-display {
    display: none;
  }

  .request-item {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    flex-direction: column;
  }

  .request-actions {
    flex-direction: column;
    margin-left: 0;
    margin-top: 0.75rem;
    width: 100%;
  }

  .request-actions .action-btn {
    width: 100%;
  }

  .data-table {
    min-width: 100%;
    font-size: 0.8rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 6px;
    font-size: 0.75rem;
  }

  .section-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .section-header h3 {
    margin: 0;
  }

  .section-header .action-btn {
    width: 100%;
  }

  .action-btn {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .button-group {
    flex-wrap: wrap;
  }

  .button-group .action-btn {
    flex: 1 1 100%;
    min-width: 100px;
  }

  nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

/* Small tablets (481px to 640px) */
@media (max-width: 640px) {
  .admin-dashboard.chatbot-data-container {
    padding: 1.25rem;
  }

  .admin-section {
    margin-top: 1.25rem;
    padding: 1.25rem;
  }

  .admin-dashboard h2 {
    font-size: 1.4rem;
  }

  .user-item {
    flex-wrap: wrap;
  }

  .user-main {
    min-width: 150px;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 8px;
  }
}

/* Medium tablets (641px to 768px) */
@media (min-width: 641px) and (max-width: 768px) {
  .admin-dashboard.chatbot-data-container {
    padding: 1.5rem;
    max-width: 100%;
  }

  .admin-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
  }

  .admin-dashboard h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .admin-section h3 {
    font-size: 1.1rem;
  }

  .user-item {
    flex-wrap: wrap;
    padding: 1rem;
  }

  .user-avatar {
    margin-bottom: 0.75rem;
  }

  .user-main {
    margin-right: 0.75rem;
    min-width: 200px;
  }

  .user-qr-display {
    margin: 0.5rem;
    display: flex;
  }

  .user-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .request-item {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .request-actions {
    flex-wrap: wrap;
    margin-left: 0.5rem;
  }

  .data-table {
    min-width: 100%;
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
  }

  .data-table th,
  .data-table td {
    padding: 10px 8px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .section-header h3 {
    margin: 0;
  }

  .section-header .action-btn {
    align-self: flex-start;
  }

  .action-btn {
    padding: 10px 16px;
    font-size: 0.95rem;
  }

  nav {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-btn {
    padding: 8px 14px;
    font-size: 0.9rem;
  }
}

/* Small laptops and tablets landscape (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .admin-dashboard.chatbot-data-container {
    padding: 2rem;
    max-width: 100%;
  }

  .admin-section {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }

  .admin-dashboard h2 {
    font-size: 1.6rem;
  }

  .user-item {
    padding: 1rem;
  }

  .user-qr-display {
    margin: 0 0.75rem;
    width: 60px;
    height: 60px;
  }

  .user-qr-display img {
    width: 100%;
    height: 100%;
  }

  .user-actions {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .data-table {
    min-width: 100%;
    overflow-x: auto;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .section-header {
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
  }

  .section-header h3 {
    margin: 0;
  }

  .button-group {
    flex-wrap: wrap;
  }

  .request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

/* Medium screens (1025px to 1440px) - Default/optimal layout */
@media (min-width: 1025px) and (max-width: 1440px) {
  .admin-dashboard.chatbot-data-container {
    padding: 2rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  .admin-section {
    padding: 2rem;
  }

  .data-table {
    font-size: 1rem;
  }

  .data-table th,
  .data-table td {
    padding: 12px 16px;
  }
}

/* Large screens (1441px and above) */
@media (min-width: 1441px) {
  .admin-dashboard.chatbot-data-container {
    max-width: 1400px;
    padding: 2rem 3rem;
    margin: 0 auto;
  }

  .admin-section {
    padding: 2rem;
  }

  .data-table {
    font-size: 1rem;
  }

  .data-table th,
  .data-table td {
    padding: 12px 16px;
  }
}

/* General responsive utilities */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  header nav {
    flex-wrap: wrap;
  }

  .container {
    padding: 0 1rem;
  }

  main {
    padding: 1rem;
  }

  .form-container.payroll-container {
    padding: 1.5rem;
  }
}

/* Touch-friendly sizing for mobile buttons */
@media (hover: none) and (pointer: coarse) {
  .action-btn,
  .nav-btn,
  button {
    min-height: 44px;
    min-width: 44px;
  }

  .user-actions .action-btn {
    padding: 12px 16px;
  }
}

/* Archives page responsive styling */
@media (max-width: 768px) {
  header .nav-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  header h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0.75rem 0;
  }

  header .container {
    padding: 0 0.75rem;
  }

  header > div > div {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  header .nav-btn {
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  header h1 {
    font-size: 1.25rem;
  }
}



