/* =============================================
   Modern CSS — Accent Call-Off System
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-header: #313131;
  --color-primary: #0b6699;
  --color-primary-hover: #084d74;
  --color-primary-dark: #065080;
  --color-success: #28a745;
  --color-success-hover: #1e7e34;
  --color-danger: #dc3545;
  --color-danger-hover: #c82333;
  --color-warning: #ffc107;
  --color-bg: #f0f2f5;
  --color-surface: #ffffff;
  --color-border: #dee2e6;
  --color-border-light: #e9ecef;
  --color-text: #212529;
  --color-text-muted: #6c757d;
  --color-text-light: #adb5bd;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 50px;
  --transition: 0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  min-width: 0;
}

/* ── Header ─────────────────────────────────── */

.m-header {
  background: var(--color-header);
  color: #fff;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.m-header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.m-header-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.m-header-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.m-header-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  white-space: nowrap;
}

.m-header-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
}

.m-header-spacer {
  flex: 1;
}

.m-header-user {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  text-align: right;
  line-height: 1.3;
}

.m-header-user strong {
  color: #fff;
  display: block;
}

.m-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Page Layout ─────────────────────────────── */

.m-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

/* ── Card ────────────────────────────────────── */

.m-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  padding: 24px;
  margin-bottom: 20px;
}

.m-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
}

/* ── Buttons ─────────────────────────────────── */

.m-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.m-btn:active { transform: scale(0.98); }

.m-btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.m-btn-primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-sm); }

.m-btn-success {
  background: var(--color-success);
  color: #fff;
}
.m-btn-success:hover { background: var(--color-success-hover); }

.m-btn-danger {
  background: var(--color-danger);
  color: #fff;
}
.m-btn-danger:hover { background: var(--color-danger-hover); }

.m-btn-ghost {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.m-btn-ghost:hover { background: rgba(255,255,255,0.2); }

.m-btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
.m-btn-outline:hover { background: var(--color-primary); color: #fff; }

.m-btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.m-btn-lg {
  padding: 11px 28px;
  font-size: 15px;
}

/* ── Form Controls ───────────────────────────── */

.m-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.m-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.m-input,
.m-select {
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.m-input:focus,
.m-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11,102,153,0.12);
}

.m-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px;
}

/* ── Filter Bar (Report Page) ────────────────── */

.m-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.m-filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
}

.m-filter-group.wide { min-width: 220px; flex: 1; }

.m-time-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.m-time-row .m-input { width: 120px; }
.m-time-row .m-select { width: 70px; }
.m-time-row .m-select.ampm { width: 66px; }

/* ── Tables ──────────────────────────────────── */

.m-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
}

.m-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.m-table thead th {
  background: #f8f9fa;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 11px 14px;
  text-align: left;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.m-table thead th:hover { background: #eef0f2; color: var(--color-text); }

.m-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
  color: var(--color-text);
}

.m-table tbody tr:last-child td { border-bottom: none; }

.m-table tbody tr:hover td { background: #f8f9fa; }

.m-table .totals td {
  background: #f8f9fa;
  border-top: 2px solid var(--color-border);
  font-size: 13px;
}

.m-table tfoot td {
  background: #eef2f5;
  font-weight: 700;
  border-top: 2px solid var(--color-border);
  padding: 11px 14px;
}

/* DataTables override */
.dataTables_wrapper { font-family: inherit; font-size: 14px; }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select { 
  font-family: inherit; font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
}

/* ── Search Bar ──────────────────────────────── */

.m-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.m-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.m-search-input-wrap input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.m-search-input-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11,102,153,0.12);
}

.m-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  pointer-events: none;
  font-size: 14px;
}

.m-export-btns {
  display: flex;
  gap: 8px;
}

/* ── Report Header ───────────────────────────── */

.m-report-header {
  text-align: center;
  padding: 16px 0 8px;
}

.m-report-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--color-text);
}

.m-report-header p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 2px 0;
}

/* ── Modals ──────────────────────────────────── */

.cm-dialog {
  padding: 28px;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 92%;
  max-width: 480px;
  background: var(--color-surface);
  color: var(--color-text);
}
.cm-dialog::backdrop {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 92%;
  max-width: 480px;
  padding: 28px;
  position: relative;
  animation: modal-in 0.18s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-content h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--color-text);
}

.cm-dialog .close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 20px;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
}

