/* public/assets/css/base.css */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Core theme colors (4) */
  --theme-primary:      #006c67; /* main brand teal */
  --theme-red:          #a6273a; /* warm red */
  --theme-blue:         #285493; /* deep blue */
  --theme-teal-bright:  #00a68c; /* bright teal accent */

  /* Derived variables – map from these four */
  --color-primary: var(--theme-primary);
  --color-primary-soft: #e0f3f1; /* derived from primary */

  --color-accent-red:  var(--theme-red);
  --color-accent-blue: var(--theme-blue);
  --color-accent-teal: var(--theme-teal-bright);

  --color-success:       var(--theme-teal-bright);
  --color-success-soft:  #e1f7f1;

  --color-warning:       var(--theme-red);
  --color-warning-soft:  #fbe4e8;

  --color-info:          var(--theme-blue);
  --color-info-soft:     #e2ecf9;

  --color-danger:        var(--theme-red);

  /* Surfaces & text */
  --color-bg:       #f1f5f9;  /* App background */
  --color-surface:  #ffffff;  /* Cards, header, panels */
  --color-text-main:#0f172a;  /* Primary text */
  --color-muted:    #64748b;  /* Secondary text */
  --color-border:   #e2e8f0;  /* Neutral borders */

  /* Sidebar / shell neutrals (theme-tunable) */
  --color-sidebar-bg:     #353a40;  /* sidebar background */
  --color-sidebar-accent: var(--color-accent-teal);  /* sidebar title */
  --color-sidebar-active: var(--color-accent-blue);  /* active link */

  /* Header / submenu theming */
  --color-header-bg:          var(--color-surface);
  --color-header-top-bg:      var(--color-bg);
  --color-submenu-gradient-a: rgba(0, 108, 103, 0.04);
  --color-submenu-gradient-b: rgba(40, 84, 147, 0.04);

  /* Active main pill color (theme-specific) */
  --color-main-pill-active: var(--color-accent-red);

  /* Footer */
  --color-footer-bg: #f9fafb;

  /* Radii, shadows, font */
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 10px 15px rgba(15, 23, 42, 0.08);
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========= THEMES ========= */

/* Default theme – same as current */
body.theme-default {
  --theme-primary:      #006c67;
  --theme-red:          #a6273a;
  --theme-blue:         #285493;
  --theme-teal-bright:  #00a68c;

  --color-primary-soft: #e0f3f1;
  --color-success-soft: #e1f7f1;
  --color-warning-soft: #fbe4e8;
  --color-info-soft:    #e2ecf9;

  --color-bg:           #f1f5f9;
  --color-surface:      #ffffff;

  --color-sidebar-bg:     #353a40;
  --color-sidebar-accent: var(--color-accent-teal);
  --color-sidebar-active: var(--color-accent-blue);

  --color-header-bg:     var(--color-surface);
  --color-header-top-bg: var(--color-bg);

  --color-submenu-gradient-a: rgba(0, 108, 103, 0.04);
  --color-submenu-gradient-b: rgba(40, 84, 147, 0.04);

  --color-main-pill-active: var(--color-accent-red);

  --color-footer-bg: #f9fafb;
}

/* Teal Focus – more teal, slightly cooler neutrals */
body.theme-teal-focus {
  --theme-primary:      #008274;  /* a bit brighter teal */
  --theme-red:          #a6273a;
  --theme-blue:         #285493;
  --theme-teal-bright:  #00b89a;

  --color-primary-soft: #e0f5f3;
  --color-success-soft: #e0faf5;
  --color-warning-soft: #fbe4e8;
  --color-info-soft:    #e0ecf8;

  --color-bg:           #eff8f7;
  --color-surface:      #ffffff;

  --color-sidebar-bg:     #064e3b; /* slightly greener deep teal */
  --color-sidebar-accent: #a7f3d0; /* soft mint accent */
  --color-sidebar-active: var(--color-primary); /* teal */

  --color-header-bg:     var(--color-surface);
  --color-header-top-bg: var(--color-bg);

  --color-submenu-gradient-a: rgba(0, 130, 116, 0.06);
  --color-submenu-gradient-b: rgba(0, 184, 154, 0.04);

  --color-main-pill-active: var(--color-primary); /* teal pill */

  --color-footer-bg: #edf7f5;
}

