/* ═══════════════════════════════════════════════════════════════
   MediWebb Mobile-First Design System
   Imported by all templates via base.html and dashboards
   ═══════════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --mw-primary:       #1A237E;
  --mw-primary-dk:    #0D1642;
  --mw-primary-lt:    #283593;
  --mw-accent:        #FFD600;
  --mw-accent-dk:     #FFC400;
  --mw-pink:          #E91E63;
  --mw-pink-dk:       #C2185B;
  --mw-success:       #4CAF50;
  --mw-warning:       #FF9800;
  --mw-danger:        #F44336;
  --mw-info:          #2196F3;

  --mw-bg:            #F4F6FB;
  --mw-surface:       #FFFFFF;
  --mw-border:        rgba(0,0,0,0.08);
  --mw-text-primary:  #1a1a2e;
  --mw-text-secondary:#555e75;
  --mw-text-muted:    #8891a4;

  --mw-radius-sm:     8px;
  --mw-radius-md:     12px;
  --mw-radius-lg:     18px;
  --mw-radius-xl:     24px;

  --mw-shadow-sm:     0 2px 8px rgba(0,0,0,0.06);
  --mw-shadow-md:     0 4px 16px rgba(0,0,0,0.10);
  --mw-shadow-lg:     0 8px 32px rgba(0,0,0,0.12);

  --mw-sidebar-w:     260px;
  --mw-header-h:      64px;
  --mw-nav-h:         60px;

  --safe-top:         env(safe-area-inset-top, 0px);
  --safe-bottom:      env(safe-area-inset-bottom, 0px);
  --safe-left:        env(safe-area-inset-left, 0px);
  --safe-right:       env(safe-area-inset-right, 0px);
}

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--mw-bg);
  color: var(--mw-text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; font-size: 16px; /* prevents iOS zoom */ }

/* ════════════════════════════════════════════════════════════
   PUBLIC HEADER (base.html — marketing / public pages)
   ════════════════════════════════════════════════════════════ */
.mw-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--mw-surface);
  box-shadow: 0 1px 0 var(--mw-border), var(--mw-shadow-sm);
  padding-top: var(--safe-top);
}
.mw-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--mw-header-h);
  padding: 0 20px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}
.mw-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--mw-primary);
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  text-decoration: none;
}
.mw-logo span { color: var(--mw-accent); }

/* Desktop nav links */
.mw-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.mw-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--mw-radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mw-text-secondary);
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.mw-nav a:hover, .mw-nav a.active { color: var(--mw-primary); background: rgba(26,35,126,.06); }
.mw-nav .mw-nav__btn {
  background: var(--mw-primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 50px;
}
.mw-nav .mw-nav__btn:hover { background: var(--mw-primary-lt); color: #fff; }

/* ── Hamburger button ──────────────────────────────────────── */
.mw-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--mw-radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  gap: 5px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s;
}
.mw-hamburger:hover { background: rgba(26,35,126,.06); }
.mw-hamburger__line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--mw-primary);
  border-radius: 2px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s, width .3s;
  transform-origin: center;
}
.mw-hamburger[aria-expanded="true"] .mw-hamburger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mw-hamburger[aria-expanded="true"] .mw-hamburger__line:nth-child(2) { opacity: 0; width: 0; }
.mw-hamburger[aria-expanded="true"] .mw-hamburger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile drawer ─────────────────────────────────────────── */
.mw-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}
.mw-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mw-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--mw-surface);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  box-shadow: var(--mw-shadow-lg);
}
.mw-drawer.is-open { pointer-events: all; }
.mw-drawer.is-open .mw-drawer__backdrop { opacity: 1; }
.mw-drawer.is-open .mw-drawer__panel { transform: translateX(0); }

.mw-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mw-border);
}
.mw-drawer__close {
  width: 36px; height: 36px;
  border-radius: var(--mw-radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--mw-text-secondary);
  font-size: 1.1rem;
  transition: background .2s;
}
.mw-drawer__close:hover { background: var(--mw-bg); }