.cm-dialog .close:hover { color: var(--color-text); }

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-light);
}

/* ── Toggle Switch ───────────────────────────── */

.m-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.m-switch input { opacity: 0; width: 0; height: 0; }

.m-slider {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: #cdd0d4;
  border-radius: 22px;
  transition: background var(--transition);
  cursor: pointer;
}

.m-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.m-switch input:checked + .m-slider { background: var(--color-primary); }
.m-switch input:checked + .m-slider::before { transform: translateX(18px); }

/* ── Tabs ────────────────────────────────────── */

.m-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--color-border-light);
  margin-bottom: 20px;
}

.m-tab {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: none;
  background: none;
  font-family: inherit;
  transition: color var(--transition), background var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.m-tab:hover { color: var(--color-primary); background: rgba(11,102,153,0.05); }
.m-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }

/* ── Login Page ──────────────────────────────── */

.m-login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a2a3a 0%, #313131 60%, #1a2a3a 100%);
  padding: 24px;
}

.m-login-card-logo {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.m-login-card-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.m-login-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.m-login-card h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px;
}

.m-login-card p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 28px;
}

.m-login-field {
  margin-bottom: 18px;
}

.m-login-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.m-login-field input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text);
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.m-login-field input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11,102,153,0.12);
}

.m-login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  cursor: pointer;
}

.m-login-remember input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.m-login-submit {
  width: 100%;
  padding: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  letter-spacing: 0.01em;
}

.m-login-submit:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 12px rgba(11,102,153,0.35);
}

/* ── Session Timeout Modal ───────────────────── */

#sessionTimeoutModal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#sessionTimeoutModal.show { display: flex; }

/* ── Admin Action Buttons ────────────────────── */

.m-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-light);
}

/* ── Upload Section ──────────────────────────── */

.m-upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}

.m-upload-zone:hover {
  border-color: var(--color-primary);
  background: rgba(11,102,153,0.03);
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 768px) {
  .m-page { padding: 16px; }
  .m-filter-bar { gap: 12px; }
  .m-header-title { font-size: 14px; }
  .m-login-card { padding: 28px 20px; }
}

/* ── Admin Tab Strip ─────────────────────────── */

.m-admin-tabs {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.m-admin-tabs-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
}

.m-admin-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.m-admin-tab:hover {
  color: var(--color-text);
  background: var(--color-bg);
}

.m-admin-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.m-admin-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Card Header ─────────────────────────────── */

.m-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border-light);
  gap: 16px;
}

.m-card-header-info h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 2px;
}

.m-card-header-info p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
}

.m-card-body {
  padding: 20px 24px;
}

.m-card-no-pad {
  padding: 0;
}

/* ── Upload Zone ─────────────────────────────── */

.m-upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
  margin-bottom: 20px;
}

.m-upload-zone:hover {
  border-color: var(--color-primary);
  background: rgba(11,102,153,0.03);
}

.m-upload-zone-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--color-text-light);
}

.m-upload-zone label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.m-upload-zone p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 16px;
}

.m-upload-zone input[type=file] {
  display: none;
}

.m-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

/* ── Modal Form Fields ───────────────────────── */

.m-modal-field {
  margin-bottom: 16px;
}

.m-modal-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.m-modal-field input[type=text],
.m-modal-field input[type=email],
.m-modal-field input[type=password],
.m-modal-field select {
  display: block;
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}

.m-modal-field input:focus,
.m-modal-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11,102,153,0.12);
}

.m-modal-field input[readonly] {
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.m-modal-field input[type=text][style*=f7f7bd],
.m-modal-field input[style*=f7f7bd] {
  background-color: #f7f7bd !important;
}

/* ── Admin Table Overrides ───────────────────── */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table thead th {
  background: #f8f9fa;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 11px 14px;
  text-align: left;
  border-bottom: 2px solid var(--color-border);
}

.admin-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #f8f9fa; }

/* DataTables inside card — remove default wrapper padding */
.m-card-no-pad .dataTables_wrapper {
  padding: 16px 20px;
}

.m-card-no-pad table.dataTable {
  margin: 0 !important;
  border-top: 1px solid var(--color-border-light);
}

/* ── Admin Landing Dashboard ─────────────────── */

.m-admin-landing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
}

@media (max-width: 768px) {
  .m-admin-landing-grid { grid-template-columns: 1fr; }
}

.m-landing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.m-landing-card:active { transform: translateY(0); }