/* Warm Headers – stronger blue primary, same teal as success */
body.theme-warm-headers {
  --theme-primary:      #285493;  /* use blue as primary for header/buttons */
  --theme-red:          #a6273a;
  --theme-blue:         #285493;
  --theme-teal-bright:  #00a68c;

  --color-primary-soft: #e2ecf9;
  --color-success-soft: #e1f7f1;
  --color-warning-soft: #fbe4e8;
  --color-info-soft:    #e2ecf9;

  --color-bg:           #f4f5fb;
  --color-surface:      #ffffff;

  --color-sidebar-bg:     #111827;          /* deep neutral for contrast */
  --color-sidebar-accent: var(--color-accent-red);  /* warm title accent */
  --color-sidebar-active: var(--color-primary);     /* blue pill */

  --color-header-bg:     var(--color-surface);
  --color-header-top-bg: #eef2ff;          /* slight indigo tint */

  --color-submenu-gradient-a: rgba(40, 84, 147, 0.06);
  --color-submenu-gradient-b: rgba(166, 39, 58, 0.04);

  --color-main-pill-active: var(--color-primary);   /* blue pill */

  --color-footer-bg: #eef2ff;
}

/* Base hidden utility */
.hidden {
  display: none !important;
}

/* App shell: sits to the right of the fixed sidebar */
.app-root {
  margin-left: 220px;             /* same as sidebar width */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
}

/* === HEADER === */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* Top row: container */
.app-header-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  min-height: 52px;
  background-color: var(--color-header-top-bg);
}

.app-header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header-right {
  flex: 0 0 auto;
}

.app-header-main-menu {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: flex-start;
}

.app-header-right {
  flex: 0 0 auto;
}

/* Button-style main menu items (pills) */
.app-header-main-item {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;

  font-size: 15px;
  font-weight: 600;
  color: #4b5563;

  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    transform 0.08s ease;
}

.app-header-main-label {
  font-size: 15px;
  font-weight: 600;
}

/* Hover: light pill */
.app-header-main-item:hover {
  background-color: rgba(148, 163, 184, 0.16);
  color: var(--color-text-main);
  transform: translateY(-1px);
}

/* Active: solid pill (theme-aware) */
.app-header-main-item.active {
  background-color: var(--color-main-pill-active);
  color: #ffffff;
  transform: translateY(0);
}

/* Remove underline indicator completely */
.app-header-main-item::after {
  content: none;
}

/* Submenu bar */
.app-header-submenu {
  background: linear-gradient(
    135deg,
    var(--color-submenu-gradient-a),
    var(--color-submenu-gradient-b)
  );
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07) inset;
}

.app-header-submenu-group {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px 10px;
}

/* The active group just means we see that row of links */
.app-header-submenu-group.active {
  display: flex;
  gap: 14px;
}

/* Submenu items: small chips, calm but responsive */
.app-header-submenu-item {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.0);
  box-shadow: 0 1px 0px rgba(15, 23, 42, 0.00);
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.08s ease;
}

/* Hover: slightly brighter chip */
.app-header-submenu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* === BODY LAYOUT === */
.app-body {
  display: flex;
  min-height: calc(100vh - 120px);
}

/* Sidebar: fixed left, full height */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  background: var(--color-sidebar-bg);
  color: #e5e7eb;
  padding-top: 16px;
  padding-right: 14px;
  padding-bottom: 20px;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-shadow: 1px 0 4px rgba(15, 23, 42, 0.18);
  z-index: 40;
}