.mw-drawer__links {
  list-style: none;
  padding: 12px 12px;
  flex: 1;
}
.mw-drawer__links li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--mw-radius-md);
  font-size: 1rem;
  font-weight: 500;
  color: var(--mw-text-primary);
  transition: background .15s, color .15s;
  min-height: 48px;
}
.mw-drawer__links li a:hover, .mw-drawer__links li a.active {
  background: rgba(26,35,126,.07);
  color: var(--mw-primary);
}
.mw-drawer__links li a i { width: 20px; text-align: center; color: var(--mw-text-muted); }
.mw-drawer__links li a:hover i, .mw-drawer__links li a.active i { color: var(--mw-primary); }
.mw-drawer__divider { height: 1px; background: var(--mw-border); margin: 8px 14px; }
.mw-drawer__foot {
  padding: 16px 20px;
  border-top: 1px solid var(--mw-border);
}
.mw-drawer__foot a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border-radius: var(--mw-radius-md);
  background: var(--mw-primary);
  color: #fff;
  font-weight: 600;
  min-height: 48px;
}

/* body scroll lock */
body.mw-noscroll { overflow: hidden; }

/* ════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT (sidebar + content)
   ════════════════════════════════════════════════════════════ */
.mw-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Dashboard sidebar ─────────────────────────────────────── */
.mw-sidebar {
  width: var(--mw-sidebar-w);
  min-height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 800;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
  padding-top: env(safe-area-inset-top, 0px);
}
.mw-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 22px 16px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
  text-decoration: none;
  min-height: 64px;
}
.mw-sidebar__logo span { color: var(--mw-accent); }
.mw-sidebar__subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: .65;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.mw-sidebar__nav {
  list-style: none;
  padding: 12px 10px;
  flex: 1;
}
.mw-sidebar__nav li { margin-bottom: 2px; }
.mw-sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--mw-radius-md);
  color: rgba(255,255,255,.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background .2s, color .2s;
  min-height: 44px;
  text-decoration: none;
}
.mw-sidebar__nav a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.mw-sidebar__nav a.active {
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 600;
}
.mw-sidebar__nav a i { width: 18px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }
.mw-sidebar__section-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.4);
  padding: 14px 14px 4px;
}
.mw-sidebar__footer {
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.mw-sidebar__footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--mw-radius-md);
  color: rgba(255,255,255,.7);
  font-size: 0.88rem;
  min-height: 44px;
  text-decoration: none;
  transition: background .2s;
}
.mw-sidebar__footer a:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── Dashboard top bar ─────────────────────────────────────── */
.mw-topbar {
  position: sticky;
  top: 0;
  z-index: 700;
  background: var(--mw-surface);
  border-bottom: 1px solid var(--mw-border);
  min-height: var(--mw-header-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
  padding-top: env(safe-area-inset-top, 0px);
  gap: 12px;
  box-shadow: var(--mw-shadow-sm);
}
.mw-topbar__toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--mw-radius-sm);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--mw-primary);
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
}
.mw-topbar__toggle:hover { background: var(--mw-bg); }
.mw-topbar__title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mw-text-primary);
}
.mw-topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mw-topbar__btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: var(--mw-radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--mw-text-secondary);
  font-size: 1rem;
  transition: background .2s, color .2s;
  text-decoration: none;
}
.mw-topbar__btn:hover { background: var(--mw-bg); color: var(--mw-primary); }
.mw-topbar__badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  background: var(--mw-danger);
  color: #fff;
  border-radius: 8px;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  display: none;
}
.mw-topbar__badge.visible { display: flex; }
.mw-topbar__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mw-primary), var(--mw-primary-lt));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
}