.m-landing-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 24px 16px;
  flex-shrink: 0;
}

.m-landing-card-body {
  padding: 0 24px 20px;
  flex: 1;
}

.m-landing-card-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px;
}

.m-landing-card-body p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}

.m-landing-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--color-border-light);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  background: #fafbfc;
  transition: background var(--transition);
}

.m-landing-card:hover .m-landing-card-footer {
  background: #f0f6fb;
}

/* ── Back Button ─────────────────────────────── */

.m-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.m-back-btn:hover {
  color: var(--color-text);
  background: var(--color-border-light);
}

/* ── Report Landing ──────────────────────────── */

.m-report-landing {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 40px 20px;
}

.m-report-landing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 48px 56px;
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.m-report-landing-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: #e8f2f9;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-report-landing-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-primary);
}

.m-report-landing-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 12px;
}

.m-report-landing-card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0 0 32px;
  line-height: 1.6;
}

/* ── Filter Grid ─────────────────────────────── */

.m-filter-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin-top: 12px;
}

.m-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.m-filter-row.m-filter-row-full {
  grid-template-columns: 1fr;
}

.m-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.m-required {
  color: #dc3545;
}

.m-field-optional {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 12px;
}

.m-field-input {
  width: 100%;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}

.m-field-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11,102,153,0.12);
}

.m-time-selects {
  display: flex;
  gap: 8px;
  align-items: center;
}

.m-time-sel {
  flex: 1;
  padding: 8px 6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}

.m-time-sel:focus {
  border-color: var(--color-primary);
}

.m-form-actions {
  padding: 16px 0 4px;
  display: flex;
  justify-content: center;
}

/* Filter form: chosen.js overrides */
.m-filter-grid .chosen-container {
  width: 100% !important;
}

.m-filter-grid .chosen-container-multi .chosen-choices {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-family: inherit;
  font-size: 14px;
  padding: 4px 8px;
  box-shadow: none;
}

.m-filter-grid .chosen-container-multi .chosen-choices:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11,102,153,0.12);
}

/* Card header title (report form) */
.m-card-header-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ── Report filter: override modal-field margin inside grid ── */
.m-filter-grid .m-modal-field {
  margin-bottom: 0;
}

/* Chosen.js full width in filter grid */
.m-filter-row-full .chosen-container,
.m-filter-grid .chosen-container {
  width: 100% !important;
  font-family: inherit;
  font-size: 14px;
}

/* ── Daterangepicker fixes ── */
.daterangepicker {
  z-index: 9999 !important;
}

/* ── Report card form variant ───────────────── */
.m-landing-card--form {
  cursor: default;
}
.m-landing-card--form .m-landing-card-footer {
  gap: 10px;
}
.m-report-select {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--color-text);
  background: #fff;
  padding: 0 8px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.m-report-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11,102,153,0.12);
}

/* ── Sidebar Layout ──────────────────────────── */

.m-layout { display: flex; min-height: 100vh; }

.m-sidebar {
  width: 240px;
  background: #1e2b38;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.25s ease;
}

/* ── Mobile hamburger + overlay ── */
.m-hamburger {
  display: none;
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  background: #1e2b38;
  border: none;
  border-radius: 6px;
  padding: 9px 10px;
  cursor: pointer;
  color: #fff;
  line-height: 0;
}
.m-hamburger svg { display: block; }
.m-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
}

.m-sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  display: block;
}

.m-sidebar-logo img {
  height: 26px; width: auto; display: block; margin-bottom: 8px;

}

.m-sidebar-app-name {
  font-size: 11.5px; font-weight: 600;
  color: rgba(255,255,255,0.45); letter-spacing: 0.04em;
}

.m-sidebar-section-label {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 16px 20px 6px;
}

.m-sidebar-nav { flex: 1; padding: 4px 10px; }

.m-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 7px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,0.65);
  cursor: pointer; transition: all 0.15s ease;
  margin-bottom: 2px; border: none; background: none;
  width: 100%; text-align: left;
  font-family: inherit; text-decoration: none;
}

