/* ============================================
   iLesen MPS - Main CSS
   Majlis Perbandaran Selayang
   ============================================ */

:root {
  --mps-blue: #003580;
  --mps-blue-dark: #002660;
  --mps-blue-light: #0056b3;
  --mps-green: #1a7a3c;
  --mps-green-light: #28a745;
  --mps-red: #c0392b;
  --mps-yellow: #f39c12;
  --mps-orange: #e67e22;
  --mps-gray: #6c757d;
  --mps-gray-light: #f8f9fa;
  --mps-gray-border: #dee2e6;
  --mps-white: #ffffff;
  --mps-shadow: 0 2px 12px rgba(0,53,128,0.10);
  --mps-shadow-lg: 0 8px 32px rgba(0,53,128,0.15);
  --mps-radius: 12px;
  --mps-radius-sm: 8px;
  --mps-radius-lg: 20px;
  --transition: all 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', 'Arial', sans-serif;
  background: #f0f4f8;
  color: #1a1a2e;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.3; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin-bottom: 0.75rem; }
a { color: var(--mps-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header / Navbar ---- */
.mps-header {
  background: linear-gradient(135deg, var(--mps-blue-dark) 0%, var(--mps-blue) 100%);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mps-header .logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mps-header .logo-area img {
  height: 44px;
  width: auto;
  filter: brightness(1);
}

.mps-header .logo-text {
  color: white;
  line-height: 1.2;
}

.mps-header .logo-text .system-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.mps-header .logo-text .org-name {
  font-size: 0.75rem;
  opacity: 0.85;
}

.mps-header .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mps-header .user-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 24px;
  padding: 6px 14px;
  color: white;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mps-header .user-badge i { font-size: 1rem; }

.btn-logout {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-logout:hover { background: rgba(255,255,255,0.28); }

/* ---- Sidebar Navigation ---- */
.app-layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

.sidebar {
  width: 260px;
  background: var(--mps-blue-dark);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding-top: 1rem;
  transition: width 0.3s;
  overflow-y: auto;
}

.sidebar .nav-section-title {
  color: rgba(255,255,255,0.45);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.75rem 1.25rem 0.25rem;
  font-weight: 600;
}

.sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 1.25rem;
  color: rgba(255,255,255,0.78);
  font-size: 0.9rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar .nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  text-decoration: none;
}

.sidebar .nav-item.active {
  background: rgba(255,255,255,0.12);
  color: white;
  border-left-color: #4fc3f7;
  font-weight: 600;
}

.sidebar .nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar .nav-badge {
  margin-left: auto;
  background: var(--mps-red);
  color: white;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  max-width: 100%;
}

/* ---- Page Header ---- */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h2 {
  color: var(--mps-blue-dark);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header p {
  color: var(--mps-gray);
  font-size: 0.88rem;
  margin-bottom: 0;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--mps-gray);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb a { color: var(--mps-blue); }
.breadcrumb i { font-size: 0.7rem; }

/* ---- Cards ---- */
.card {
  background: white;
  border-radius: var(--mps-radius);
  box-shadow: var(--mps-shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(0,53,128,0.06);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--mps-gray-border);
}

.card-header h3 {
  font-size: 1rem;
  color: var(--mps-blue-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Stat Cards (Dashboard) ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: white;
  border-radius: var(--mps-radius);
  padding: 1.25rem;
  box-shadow: var(--mps-shadow);
  border-left: 4px solid var(--mps-blue);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--mps-shadow-lg);
  text-decoration: none;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--mps-gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--mps-blue-dark);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-card .stat-sub {
  font-size: 0.78rem;
  color: var(--mps-gray);
}

.stat-card.blue { border-left-color: var(--mps-blue); }
.stat-card.green { border-left-color: var(--mps-green-light); }
.stat-card.red { border-left-color: var(--mps-red); }
.stat-card.yellow { border-left-color: var(--mps-yellow); }
.stat-card.orange { border-left-color: var(--mps-orange); }
.stat-card.purple { border-left-color: #8e44ad; }
.stat-card.teal { border-left-color: #16a085; }

.stat-card.blue .stat-value { color: var(--mps-blue); }
.stat-card.green .stat-value { color: var(--mps-green-light); }
.stat-card.red .stat-value { color: var(--mps-red); }
.stat-card.yellow .stat-value { color: var(--mps-yellow); }
.stat-card.orange .stat-value { color: var(--mps-orange); }
.stat-card.purple .stat-value { color: #8e44ad; }
.stat-card.teal .stat-value { color: #16a085; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--mps-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--mps-blue); color: white; }
.btn-primary:hover { background: var(--mps-blue-dark); color: white; }

.btn-success { background: var(--mps-green-light); color: white; }
.btn-success:hover { background: var(--mps-green); color: white; }

.btn-danger { background: var(--mps-red); color: white; }
.btn-danger:hover { background: #a93226; color: white; }

.btn-warning { background: var(--mps-yellow); color: white; }
.btn-warning:hover { background: #d68910; color: white; }

.btn-secondary { background: var(--mps-gray); color: white; }
.btn-secondary:hover { background: #5a6268; color: white; }

.btn-outline { background: transparent; border: 2px solid var(--mps-blue); color: var(--mps-blue); }
.btn-outline:hover { background: var(--mps-blue); color: white; }

.btn-outline-success { background: transparent; border: 2px solid var(--mps-green-light); color: var(--mps-green-light); }
.btn-outline-success:hover { background: var(--mps-green-light); color: white; }

.btn-outline-danger { background: transparent; border: 2px solid var(--mps-red); color: var(--mps-red); }
.btn-outline-danger:hover { background: var(--mps-red); color: white; }

.btn-sm { padding: 5px 11px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-xl { padding: 16px 36px; font-size: 1.1rem; border-radius: var(--mps-radius); }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ---- Forms ---- */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.4rem;
}

.form-label .required { color: var(--mps-red); margin-left: 3px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--mps-gray-border);
  border-radius: var(--mps-radius-sm);
  font-size: 0.92rem;
  color: #1a1a2e;
  background: white;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--mps-blue);
  box-shadow: 0 0 0 3px rgba(0,53,128,0.1);
}

.form-control:disabled, .form-control[readonly] {
  background: #f8f9fa;
  color: var(--mps-gray);
}

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 0.78rem;
  color: var(--mps-gray);
  margin-top: 0.3rem;
}

.form-error {
  font-size: 0.78rem;
  color: var(--mps-red);
  margin-top: 0.3rem;
  display: none;
}

.form-control.is-invalid { border-color: var(--mps-red); }
.form-control.is-invalid + .form-error { display: block; }

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

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---- Checkbox / Radio ---- */
.checkbox-group, .radio-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: var(--mps-radius-sm);
  border: 1.5px solid var(--mps-gray-border);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 0.75rem;
}

.checkbox-group:hover, .radio-group:hover {
  border-color: var(--mps-blue);
  background: rgba(0,53,128,0.04);
}

.checkbox-group input, .radio-group input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
  accent-color: var(--mps-blue);
}

.checkbox-group label, .radio-group label {
  font-size: 0.88rem;
  cursor: pointer;
  color: #2c3e50;
  line-height: 1.5;
}

/* ---- Tables ---- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--mps-radius-sm);
  box-shadow: var(--mps-shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.86rem;
}

.data-table thead th {
  background: var(--mps-blue-dark);
  color: white;
  padding: 11px 14px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.data-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: var(--transition);
}

.data-table tbody tr:hover { background: rgba(0,53,128,0.03); }

.data-table tbody td {
  padding: 10px 14px;
  vertical-align: middle;
}

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

/* ---- Status Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-blue { background: #e3f0ff; color: var(--mps-blue); }
.badge-green { background: #e8f8ee; color: var(--mps-green); }
.badge-red { background: #fdecea; color: var(--mps-red); }
.badge-yellow { background: #fef9e7; color: #b7770d; }
.badge-orange { background: #fef0e6; color: var(--mps-orange); }
.badge-gray { background: #f0f0f0; color: var(--mps-gray); }
.badge-purple { background: #f3e8fd; color: #8e44ad; }
.badge-teal { background: #e8f8f5; color: #16a085; }

/* ---- Alerts ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--mps-radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert i { flex-shrink: 0; margin-top: 2px; }
.alert-info { background: #e3f2fd; border-color: #2196f3; color: #0d47a1; }
.alert-success { background: #e8f8ee; border-color: var(--mps-green-light); color: var(--mps-green); }
.alert-warning { background: #fef9e7; border-color: var(--mps-yellow); color: #856404; }
.alert-danger { background: #fdecea; border-color: var(--mps-red); color: #721c24; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: white;
  border-radius: var(--mps-radius);
  box-shadow: var(--mps-shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.2s;
}

.modal-overlay.active .modal-box { transform: translateY(0); }

.modal-box.modal-lg { max-width: 860px; }
.modal-box.modal-sm { max-width: 420px; }

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--mps-gray-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--mps-blue-dark), var(--mps-blue));
  border-radius: var(--mps-radius) var(--mps-radius) 0 0;
  color: white;
}

.modal-header h3 { font-size: 1rem; color: white; display: flex; align-items: center; gap: 8px; }

.modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.modal-close:hover { background: rgba(255,255,255,0.35); }

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--mps-gray-border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ---- Loading Spinner ---- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-blue {
  border: 2.5px solid rgba(0,53,128,0.2);
  border-top-color: var(--mps-blue);
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.85);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  display: none;
}

.loading-overlay.active { display: flex; }

.loading-overlay .loading-text {
  color: var(--mps-blue);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  margin-top: 1rem;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  border: 1.5px solid var(--mps-gray-border);
  background: white;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mps-blue);
  font-weight: 600;
}

.page-btn:hover { background: var(--mps-blue); color: white; border-color: var(--mps-blue); }
.page-btn.active { background: var(--mps-blue); color: white; border-color: var(--mps-blue); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- Search / Filter Bar ---- */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem;
  background: white;
  border-radius: var(--mps-radius-sm);
  box-shadow: var(--mps-shadow);
}

.filter-bar .search-input {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.filter-bar .search-input input {
  padding-left: 38px;
}

.filter-bar .search-input i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mps-gray);
  font-size: 0.9rem;
}

/* ---- Upload Zone ---- */
.upload-zone {
  border: 2px dashed var(--mps-gray-border);
  border-radius: var(--mps-radius-sm);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #fafbfc;
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--mps-blue);
  background: rgba(0,53,128,0.04);
}

.upload-zone i {
  font-size: 2.5rem;
  color: var(--mps-blue);
  margin-bottom: 0.75rem;
  display: block;
}

.upload-zone .upload-text {
  font-size: 0.9rem;
  color: var(--mps-gray);
}

.upload-zone .upload-hint {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 0.25rem;
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #e8f8ee;
  border-radius: var(--mps-radius-sm);
  border: 1px solid var(--mps-green-light);
  margin-top: 0.5rem;
}

.upload-preview i { color: var(--mps-green-light); }
.upload-preview .file-name { font-size: 0.85rem; color: #2c3e50; flex: 1; }
.upload-preview .remove-file { color: var(--mps-red); cursor: pointer; font-size: 1rem; }

/* ---- Tab Navigation ---- */
.tab-nav {
  display: flex;
  gap: 0;
  background: white;
  border-radius: var(--mps-radius-sm);
  box-shadow: var(--mps-shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
  overflow-x: auto;
}

.tab-btn {
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mps-gray);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
}

.tab-btn:hover { color: var(--mps-blue); background: rgba(0,53,128,0.04); }
.tab-btn.active { color: var(--mps-blue); border-bottom-color: var(--mps-blue); background: rgba(0,53,128,0.05); }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--mps-gray);
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; display: block; }
.empty-state h4 { font-size: 1rem; margin-bottom: 0.5rem; color: #555; }
.empty-state p { font-size: 0.88rem; }

/* ---- Notification Toast ---- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: white;
  border-radius: var(--mps-radius-sm);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 380px;
  border-left: 4px solid;
  pointer-events: all;
  animation: slideInRight 0.3s ease;
}

.toast.success { border-color: var(--mps-green-light); }
.toast.error { border-color: var(--mps-red); }
.toast.warning { border-color: var(--mps-yellow); }
.toast.info { border-color: var(--mps-blue); }

.toast i { font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }
.toast.success i { color: var(--mps-green-light); }
.toast.error i { color: var(--mps-red); }
.toast.warning i { color: var(--mps-yellow); }
.toast.info i { color: var(--mps-blue); }

.toast .toast-title { font-size: 0.88rem; font-weight: 700; color: #1a1a2e; }
.toast .toast-msg { font-size: 0.82rem; color: var(--mps-gray); margin-top: 2px; }

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---- Dividers ---- */
.section-divider {
  border: none;
  border-top: 1px solid var(--mps-gray-border);
  margin: 1.25rem 0;
}

/* ---- Map Container ---- */
.map-container {
  height: 300px;
  border-radius: var(--mps-radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--mps-gray-border);
}

.map-container-lg { height: 450px; }
.map-container-sm { height: 200px; }

/* ---- Chart Container ---- */
.chart-container {
  position: relative;
  height: 300px;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c0c8d8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--mps-blue); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 1rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .mps-header .logo-text .org-name { display: none; }
  .modal-box { max-height: 95vh; }
  .filter-bar { flex-direction: column; }
  .filter-bar .search-input { width: 100%; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-card .stat-value { font-size: 1.5rem; }
  .btn { font-size: 0.82rem; padding: 8px 14px; }
}

/* ---- Print ---- */
@media print {
  .sidebar, .mps-header, .btn-logout, .no-print { display: none !important; }
  .main-content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--mps-gray); }
.text-blue { color: var(--mps-blue); }
.text-green { color: var(--mps-green-light); }
.text-red { color: var(--mps-red); }
.text-yellow { color: var(--mps-yellow); }
.text-bold { font-weight: 700; }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-0 { padding: 0; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.visible { display: block !important; }