/* Sidebar title */
.app-sidebar-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  margin-top: 10px;
  color: var(--color-sidebar-accent);
  padding-left: 12px;
}

/* Sidebar nav list */
.app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  padding-left: 10px;
}

/* Links */
.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 5px;
  padding-bottom: 5px;
  padding-right: 5px;
  padding-left: 4px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: #e5e7eb;
  text-decoration: none;
  background: transparent;
  transition:
    background-color 0.12s ease,
    color 0.12s ease,
    transform 0.08s ease;
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

/* No bullet */
.app-sidebar-link::before {
  content: none;
}

/* Hover state */
.app-sidebar-link:hover {
  background-color: rgba(0, 0, 0, 0.18);
  color: #ffffff;
}

/* Active / current page */
.app-sidebar-link.active {
  background-color: var(--color-sidebar-active);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

/* Org identity at top of sidebar */
.app-sidebar-org {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-left: 12px;
}

.app-sidebar-org-logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--color-accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-sidebar-org-logo--initials {
  background: var(--color-accent-red);
  color: #e5e7eb;
  font-size: 15px;
  font-weight: 600;
}

.app-sidebar-org-logo span {
  display: inline-block;
  line-height: 1;
}

.app-sidebar-org-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-sidebar-org-name {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
}

/* Main content */
.app-main {
  flex: 1;
  min-width: 0;
  padding: 16px;
}

/* Footer */
.app-footer {
  background-color: var(--color-footer-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -1px 4px rgba(15, 23, 42, 0.04);
}

.app-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--color-muted);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  color: var(--color-text-main);
  background-color: var(--color-bg);
  height: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-size: 17px;
  line-height: 1.5;
}

/* Generic layout container, reusable */
.page-container {
  max-width: 1200px;
  margin-top: 0;
  padding: 0 10px 10px;
}

/* Generic card container, reusable */
.table-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* Page header, reusable */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.page-header-title {
  font-size: 22px;
  font-weight: 600;
  color: #020617;
  padding-right: 30px;
}

.page-header-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-muted);
  padding-right: 30px;
}

/* Toolbar row (like Add / Search / Bulk delete) */






.table-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc;
}

.table-toolbar .toolbar-left,
.table-toolbar .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px; /* keeps it organized */
}


/* Generic input for search */
.input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 108, 103, 0.15);
}

/* Modal overlay & popup */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 40;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 720px;
  padding: 16px 18px 18px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

/* Checkbox style (can be used anywhere) */
.checkbox {
  width: 16px;
  height: 16px;
}

/* Generic primary button, reusable */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Wider button for primary actions like "Add Organization" */
.btn-wide {
  min-width: 180px;
  justify-content: center;
  font-size: 15px;

  background-color: #ffffff;
  color: #111827;

  border-radius: 999px;
  border: 1px solid #d1d5db;
  border-color: var(--color-accent-teal);
  padding: 6px 18px;

  box-shadow: 0 0 0 0 transparent;
  transition:
    background-color 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.08s ease;
}

/* Optional hover state: very subtle */
.btn-wide:hover {
  background-color: #ffffff;
  border-color: var(--color-accent-red);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transform: translateY(-0.5px);
}

/* Primary uses theme primary */
.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 5px 14px;
  box-shadow: var(--shadow-sm);
}

/* Secondary using theme blue */
.btn-secondary {
  background-color: var(--color-accent-blue);
  color: #ffffff;
  padding: 5px 14px;
}

.btn-secondary:hover {
  background-color: #1f4474;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 14px;
  min-width: 70px;
}

/* Medium button (for Quick Add) */
.btn-md {
  font-size: 15px;
  padding: 6px 14px;
  min-width: 100px;
}

/* Icon inside button */
.btn-icon {
  margin-right: 4px;
  font-size: 16px;
  line-height: 0;
}

.org-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.org-actions .btn {
  display: inline-flex;
  padding: 6px 12px;
  min-width: 48px;
}