.m-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.m-nav-item.active { background: rgba(11,102,153,0.45); color: #fff; font-weight: 600; }
.m-nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

.m-sidebar-footer { padding: 12px 10px 16px; border-top: 1px solid rgba(255,255,255,0.08); }

.m-main {
  margin-left: 240px; flex: 1; min-width: 0;
  min-height: 100vh; background: var(--color-bg);
}

/* ── Hero Banner (breaks out of m-page padding) ── */

.m-hero {
  margin: -24px -24px 0;
  padding: 40px 36px 36px;
  background: linear-gradient(135deg, #0b6699 0%, #084d74 100%);
  color: #fff;
  display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}

.m-hero-text h1 {
  font-size: 22px; font-weight: 700; margin: 0 0 6px; color: #fff;
}

.m-hero-text p { font-size: 14px; color: rgba(255,255,255,0.8); margin: 0; }

.m-hero-logo img {
  height: 54px; width: auto;

}

/* ── Stats Row ── */

.m-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 0;
}

.m-stat-card {
  background: #fff; border-radius: var(--radius-md);
  padding: 18px 20px;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 14px;
}

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

.m-stat-info { flex: 1; min-width: 0; }

.m-stat-label {
  font-size: 11px; font-weight: 700; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px;
}

.m-stat-value { font-size: 24px; font-weight: 700; color: var(--color-text); line-height: 1.1; }

/* ── Admin Tools Section Heading ── */

.m-section-heading { margin: 28px 0 16px; }
.m-section-heading h2 { font-size: 15px; font-weight: 700; color: var(--color-text); margin: 0 0 3px; }
.m-section-heading p  { font-size: 13px; color: var(--color-text-muted); margin: 0; }

/* ── Admin Landing Grid: 4-up then 2-up ── */

.m-admin-landing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: none;
}

@media (max-width: 1100px) {
  .m-admin-landing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .m-sidebar { transform: translateX(-240px); }
  .m-sidebar.open { transform: translateX(0); }
  .m-sidebar-overlay.open { display: block; }
  .m-hamburger { display: flex; align-items: center; justify-content: center; }
  .m-main { margin-left: 0; padding-top: 52px; }
  .m-stats-row { grid-template-columns: 1fr; }
  .m-hero { padding: 24px 16px; }
  .m-hero-logo { display: none; }
  .m-admin-landing-grid { grid-template-columns: 1fr; }
}

/* ── Dashboard Charts ────────────────────────────────────────────────── */
.m-stats-row { grid-template-columns: repeat(4, 1fr); }
.m-stat-sub  { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; }

.m-chart-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.m-chart-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.m-chart-filter-select {
  padding: 6px 12px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  min-width: 200px;
  max-width: 320px;
}
.m-chart-filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11,102,153,0.12);
}