/* ── Dashboard main content area ───────────────────────────── */
.mw-content {
  margin-left: var(--mw-sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.mw-page {
  flex: 1;
  padding: 24px 20px;
  max-width: 1400px;
  width: 100%;
}

/* ── Sidebar overlay for mobile ────────────────────────────── */
.mw-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 799;
  opacity: 0;
  transition: opacity .3s;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mw-sidebar-overlay.visible { opacity: 1; }

/* ════════════════════════════════════════════════════════════
   SHARED COMPONENTS
   ════════════════════════════════════════════════════════════ */

/* Cards */
.mw-card {
  background: var(--mw-surface);
  border-radius: var(--mw-radius-lg);
  box-shadow: var(--mw-shadow-sm);
  border: 1px solid var(--mw-border);
  padding: 20px;
}
.mw-card--flat { box-shadow: none; }
.mw-card--accent { border-left: 4px solid var(--mw-primary); }

/* Stat cards */
.mw-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.mw-stat {
  background: var(--mw-surface);
  border-radius: var(--mw-radius-md);
  padding: 16px;
  box-shadow: var(--mw-shadow-sm);
  border: 1px solid var(--mw-border);
}
.mw-stat__value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--mw-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.mw-stat__label {
  font-size: 0.78rem;
  color: var(--mw-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mw-stat__icon {
  font-size: 1.3rem;
  margin-bottom: 10px;
  opacity: .7;
}

/* Buttons */
.mw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  border: none;
  min-height: 44px;
  white-space: nowrap;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.mw-btn--primary { background: var(--mw-primary); color: #fff; }
.mw-btn--primary:hover { background: var(--mw-primary-lt); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,35,126,.35); }
.mw-btn--accent { background: var(--mw-accent); color: var(--mw-primary); }
.mw-btn--accent:hover { background: var(--mw-accent-dk); }
.mw-btn--outline { background: transparent; border: 1.5px solid var(--mw-primary); color: var(--mw-primary); }
.mw-btn--outline:hover { background: var(--mw-primary); color: #fff; }
.mw-btn--ghost { background: transparent; color: var(--mw-text-secondary); }
.mw-btn--ghost:hover { background: var(--mw-bg); color: var(--mw-primary); }
.mw-btn--danger { background: var(--mw-danger); color: #fff; }
.mw-btn--sm { padding: 7px 16px; font-size: 0.82rem; min-height: 36px; }
.mw-btn--lg { padding: 14px 30px; font-size: 1rem; }
.mw-btn--full { width: 100%; }
.mw-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Form elements */
.mw-form-group { margin-bottom: 18px; }
.mw-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mw-text-secondary);
  margin-bottom: 7px;
}
.mw-input, .mw-select, .mw-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e0e4ef;
  border-radius: var(--mw-radius-md);
  font-size: 16px; /* prevents iOS zoom */
  color: var(--mw-text-primary);
  background: var(--mw-surface);
  transition: border .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
.mw-input:focus, .mw-select:focus, .mw-textarea:focus {
  outline: none;
  border-color: var(--mw-primary);
  box-shadow: 0 0 0 3px rgba(26,35,126,.12);
}
.mw-input::placeholder { color: var(--mw-text-muted); }
.mw-textarea { resize: vertical; min-height: 100px; }

/* Badges */
.mw-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mw-badge--success { background: #E8F5E9; color: #2E7D32; }
.mw-badge--warning { background: #FFF3E0; color: #E65100; }
.mw-badge--danger  { background: #FFEBEE; color: #C62828; }
.mw-badge--info    { background: #E3F2FD; color: #1565C0; }
.mw-badge--primary { background: rgba(26,35,126,.1); color: var(--mw-primary); }
.mw-badge--gray    { background: #F5F5F5; color: #555; }

/* Alert / flash messages */
.mw-flash-stack {
  position: fixed;
  top: calc(var(--mw-header-h) + 12px + var(--safe-top));
  right: 16px;
  left: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.mw-flash {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--mw-radius-md);
  box-shadow: var(--mw-shadow-md);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: all;
  animation: mwFlashIn .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes mwFlashIn { from { opacity:0; transform: translateY(-12px) scale(.96); } to { opacity:1; transform:none; } }
.mw-flash--success { background: #E8F5E9; color: #1B5E20; border-left: 4px solid var(--mw-success); }
.mw-flash--error   { background: #FFEBEE; color: #B71C1C; border-left: 4px solid var(--mw-danger); }
.mw-flash--warning { background: #FFF3E0; color: #E65100; border-left: 4px solid var(--mw-warning); }
.mw-flash--info    { background: #E3F2FD; color: #0D47A1; border-left: 4px solid var(--mw-info); }
.mw-flash__close {
  margin-left: auto;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  opacity: .6;
  cursor: pointer;
  flex-shrink: 0;
}
.mw-flash__close:hover { opacity: 1; }

/* Job cards */
.mw-job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.mw-job-card {
  background: var(--mw-surface);
  border-radius: var(--mw-radius-lg);
  padding: 18px;
  border: 1px solid var(--mw-border);
  box-shadow: var(--mw-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
  color: inherit;
}
.mw-job-card:hover { transform: translateY(-3px); box-shadow: var(--mw-shadow-md); }
.mw-job-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mw-job-card__title { font-size: 1rem; font-weight: 700; color: var(--mw-text-primary); line-height: 1.3; }
.mw-job-card__rate { font-size: 1rem; font-weight: 700; color: var(--mw-success); white-space: nowrap; }
.mw-job-card__meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.8rem; color: var(--mw-text-muted); }
.mw-job-card__meta span { display: flex; align-items: center; gap: 4px; }
.mw-job-card__footer { display: flex; gap: 8px; margin-top: auto; }

/* Page header */
.mw-page-header {
  margin-bottom: 24px;
}
.mw-page-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mw-text-primary);
  margin-bottom: 4px;
}
.mw-page-header__sub {
  font-size: 0.9rem;
  color: var(--mw-text-muted);
}

/* Section title */
.mw-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--mw-text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Table */
.mw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--mw-radius-md); border: 1px solid var(--mw-border); }
.mw-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.mw-table th {
  background: var(--mw-bg);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mw-text-muted);
  border-bottom: 1px solid var(--mw-border);
  white-space: nowrap;
}
.mw-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--mw-border);
  color: var(--mw-text-primary);
  vertical-align: middle;
}
.mw-table tr:last-child td { border-bottom: none; }
.mw-table tr:hover td { background: rgba(26,35,126,.025); }

/* Empty state */
.mw-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--mw-text-muted);
}
.mw-empty__icon { font-size: 3rem; margin-bottom: 16px; opacity: .6; }
.mw-empty__title { font-size: 1.1rem; font-weight: 600; color: var(--mw-text-secondary); margin-bottom: 8px; }
.mw-empty__text { font-size: 0.88rem; line-height: 1.5; max-width: 320px; margin: 0 auto 20px; }

/* Notification item */
.mw-notif {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--mw-radius-md);
  background: var(--mw-surface);
  border: 1px solid var(--mw-border);
  border-left: 4px solid #e0e4ef;
  transition: background .15s;
  cursor: pointer;
}
.mw-notif:hover { background: var(--mw-bg); }
.mw-notif--unread { background: rgba(26,35,126,.03); border-left-color: var(--mw-primary); }
.mw-notif__icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.mw-notif__body { flex: 1; min-width: 0; }
.mw-notif__title { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; color: var(--mw-text-primary); }
.mw-notif__msg { font-size: 0.82rem; color: var(--mw-text-muted); line-height: 1.35; }
.mw-notif__time { font-size: 0.72rem; color: var(--mw-text-muted); white-space: nowrap; flex-shrink: 0; margin-top: 2px; }

/* Quick-action grid */
.mw-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.mw-action-card {
  background: var(--mw-surface);
  border-radius: var(--mw-radius-lg);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  border: 1px solid var(--mw-border);
  box-shadow: var(--mw-shadow-sm);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  min-height: 100px;
}
.mw-action-card:hover { transform: translateY(-3px); box-shadow: var(--mw-shadow-md); }
.mw-action-card__icon { font-size: 1.6rem; }
.mw-action-card__label { font-size: 0.82rem; font-weight: 600; line-height: 1.2; color: var(--mw-text-secondary); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .mw-sidebar {
    transform: translateX(-100%);
    z-index: 850;
  }
  .mw-sidebar.is-open { transform: translateX(0); }
  .mw-sidebar-overlay { display: block; }
  .mw-content { margin-left: 0; }
  .mw-topbar__toggle { display: flex; }
}

@media (max-width: 768px) {
  :root { --mw-header-h: 56px; }
  .mw-page { padding: 16px; }
  .mw-job-grid { grid-template-columns: 1fr; }
  .mw-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .mw-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .mw-nav { display: none; }
  .mw-hamburger { display: flex; }
  .mw-page-header__title { font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .mw-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mw-actions-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mw-job-card { padding: 14px; }
  .mw-card { padding: 14px; }
  .mw-stat { padding: 12px; }
  .mw-stat__value { font-size: 1.5rem; }
  body { padding-bottom: calc(var(--mw-nav-h) + var(--safe-bottom)); }
}

/* ── Touch targets minimum 44px ────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .mw-btn, .mw-sidebar__nav a, .mw-drawer__links li a,
  .mw-topbar__btn, .mw-topbar__toggle, .mw-hamburger {
    min-height: 48px;
  }
}

/* ── Dark mode ─────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --mw-bg:            #0f1117;
    --mw-surface:       #1a1d2e;
    --mw-border:        rgba(255,255,255,0.08);
    --mw-text-primary:  #e8eaf0;
    --mw-text-secondary:#9ba3b8;
    --mw-text-muted:    #5c6480;
  }
  .mw-input, .mw-select, .mw-textarea {
    background: #1a1d2e;
    border-color: rgba(255,255,255,.1);
    color: #e8eaf0;
  }
  .mw-table th { background: #12151f; }
  .mw-badge--gray { background: #2a2d3e; color: #9ba3b8; }
}

/* ── Safe area for bottom nav in mobile app shell ──────────── */
.mw-content, .mw-page { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
@media (max-width: 768px) {
  .mw-content { padding-bottom: calc(var(--mw-nav-h) + env(safe-area-inset-bottom, 0px) + 8px); }
}

/* ════════════════════════════════════════════════════════════
   SIDEBAR COLOR THEMES
   ════════════════════════════════════════════════════════════ */

/* Nurse — deep pink/magenta */
.mw-sidebar.sidebar {
  background: linear-gradient(180deg, #1A237E 0%, #0D1642 100%);
}

/* Employer / locum — already default blue above */
.mw-sidebar--blue {
  background: linear-gradient(180deg, #1A237E 0%, #0D1642 100%);
}

/* Admin — very dark */
.mw-sidebar--dark {
  background: linear-gradient(180deg, #0D1117 0%, #161b22 100%);
}

/* Nurse-specific pink override when .nurse-theme is on sidebar */
.mw-sidebar.nurse-theme {
  background: linear-gradient(180deg, #880E4F 0%, #4A0E2B 100%);
}

/* ── Additional mobile topbar adjustments ────────────────────── */
.mw-topbar {
  background: var(--mw-surface);
  padding: 0 16px;
}

@media (max-width: 480px) {
  .mw-topbar__title { font-size: .88rem; }
  .mw-topbar { padding: 0 12px; }
}

/* ── Remove old conflicting overlay styles ───────────────────── */
.overlay { display: none !important; }

/* ── Pre-login pages: header safe area ───────────────────────────────── */
header,
.site-header,
.app-header {
  padding-top: env(safe-area-inset-top, 0px);
}

/* ── All fixed sidebars safe area ────────────────────────────────────── */
.sidebar,
#sidebar,
aside.sidebar,
.dashboard-sidebar {
  padding-top: env(safe-area-inset-top, 0px) !important;
}

/* ── Bottom safe area for all pages ─────────────────────────────────── */
body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}