/* Generic form styles, reusable */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.form-field {
  flex: 1 1 220px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 4px;
}

.form-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 108, 103, 0.15);
}

.form-error {
  margin-top: 3px;
  font-size: 11px;
  color: var(--color-danger);
}

/* Generic alert styles, reusable */
.alert {
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.alert-error {
  background-color: var(--color-warning-soft);
  color: var(--color-warning);
  border: 1px solid #f4c2cb;
}

.alert-success {
  background-color: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid #b6ead8;
}

/* Generic table styles, reusable */
.table-wrapper {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  padding-right:10px;
}

.table-scroll {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.table thead {
  background-color: #f8fafc;
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--color-border);
}

.table th {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
 /* text-transform: uppercase; */
  letter-spacing: 0.04em;
  color: var(--color-text-main);
}

.table tbody tr:hover {
  background-color: #f8fafc;
}

.table-cell-muted {
  color: var(--color-muted);
  font-size: 12px;
}

.table-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

/* Active uses success teal */
.table-status-active {
  background-color: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid #b6ead8;
}

/* Inactive uses soft blue */
.table-status-inactive {
  background-color: var(--color-info-soft);
  color: var(--color-accent-blue);
  border: 1px solid #c4d5f3;
}

.text-right {
  text-align: right;
}

/* Utility widths */
.w-100 {
  width: 100%;
}

/* Small helper for hiding/showing accordions */
.hidden {
  display: none;
}

/* ============================= */
/* HEADER MOBILE MENU OVERLAY */
/* ============================= */

.app-header-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

.app-header-mobile-menu-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: 30vw;
  max-width: 320px;
  min-width: 220px;
  height: 100%;
  background-color: #ffffff;
  box-shadow: -2px 0 10px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.18s ease-out;
  padding: 12px 14px;
  overflow-y: auto;
}

/* mobile menu header row inside panel */
.app-header-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.app-header-mobile-menu-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

/* Close button inside the panel */
.app-header-mobile-menu-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
  color: #0f172a;
}

.app-header-mobile-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

/* Open state */
body.header-menu-open .app-header-mobile-menu {
  pointer-events: auto;
  opacity: 1;
}

body.header-menu-open .app-header-mobile-menu-inner {
  transform: translateX(0);
}

body.header-menu-open .app-header-mobile-menu::before {
  opacity: 1;
}

/* Mobile header menu items */
.app-header-mobile-section + .app-header-mobile-section {
  margin-top: 10px;
}

.app-header-mobile-main {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-main);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.app-header-mobile-main:hover {
  background-color: rgba(148, 163, 184, 0.16);
}

.app-header-mobile-main.active {
  background-color: var(--color-main-pill-active, var(--color-primary));
  color: #ffffff;
}