.m-charts-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-bottom: 24px;
}
.m-chart-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
}
.m-chart-card--wide { /* takes the 1fr column */ }
.m-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--color-border-light);
}
.m-chart-title { font-size: 14px; font-weight: 700; color: var(--color-text); }
.m-chart-sub   { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.m-chart-body  { padding: 16px 20px; min-height: 220px; position: relative; }

@media (max-width: 900px) {
  .m-charts-row { grid-template-columns: 1fr; }
  .m-stats-row  { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════════════
   REDESIGNED DASHBOARD — Header, Hero, Tool Cards, Panels
   ══════════════════════════════════════════════════════════════ */

/* ── Sidebar: orange active state ─────────────────────────────── */
.m-nav-item.active {
  background: rgba(249,115,22,0.18) !important;
  color: #f97316 !important;
  font-weight: 600;
}
.m-nav-item.active svg { stroke: #f97316; }
.m-nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }

/* ── Top Header Bar ───────────────────────────────────────────── */
.m-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  height: 58px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky; top: 0; z-index: 50;
}
.m-topbar-left { display: flex; align-items: center; gap: 8px; }
.m-topbar-breadcrumb { font-size: 13px; color: var(--color-text-muted); }
.m-topbar-breadcrumb--active { color: var(--color-text); font-weight: 600; }
.m-topbar-right { display: flex; align-items: center; gap: 16px; }
.m-topbar-user { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.m-topbar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #f97316; color: #fff;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.m-topbar-username { font-size: 13px; font-weight: 600; color: var(--color-text); display: block; }
.m-topbar-role { font-size: 11px; color: var(--color-text-muted); display: block; }

/* ── New Hero ─────────────────────────────────────────────────── */
.m-hero2 {
  background: linear-gradient(135deg, #1e2b38 0%, #0b3d5e 100%);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.m-hero2-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  color: #f97316; text-transform: uppercase; margin-bottom: 6px;
}
.m-hero2-title {
  font-size: 28px; font-weight: 800; color: #fff; margin: 0 0 8px;
}
.m-hero2-sub { font-size: 14px; color: rgba(255,255,255,0.65); margin: 0 0 12px; max-width: 480px; }
.m-hero2-date { font-size: 13px; color: rgba(255,255,255,0.45); }
.m-hero2-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(249,115,22,0.15); border: 1px solid rgba(249,115,22,0.3);
  color: #f97316; border-radius: 100px;
  padding: 8px 16px; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}

/* ── Stat Cards: 4-col ────────────────────────────────────────── */
.m-stats-row {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.m-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 14px;
}
.m-stat-icon-wrap {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.m-stat-label { font-size: 12px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing:.04em; margin-bottom: 4px; }
.m-stat-value { font-size: 22px; font-weight: 800; color: var(--color-text); line-height:1; }
.m-stat-sub   { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

/* ── Get Started header ───────────────────────────────────────── */
.m-gs-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.m-gs-title { font-size: 17px; font-weight: 700; color: var(--color-text); margin: 0 0 2px; }
.m-gs-sub   { font-size: 13px; color: var(--color-text-muted); margin: 0; }

/* ── New Tool Cards ───────────────────────────────────────────── */
.m-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.m-tool-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
  overflow: hidden;
}
.m-tool-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.10); transform: translateY(-2px); }
.m-tool-card-top { padding: 20px 20px 16px; flex: 1; }
.m-tool-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.m-tool-title { font-size: 14px; font-weight: 700; color: var(--color-text); margin: 0 0 6px; }
.m-tool-desc  { font-size: 12.5px; color: var(--color-text-muted); margin: 0; line-height: 1.5; }
.m-tool-cta {
  display: block; width: 100%;
  padding: 11px 20px;
  background: #f97316; color: #fff;
  border: none; cursor: pointer;
  font-size: 13px; font-weight: 600;
  text-align: center; text-decoration: none;
  transition: background 0.15s;
  font-family: inherit;
}
.m-tool-cta:hover { background: #ea6c0a; }

/* ── Bottom panels ────────────────────────────────────────────── */
.m-bottom-panels {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  margin-bottom: 32px;
}
.m-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.m-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border-light);
}
.m-panel-title { font-size: 14px; font-weight: 700; color: var(--color-text); margin: 0; }
.m-panel-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  background: #fff3e0; color: #f97316; border-radius: 100px;
}
.m-panel-body { padding: 8px 0; }

/* Activity items */
.m-activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; transition: background 0.1s;
}
.m-activity-item:hover { background: var(--color-bg); }
.m-activity-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg,#0b6699,#1a8fcc);
  color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.m-activity-info { flex: 1; min-width: 0; }
.m-activity-name { font-size: 13px; font-weight: 600; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-activity-meta { font-size: 11.5px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-activity-time { font-size: 11px; color: var(--color-text-muted); flex-shrink: 0; }

/* Status panel */
.m-status-hero {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--color-border-light);
}
.m-status-ok-title { font-size: 14px; font-weight: 700; color: #22c55e; }
.m-status-ok-sub   { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.m-status-list { padding: 8px 20px; }
.m-status-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; font-size: 13px; color: var(--color-text);
  border-bottom: 1px solid var(--color-border-light);
}
.m-status-item:last-child { border-bottom: none; }
.m-status-item-val { margin-left: auto; font-size: 12px; color: var(--color-text-muted); }
.m-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.m-status-dot--green { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.2); }
.m-help-box {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 8px 20px 16px;
  padding: 12px 14px;
  background: #fff8f0; border-radius: 8px;
  border: 1px solid rgba(249,115,22,0.15);
}
.m-help-title { font-size: 13px; font-weight: 600; color: var(--color-text); }
.m-help-sub   { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

/* ── Hide old hero on dashboard ───────────────────────────────── */
.m-hero { display: none !important; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .m-tool-grid { grid-template-columns: repeat(2,1fr); }
  .m-stats-row { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 820px) {
  .m-bottom-panels { grid-template-columns: 1fr; }
  .m-tool-grid { grid-template-columns: repeat(2,1fr); }
  .m-hero2-badge { display: none; }
}
@media (max-width: 560px) {
  .m-tool-grid { grid-template-columns: 1fr; }
  .m-stats-row { grid-template-columns: 1fr 1fr; }
}
