/* ------------------------- */
/* Reset & Base Styles       */
/* ------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f0f4f8;
  color: #1f2933;
  line-height: 1.5;
}

/* ------------------------- */
/* App Shell (Grid Layout)   */
/* ------------------------- */
.app-shell {
  display: grid;
  grid-template-areas:
    "header header"
    "nav    content"
    "footer footer";
  grid-template-rows: 48px 1fr 36px;
  grid-template-columns: 220px 1fr;
  height: 100vh;
  overflow: hidden;
}

.app-header {
  grid-area: header;
  background-color: #1e3a5f;
  color: white;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.app-header-logo {
  height: 25px;
  width: auto;
  margin-right: 10px;
}

.app-header-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Hamburger — hidden on desktop, shown via mobile media query */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px 12px 8px 4px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Nav backdrop — full-screen dim when drawer is open on mobile */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
}
.nav-backdrop--visible {
  display: block;
}

/* Table scroll wrapper — prevents wide tables from blowing out the layout */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ------------------------- */
/* User Menu (Header)        */
/* ------------------------- */
.user-menu {
  position: relative;
  margin-left: auto;
}

.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: white;
  padding: 4px 10px 4px 6px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: background 0.15s;
}
.user-menu-trigger:hover { background: rgba(255,255,255,0.12); }

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.user-menu-email {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-chevron {
  display: inline-flex;
  opacity: 0.7;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 1000;
  padding: 4px 0;
}

.user-menu-item {
  display: block;
  width: 100%;
  padding: 9px 16px;
  text-align: left;
  background: none;
  border: none;
  font-size: 14px;
  font-family: inherit;
  color: #1f2933;
  cursor: pointer;
}
.user-menu-item:hover { background: #f1f5f9; }

.user-menu-separator {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

.app-nav {
  grid-area: nav;
  background-color: #f0f4f8;
  border-right: 1px solid #d2d6dc;
  padding: 16px 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.nav-link {
  display: block;
  padding: 10px 20px;
  color: #1f2933;
  text-decoration: none;
  font-size: 14px;
}

.nav-link:hover {
  background-color: #dce6f0;
}

.nav-link--active {
  background-color: #d0e3f5;
  font-weight: 600;
  border-left: 3px solid #1e3a5f;
}

.app-content {
  grid-area: content;
  padding: 24px;
  overflow-y: auto;
  background-color: white;
}

.app-footer {
  grid-area: footer;
  background-color: #f0f4f8;
  border-top: 1px solid #d2d6dc;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 12px;
  color: #6b7280;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ------------------------- */
/* Form Layout               */
/* ------------------------- */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px; /* space between columns */
  margin-bottom: 16px;
}

/* Column widths based on 12-unit system, gap-aware */
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-11 { flex: 0 0 calc((11/12*100%) - 11px); max-width: calc((11/12*100%) - 11px); }
.col-10 { flex: 0 0 calc((10/12*100%) - 10px); max-width: calc((10/12*100%) - 10px); }
.col-9  { flex: 0 0 calc((9/12*100%) - 9px);  max-width: calc((9/12*100%) - 9px); }
.col-8  { flex: 0 0 calc((8/12*100%) - 8px);  max-width: calc((8/12*100%) - 8px); }
.col-7  { flex: 0 0 calc((7/12*100%) - 7px);  max-width: calc((7/12*100%) - 7px); }
.col-6  { flex: 0 0 calc(50% - 6px);          max-width: calc(50% - 6px); }
.col-5  { flex: 0 0 calc((5/12*100%) - 5px);  max-width: calc((5/12*100%) - 5px); }
.col-4  { flex: 0 0 calc(33.333% - 4px);      max-width: calc(33.333% - 4px); }
.col-3  { flex: 0 0 calc(25% - 3px);          max-width: calc(25% - 3px); }
.col-2  { flex: 0 0 calc((2/12*100%) - 2px);  max-width: calc((2/12*100%) - 2px); }
.col-1  { flex: 0 0 calc((1/12*100%) - 1px);  max-width: calc((1/12*100%) - 1px); }

/* Component wrapper ensures each component is full-width inside the column */
.component-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

/* Child elements take full column width */
.component-wrapper > * {
  width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .col-12, .col-11, .col-10, .col-9, .col-8, .col-7, .col-6,
  .col-5, .col-4, .col-3, .col-2, .col-1 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ------------------------- */
/* Form Group (Input + Label) */
/* ------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Label — small, uppercase, muted */
.form-group label:not(.bool-label) {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

/* Base control — text, date, number, select */
.form-group input:not([type="checkbox"]),
.form-group select {
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2933;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Textarea */
.form-group textarea {
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2933;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  width: 100%;
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus ring */
.form-group input:not([type="checkbox"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Placeholder */
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #9ca3af;
}

/* Number — hide browser spinners */
.form-group input[type="number"]::-webkit-inner-spin-button,
.form-group input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.form-group input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

/* Select — remove native appearance, add custom chevron */
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  padding-right: 36px;
  cursor: pointer;
}

/* Checkbox (bool) */
.form-group--bool {
  padding-top: 18px; /* align checkbox baseline with adjacent input controls */
}

.bool-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #1f2933;
  cursor: pointer;
  user-select: none;
}

.bool-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}

/* Required field indicator */
.required-indicator {
  color: #dc2626;
  font-weight: 700;
  margin-left: 1px;
}

/* Record timestamps footer */
.form-timestamps {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #9ca3af;
}

.form-timestamps strong {
  color: #6b7280;
  font-weight: 500;
}

/* Field error state */
.component-wrapper.field-error input,
.component-wrapper.field-error select,
.component-wrapper.field-error textarea {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.component-wrapper.field-error label {
  color: #e53e3e;
}

/* -------------------------  */
/* Form Ribbon (Command Bar)  */
/* -------------------------  */
.form-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin: -24px -24px 24px -24px; /* bleed to content edges */
  background-color: #f8fafc;
  border-bottom: 1px solid #d2d6dc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Button base */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: fit-content;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

/* Button variants */
.btn--primary {
  background-color: #2563eb;
  color: white;
}
.btn--primary:hover { background-color: #1d4ed8; }

.btn--danger {
  background-color: #dc2626;
  color: white;
}
.btn--danger:hover { background-color: #b91c1c; }

.btn--secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.btn--secondary:hover { background-color: #e5e7eb; }

.btn--success {
  background-color: #16a34a;
  color: white;
}
.btn--success:hover { background-color: #15803d; }

.btn--sm {
  padding: 4px 10px;
  font-size: 0.8rem;
  gap: 4px;
}

/* Related list */
.related-list { margin-top: 1rem; }
.related-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.related-list-title { margin: 0; font-size: 1rem; font-weight: 600; }
.related-list-error { color: #6b7280; font-style: italic; font-size: 0.9rem; }

/* Icon inside button */
.btn-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.btn-icon svg {
  width: 15px;
  height: 15px;
}

/* ------------------------- */
/* Toast Notification        */
/* ------------------------- */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background-color: #1e3a5f;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.toast-notification.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-notification[data-variant="error"] {
  background-color: #b91c1c;
}

/* ------------------------- */
/* List / Grid View          */
/* ------------------------- */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.list-header .page-title {
  margin-bottom: 0;
}

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

.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
}

.data-table th {
  font-weight: 600;
  background-color: #f0f4f8;
  color: #374151;
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
}

.data-table tbody tr.row-clickable {
  cursor: pointer;
}

.table-empty {
  text-align: center;
  color: #9ca3af;
  padding: 32px 0;
}

/* ------------------------- */
/* Page / Dashboard          */
/* ------------------------- */
.page-container {
  max-width: 960px;
}

.page-section {
  margin-bottom: 36px;
}

.page-section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 14px;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #1f2933;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.quick-link-card:hover {
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.quick-link-icon {
  font-size: 24px;
  line-height: 1;
}

.quick-link-label {
  font-size: 15px;
  font-weight: 600;
}

.quick-link-description {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* ------------------------- */
/* Page Loader (Spinner)     */
/* ------------------------- */
.page-loader {
  display: flex;
  justify-content: center;
  padding-top: 80px;
}

.page-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ------------------------- */
/* Error Boundary            */
/* ------------------------- */
.error-boundary {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}

.error-boundary-icon {
  font-size: 36px;
  color: #f59e0b;
}

.error-boundary-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2933;
}

.error-boundary-msg {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}

/* ------------------------- */
/* Pagination                */
/* ------------------------- */
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 4px;
}

.pagination-info {
  font-size: 13px;
  color: #6b7280;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ------------------------- */
/* Admin Dashboard           */
/* ------------------------- */
.admin-container {
  max-width: 900px;
}

.admin-page-header {
  margin-bottom: 16px;
}

/* Admin tabs */
.admin-tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
}

.admin-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.admin-tab-btn:hover { color: #1f2937; }

.admin-tab-btn--active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.admin-record-count {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #6b7280;
}

.admin-log-error {
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: 2px;
}

.admin-section {
  margin-bottom: 40px;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2933;
}

.admin-subheading {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 14px;
}

.admin-required {
  color: #dc2626;
}

.admin-new-user-form {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px 20px 16px;
  margin-bottom: 16px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
}

.admin-field input,
.admin-field select {
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  color: #1f2933;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  outline: none;
}

.admin-field input:focus,
.admin-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.admin-form-error {
  font-size: 13px;
  color: #dc2626;
  min-height: 18px;
  margin-bottom: 8px;
}

.admin-form-actions {
  display: flex;
  gap: 8px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-inline-select {
  height: 28px;
  padding: 0 6px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  outline: none;
  cursor: pointer;
}

.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}

.admin-badge--ok     { background: #dcfce7; color: #15803d; }
.admin-badge--warn   { background: #fef9c3; color: #92400e; }
.admin-badge--danger { background: #fee2e2; color: #b91c1c; }

/* --------------------------------- */
/* Inline Validation Messages        */
/* --------------------------------- */
.field-validation-msg {
  display: none;
  font-size: 12px;
  color: #dc2626;
  margin-top: 2px;
  line-height: 1.4;
}

.component-wrapper.field-error .field-validation-msg {
  display: block;
}

/* Validation summary banner at top of form */
.validation-summary {
  display: none;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #991b1b;
}

.validation-summary.validation-summary--visible {
  display: block;
}

.validation-summary ul {
  margin: 4px 0 0 16px;
}

/* --------------------------------- */
/* Button Loading State              */
/* --------------------------------- */
.btn-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-action.btn--loading {
  position: relative;
  cursor: wait;
  color: transparent !important;  /* hide label text */
  pointer-events: none;
}

.btn-action.btn--loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* secondary button: spinner uses a dark color */
.btn--secondary.btn--loading::after {
  border-color: rgba(55, 65, 81, 0.3);
  border-top-color: #374151;
}

/* --------------------------------- */
/* List Toolbar (Search + Export)    */
/* --------------------------------- */
.list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.list-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 340px;
}

.list-search-input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 34px;
  font-size: 13px;
  font-family: inherit;
  color: #1f2933;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 20 20' fill='%239ca3af'%3E%3Cpath fill-rule='evenodd' d='M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat 10px center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.list-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.list-search-input::placeholder { color: #9ca3af; }

/* --------------------------------- */
/* Sortable Column Headers           */
/* --------------------------------- */
.th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.th-sortable:hover { background-color: #e5edf7; }

/* sort-indicator is an inline span — sits naturally after the label text */
.sort-indicator {
  display: inline;
  margin-left: 4px;
  font-size: 13px;
  color: #9ca3af;
}

.th-sortable.th-sort-asc  .sort-indicator,
.th-sortable.th-sort-desc .sort-indicator { color: #1e3a5f; font-weight: 700; }

/* ======================================= */
/* Mobile / Tablet  (≤ 768px)             */
/* ======================================= */
@media (max-width: 768px) {

  /* Shell — drop the left nav column, go single-column */
  .app-shell {
    grid-template-areas: "header" "content" "footer";
    grid-template-columns: 1fr;
    grid-template-rows: 48px 1fr 36px;
  }

  /* Nav drawer — fixed, slides in from the left */
  .app-nav {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    z-index: 300;
    padding-top: 48px;
    transition: left 0.25s ease;
    box-shadow: none;
  }
  .app-nav.nav-open {
    left: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.18);
  }

  /* Hamburger visible on mobile */
  .nav-hamburger { display: flex; }

  /* Email label in header trigger too wide on 390px */
  .user-menu-email { display: none; }

  /* Tighter content padding */
  .app-content { padding: 16px; }

  /* Touch-friendly minimum tap sizes (Apple/Google HIG: 44px) */
  .btn-action { min-height: 44px; padding: 10px 16px; }
  .nav-link   { min-height: 44px; display: flex; align-items: center; }

  /* Form ribbon wraps when buttons overflow */
  .form-ribbon { flex-wrap: wrap; }

  /* List header stacks title + command bar vertically */
  .list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Data tables: enforce a minimum width so columns stay readable;
     the .table-scroll-wrap parent provides the horizontal scroll */
  .data-table { min-width: 560px; }

  /* Pagination centers and wraps on small screens */
  .pagination-bar { flex-wrap: wrap; justify-content: center; }

  /* Admin panel: full width on mobile */
  .admin-container { max-width: 100%; }
}

/* ======================================= */
/* Small phones  (≤ 480px)               */
/* ======================================= */
@media (max-width: 480px) {
  /* All form columns go full width on the smallest screens */
  .col-12, .col-11, .col-10, .col-9, .col-8, .col-7,
  .col-6, .col-5, .col-4, .col-3, .col-2, .col-1 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

