/* =============================================================================
   AKSARASA ABSENSI - ADMIN DASHBOARD & REPORT STYLESHEET
   Aesthetic: Aksarasa Studio Warm Linen Canvas, Terracotta Rust & Studio Charcoal
   ============================================================================= */

/* -----------------------------------------------------------------------------
   ADMIN LAYOUT STRUCTURE
   ----------------------------------------------------------------------------- */
/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 13, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 899;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: #FAF7F2;
  color: var(--text-main);
  position: relative;
}

/* Sidebar: Elegant Studio Charcoal */
.admin-sidebar {
  width: 260px;
  background: #191817;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  transition: transform var(--transition-normal);
}

.sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FAF6F0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary) 0%, #B44A24 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.brand-text h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FAF6F0;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.75rem;
  color: #A8A29E;
  font-weight: 500;
}

.sidebar-menu {
  flex: 1;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}

.menu-category-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #78736E;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  color: #D6D3D1;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.sidebar-link svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, #B44A24 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

/* Main Content Area */
.admin-main {
  flex: 1 1 0%;
  min-width: 0;
  margin-left: 260px;
  width: calc(100% - 260px);
  max-width: calc(100vw - 260px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: radial-gradient(circle at 80% 10%, rgba(200, 90, 50, 0.05) 0%, transparent 60%);
}

/* Top Navbar */
.admin-topbar {
  min-height: 72px;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  box-sizing: border-box;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.mobile-menu-toggle {
  display: none;
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: var(--bg-card-subtle);
  border-color: var(--primary);
}

.page-headline {
  min-width: 0;
}

.page-headline h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-headline p {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.db-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
  white-space: nowrap;
}

.admin-body {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* -----------------------------------------------------------------------------
   ADMIN DASHBOARD OVERVIEW CARDS
   ----------------------------------------------------------------------------- */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
  width: 100%;
}

@media (max-width: 1440px) {
  .stats-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .stats-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .stats-cards-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

.admin-stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.admin-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: var(--shadow-md);
}

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

.stat-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-indigo { background: #FDF6F0; color: #C85A32; }
.stat-icon-green  { background: #F0FDF4; color: #16A34A; }
.stat-icon-amber  { background: #FFFBEB; color: #D97706; }
.stat-icon-rose   { background: #FEF2F2; color: #DC2626; }
.stat-icon-cyan   { background: #F5EFE6; color: #7A2F17; }

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* -----------------------------------------------------------------------------
   PANEL CARDS & DATA TABLES
   ----------------------------------------------------------------------------- */
.panel-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 30px;
}

.panel-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #FFFFFF;
}

.panel-title-wrap h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.panel-title-wrap p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.panel-actions-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* -----------------------------------------------------------------------------
   STRUCTURED TOOLBAR & UNIFIED FILTER BARS
   ----------------------------------------------------------------------------- */
.panel-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-action-pill {
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-action-pill:hover {
  transform: translateY(-1px);
}

.panel-filter-bar {
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 28px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 1 auto;
}

.filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.filter-control {
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  min-height: 40px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.btn-filter-submit {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(200, 90, 50, 0.25);
}

.panel-filter-bar .btn-quick {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
}

.panel-filter-bar .btn-quick:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-subtle);
  color: var(--text-main);
}

.filter-input {
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 9px 16px;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}

.filter-input:focus {
  border-color: var(--primary);
  background: #FFFFFF;
}

.table-responsive {
  width: 100%;
  overflow-x: hidden; /* Guarantee zero horizontal scrollbar on all desktop & tablet views */
  overflow-y: visible;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.86rem;
  table-layout: auto;
}

.admin-table th {
  background: #F4ECE1;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  white-space: normal;
  line-height: 1.35;
  vertical-align: middle;
}

.admin-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-secondary);
  font-size: 0.84rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

.admin-table tbody tr {
  transition: background var(--transition-fast);
}

.admin-table tbody tr:hover {
  background: #FDFBF8;
}

.user-cell-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #DE8F65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #FFFFFF;
  font-size: 0.85rem;
  flex-shrink: 0;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(25, 24, 23, 0.12);
}

/* Compact Attendance Log Cells */
.attendance-compact-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.attendance-time-val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1.1;
}

.attendance-time-val .time-tz {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.evidence-inline-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.evidence-thumb-compact {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(25, 24, 23, 0.12);
  cursor: pointer;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.evidence-thumb-compact:hover {
  transform: scale(1.18);
}

.evidence-sub-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.evidence-kb-chip {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.evidence-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.evidence-img-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(25, 24, 23, 0.12);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.evidence-img-thumb:hover {
  transform: scale(1.15);
}

.evidence-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.evidence-kb-badge {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
}

.btn-map-link {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-map-link:hover {
  color: var(--primary);
}

/* Action Buttons within Tables */
.action-btn-group {
  display: flex;
  gap: 6px;
}

.btn-table-action {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-table-action:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-table-action.btn-delete:hover {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}

/* -----------------------------------------------------------------------------
   REPORT EXPORT & PRINT LAYOUT
   ----------------------------------------------------------------------------- */
.report-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px 28px;
  background: #FDFBF8;
  border-bottom: 1px solid var(--border-color);
}

.report-summary-item {
  display: flex;
  flex-direction: column;
}

.report-summary-num {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.report-summary-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Print Layout */
@media print {
  body {
    background: #FFFFFF !important;
    color: #191817 !important;
  }

  .admin-sidebar, .admin-topbar, .panel-actions-wrap, .btn-action, .bottom-nav, #toast-container {
    display: none !important;
  }

  .admin-main {
    margin-left: 0 !important;
    background: none !important;
  }

  .admin-body {
    padding: 0 !important;
  }

  .panel-card {
    border: none !important;
    box-shadow: none !important;
    background: #FFFFFF !important;
  }

  .admin-table {
    border: 1px solid #D6D3D1;
  }

  .admin-table th {
    background: #F5EFE6 !important;
    color: #191817 !important;
    border-bottom: 2px solid #C4552A;
  }

  .admin-table td {
    color: #191817 !important;
    border-bottom: 1px solid #E5E7EB;
  }

  .print-only-header {
    display: block !important;
    text-align: center;
    border-bottom: 3px double #C4552A;
    padding-bottom: 16px;
    margin-bottom: 24px;
  }

  .print-signatures {
    display: flex !important;
    justify-content: space-between;
    margin-top: 50px;
    padding: 0 40px;
  }
}

.print-only-header, .print-signatures {
  display: none;
}

/* -----------------------------------------------------------------------------
   RESPONSIVE MEDIA QUERIES & MOBILE ADAPTATIONS
   ----------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .admin-sidebar {
    transform: translateX(-100%);
    z-index: 1000;
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.4);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close-btn {
    display: flex;
  }

  .admin-main {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .admin-topbar {
    padding: 12px 20px;
  }

  .admin-body {
    padding: 20px 16px;
  }
}

@media (max-width: 768px) {
  .admin-topbar {
    padding: 10px 16px;
  }

  .topbar-right {
    gap: 10px;
  }

  .db-status-pill {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .page-headline h1 {
    font-size: 1.1rem;
  }

  .page-headline p {
    font-size: 0.74rem;
  }

  .panel-header {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .panel-toolbar-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .btn-action-pill {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    font-size: 0.82rem;
    padding: 8px 12px;
  }

  .panel-filter-bar {
    padding: 14px 16px;
    gap: 10px;
  }

  .filter-group {
    flex: 1 1 calc(50% - 8px);
    min-width: 135px;
  }

  .filter-control {
    width: 100%;
    font-size: 0.82rem;
  }

  .filter-btn-group {
    flex: 1 1 100%;
    margin-top: 4px;
    display: flex;
    gap: 8px;
  }

  .btn-filter-submit {
    flex: 2;
    justify-content: center;
  }

  .panel-filter-bar .btn-quick {
    flex: 1;
    justify-content: center;
  }

  .panel-actions-wrap {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .panel-actions-wrap .filter-input,
  .panel-actions-wrap select,
  .panel-actions-wrap button {
    flex: 1 1 auto;
    font-size: 0.82rem;
  }

  .report-summary-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 16px;
    gap: 12px;
  }

  /* Responsive Mobile Card Transformation for ALL Dashboard Tables */
  .table-responsive {
    overflow-x: visible;
    padding: 0 14px 14px;
  }

  .admin-table {
    display: block;
    width: 100%;
  }

  .admin-table thead {
    display: none; /* Hide header row on mobile */
  }

  .admin-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .admin-table tbody tr {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(25, 24, 23, 0.05);
    padding: 12px 14px;
    gap: 8px;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
  }

  .admin-table tbody tr:hover {
    background: #FFFFFF;
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
  }

  .admin-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-light);
    font-size: 0.84rem;
    text-align: right;
  }

  .admin-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .admin-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    padding-right: 12px;
    flex-shrink: 0;
  }

  .admin-table td[colspan] {
    display: block;
    text-align: center !important;
    justify-content: center;
    padding: 24px 12px;
    border: none;
  }

  .admin-table td[colspan]::before {
    display: none;
  }

  .admin-table .user-cell-wrap {
    justify-content: flex-end;
    text-align: right;
  }

  .admin-table .action-btn-group {
    justify-content: flex-end;
  }

  .attendance-compact-cell {
    align-items: flex-end;
  }
}

@media (max-width: 480px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  .admin-topbar {
    padding: 8px 12px;
  }

  .topbar-left {
    gap: 8px;
  }

  .page-headline h1 {
    font-size: 0.98rem;
    line-height: 1.2;
  }

  .page-headline p {
    display: none; /* Keep topbar clean on small mobile devices */
  }

  .db-status-pill {
    padding: 3px 7px;
    font-size: 0.65rem;
  }

  .admin-body {
    padding: 12px 10px;
  }

  .report-summary-bar {
    grid-template-columns: 1fr;
  }

  .panel-card {
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
  }

  .btn-action-pill {
    flex: 1 1 100%;
    width: 100%;
  }

  .filter-group {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .panel-header {
    padding: 14px 14px 10px;
    gap: 10px;
  }

  .panel-title-wrap h2 {
    font-size: 1.05rem;
  }

  .panel-title-wrap p {
    font-size: 0.75rem;
  }

  .table-responsive {
    padding: 0 8px 12px;
  }

  .admin-table tbody tr {
    padding: 10px 12px;
  }

  .admin-table td {
    font-size: 0.8rem;
  }

  .admin-table td::before {
    font-size: 0.68rem;
  }
}

/* Sidebar Badge & Clickable KPI Card for Shift Swaps */
.sidebar-badge {
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  line-height: 1.2;
  box-shadow: 0 2px 6px rgba(200, 90, 50, 0.4);
}

.clickable-stat-card {
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.clickable-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.badge-shift-admin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.14);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.28);
  white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   SHIFT SCHEDULE STATUS & TIME BADGES
   ----------------------------------------------------------------------------- */
.badge-shift-active {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.badge-shift-inactive {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.shift-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  background: #F5EFE6;
  color: #7A2F17;
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid #EBE4D8;
  white-space: nowrap;
}

.shift-tolerance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #FFFBEB;
  color: #B45309;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid #FDE68A;
  white-space: nowrap;
}