.app-header-mobile-children {
  margin-left: 10px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.app-header-mobile-child {
  display: block;
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 999px;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.app-header-mobile-child:hover {
  background-color: rgba(148, 163, 184, 0.15);
}



/* Hamburger button – plain three lines */
.app-header-toggle {
  display: none;          /* shown only via media query */
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.app-header-toggle span {
  display: block;
  width: 30px;
  height: 4px;
  background-color: #f9fafb; /* light lines on dark mobile header */
  border-radius: 999px;
  margin: 3px 0;
}




/* X state when menu open */
body.header-menu-open .app-header-toggle span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

body.header-menu-open .app-header-toggle span:nth-child(2) {
  opacity: 0;
}

body.header-menu-open .app-header-toggle span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  
  
  
  
}

/* Desktop: no hamburger, no overlay */
@media (min-width: 769px) {
  .app-header-toggle {
    display: none;
  }

  .app-header-mobile-menu {
    display: none;
  }

  .app-header-main-menu {
    justify-content: flex-start;
  }
}

/* ============================= */
/* RESPONSIVE LAYOUT (TABLET/MOBILE) */
/* ============================= */

/* Base: tables always scroll horizontally if needed */
.table-scroll {
  overflow-x: auto;
}

/* ---------- Tablet (<= 1024px) ---------- */
@media (max-width: 1024px) {
  .app-root {
    margin-left: 0 !important;
  }

  .app-sidebar {
    width: 200px;
  }

  .page-container {
    max-width: 100%;
    padding: 0 8px 8px;
  }

  .toolbar {
    flex-wrap: wrap;
    min-width: 0;
  }

  .toolbar-left,
  .toolbar-right {
    flex-wrap: wrap;
  }

  
}


/* ---------- Mobile (<= 768px) ---------- */
@media (max-width: 768px) {
  .app-header {
    background-color: #064d3b;
  }

  .app-header-top {
    background-color: #064d3b;
    padding: 8px 12px;
  }

  .app-header-top-inner {
    gap: 8px;
  }

  /* put hamburger on the RIGHT */
  .app-header-left {
    display: none;
  }

  .app-header-right {
    display: flex;
    align-items: center;
  }

  /* use only the mobile overlay for navigation */
  .app-header-main-menu {
    display: none;
  }

  .app-header-submenu {
    display: none;
  }

  /* hide sidebar on mobile completely */
  .app-sidebar {
    display: none;
  }

  .app-root {
    margin-left: 0;
  }

  /* show hamburger */
  .app-header-toggle {
    display: inline-block;
  }

  /* existing mobile layout (keep as-is below) */
  .app-body {
    flex-direction: column;
  }

  .app-main {
    padding: 12px 10px;
  }

  .page-container {
    max-width: 100%;
    padding: 0 4px 8px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .page-header-title {
    font-size: 19px;
  }

  .page-header-subtitle {
    font-size: 12px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 0;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .toolbar-right {
    justify-content: flex-end;
  }

  
  }

  .input {
    width: 100%;
  }

  .table-wrapper {
    padding-right: 0;
    overflow-x: auto;
  }

  .table-scroll {
    overflow-x: visible;
  }

  .table {
    min-width: 600px;
  }
}
  




  
  .app-header-mobile-sections {
  border-top: 1px solid #e5e7eb;
}

/* main row for each section */
.app-header-mobile-main-row {
  width: 100%;
  padding: 10px 4px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.app-header-mobile-main-label {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

/* separator between main items */
.app-header-mobile-section {
  border-bottom: 1px solid #e5e7eb;
}

/* arrow icon (chevron inside small circle outline) */
.app-header-mobile-arrow {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 0px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.app-header-mobile-arrow::before {
  content: "";
  border-style: solid;
  border-width: 0 4px 4px 4px;
  border-color: transparent transparent #64748b transparent;
  transform: translateY(-1px);
}

/* rotate arrow when open */
.app-header-mobile-section.open .app-header-mobile-arrow::before {
  transform: rotate(180deg) translateY(1px);
}

/* children container: animated expand/collapse */
.app-header-mobile-children {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.18s ease-out;
}

/* child links with faint separators */
.app-header-mobile-child {
  display: block;
  padding: 8px 12px 8px 20px;
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: none;
  border-top: 1px solid #f1f5f9;
}

.app-header-mobile-child:hover {
  background-color: #f1f5f9;
}




  
  

  .app-body {
    flex-direction: column;
  }

  .app-main {
    padding: 12px 10px;
  }

  .page-container {
    max-width: 100%;
    padding: 0 4px 8px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .page-header-title {
    font-size: 19px;
  }

  .page-header-subtitle {
    font-size: 12px;
  }

  /* Toolbars stack nicely */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 0;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .toolbar-right {
    justify-content: flex-end;
  }

  

  .input {
    width: 100%;
  }

  /* Table: scroll within wrapper, not the whole page */
  .table-wrapper {
    padding-right: 0;
    overflow-x: auto;
  }

  .table-scroll {
    overflow-x: visible;
  }

  .table {
    min-width: 600px;
  }