/* ============================================================
   DASHBOARD.CSS — RoadSafe Traffic Planning
   Front-end management area and branded sign-in screen.
   Self-contained: defines its own tokens so it does not depend
   on the public site stylesheet loading first.
============================================================ */

:root {
  --navy:        #1B3A6B;
  --navy-deep:   #0F2447;
  --navy-800:    #16305A;
  --orange:      #E8892B;
  --orange-dark: #d97b22;
  --orange-warm: #FFF3E0;
  --grey-mid:    #4A4A4A;
  --grey-light:  #F5F7FA;
  --grey-border: #DDE2ED;
  --white:       #FFFFFF;
  --danger:      #bf3b2d;
  --danger-bg:   #fdecea;
  --success:     #1a7a4f;
  --success-bg:  #e8f6ef;

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --sidebar-w: 264px;
}

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

body.rstp-dash-body,
body.rstp-login-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--grey-mid);
  background: var(--grey-light);
  -webkit-font-smoothing: antialiased;
}

body.rstp-dash-body img,
body.rstp-login-body img { max-width: 100%; display: block; }

body.rstp-dash-body ul,
body.rstp-login-body ul { list-style: none; }

body.rstp-dash-body a,
body.rstp-login-body a { color: inherit; text-decoration: none; }

.rstp-dash-body :focus-visible,
.rstp-login-body :focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 3px;
}

.word-road { color: currentColor; }
.word-safe { color: var(--orange); }

/* ============================================================
   LOGIN SCREEN
============================================================ */
.login-screen {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: var(--navy);
  overflow: hidden;
}

.login-screen__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.login-screen__stripe {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,0.05) 0px,
    rgba(255,255,255,0.05) 2px,
    transparent 2px,
    transparent 26px
  );
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 14px;
  padding: 2.5rem 2.25rem 2rem;
  box-shadow: 0 30px 70px rgba(8, 20, 40, 0.45);
}

.login-card__brand { text-align: center; margin-bottom: 1.75rem; }

.login-card__logo {
  max-height: 56px;
  width: auto;
  margin: 0 auto 0.75rem;
}

.login-card__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.login-card__sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(74, 74, 74, 0.6);
}

.login-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  border-radius: 7px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.login-notice i { font-size: 1rem; flex-shrink: 0; margin-top: 0.1rem; }

.login-notice--error {
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  color: #8a2a1f;
}

.login-notice--success {
  background: var(--success-bg);
  border-left: 4px solid var(--success);
  color: #14603e;
}

.login-field { margin-bottom: 1.1rem; }

.login-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.login-input {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--grey-mid);
  background: var(--white);
  border: 1.5px solid var(--grey-border);
  border-radius: 7px;
  padding: 0.8rem 1rem;
  width: 100%;
  min-height: 50px;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.login-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.12);
}

.login-input-wrap { position: relative; }
.login-input-wrap .login-input { padding-right: 3rem; }

.login-reveal {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(74, 74, 74, 0.55);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s;
}

.login-reveal:hover { color: var(--navy); }

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
  font-size: 0.8125rem;
}

.login-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--grey-mid);
}

.login-check input { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }

.login-forgot {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-forgot:hover { color: var(--orange); }

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  background: var(--orange);
  color: var(--navy-deep);
  border: none;
  border-radius: 7px;
  padding: 0.95rem 2rem;
  min-height: 52px;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), transform 0.12s var(--ease-out);
}

.login-submit:hover {
  background: var(--orange-dark);
  box-shadow: 0 6px 22px rgba(232, 137, 43, 0.4);
}

.login-submit:active { transform: translateY(1px); }

.login-back {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8125rem;
}

.login-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(74, 74, 74, 0.7);
  transition: color 0.2s, gap 0.2s var(--ease-out);
}

.login-back a:hover { color: var(--navy); gap: 0.6rem; }

/* ============================================================
   DASHBOARD SHELL
============================================================ */
.dash {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100dvh;
}

/* ---------- Sidebar ---------- */
.dash__sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--navy-deep);
  display: flex;
  flex-direction: column;
  z-index: 60;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 2px,
    transparent 2px,
    transparent 26px
  );
}

.dash__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.35rem 1.35rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dash__logo { max-height: 38px; width: auto; }

.dash__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--white);
}

.dash__close {
  display: none;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 6px;
}

.dash__close:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }

.dash__nav { flex: 1; overflow-y: auto; padding: 1rem 0.85rem; }

.dash__nav-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.85rem;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.15rem;
  transition: background 0.18s var(--ease-out), color 0.18s var(--ease-out);
}

.dash__nav-link i { width: 18px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }

.dash__nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}

.dash__nav-link.is-active {
  background: var(--orange);
  color: var(--navy-deep);
  font-weight: 600;
}

.dash__badge {
  margin-left: auto;
  background: var(--orange);
  color: var(--navy-deep);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
}

.dash__nav-link.is-active .dash__badge {
  background: var(--navy-deep);
  color: var(--orange);
}

.dash__sidebar-foot {
  padding: 1rem 0.85rem 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dash__foot-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  transition: background 0.18s, color 0.18s;
}

.dash__foot-link i { width: 16px; text-align: center; }
.dash__foot-link:hover { color: var(--white); background: rgba(255, 255, 255, 0.07); }

.dash__overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 40, 0.55);
  z-index: 55;
  border: none;
}

/* ---------- Main column ---------- */
.dash__main {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash__topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--grey-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.75rem;
  min-height: 68px;
}

.dash__burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.dash__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

.dash__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy);
  letter-spacing: 0.01em;
  line-height: 1.1;
  flex: 1;
  min-width: 0;
}

.dash__user { text-align: right; line-height: 1.25; }
.dash__user-name { display: block; font-size: 0.875rem; font-weight: 600; color: var(--navy); }
.dash__user-role { display: block; font-size: 0.72rem; color: rgba(74, 74, 74, 0.6); letter-spacing: 0.04em; }

.dash__content {
  padding: 1.75rem;
  max-width: 1080px;
  width: 100%;
}

/* ============================================================
   NOTICES
============================================================ */
.dash-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 8px;
  padding: 0.95rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.dash-notice i { font-size: 1.05rem; flex-shrink: 0; margin-top: 0.1rem; }

.dash-notice--success {
  background: var(--success-bg);
  border-left: 4px solid var(--success);
  color: #14603e;
}

.dash-notice--error {
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  color: #8a2a1f;
}

/* ============================================================
   OVERVIEW
============================================================ */
.dash-hello { margin-bottom: 1.75rem; }

.dash-hello__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--navy);
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.dash-hello__sub { font-size: 0.9375rem; color: var(--grey-mid); }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.dash-stat {
  background: var(--white);
  border: 1.5px solid var(--grey-border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-stat__icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.dash-stat__icon--orange { background: var(--orange-warm); color: var(--orange); }
.dash-stat__icon--navy   { background: #e7edf8; color: var(--navy); }
.dash-stat__icon--teal   { background: #e2f2ef; color: #1a7a6e; }

.dash-stat__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1;
  color: var(--navy);
  letter-spacing: 0.01em;
}

.dash-stat__label {
  display: block;
  font-size: 0.78rem;
  color: rgba(74, 74, 74, 0.72);
  margin-top: 0.2rem;
}

/* ============================================================
   PANELS
============================================================ */
.dash-panel {
  background: var(--white);
  border: 1.5px solid var(--grey-border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.dash-panel__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.dash-panel__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
  letter-spacing: 0.01em;
  flex: 1;
  min-width: 0;
}

.dash-panel__note {
  font-size: 0.875rem;
  color: rgba(74, 74, 74, 0.75);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.dash-subhead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 1.5rem 0 0.6rem;
}

.dash-empty {
  font-size: 0.9375rem;
  color: rgba(74, 74, 74, 0.65);
  padding: 1rem 0;
}

.dash-back { margin-bottom: 1rem; font-size: 0.875rem; }

.dash-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--navy);
  font-weight: 600;
  transition: gap 0.2s var(--ease-out);
}

.dash-back a:hover { color: var(--orange); gap: 0.65rem; }

/* ============================================================
   BUTTONS + PILLS
============================================================ */
.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 7px;
  padding: 0.65rem 1.25rem;
  min-height: 44px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.12s var(--ease-out);
}

.dash-btn:active { transform: translateY(1px); }
.dash-btn i { font-size: 0.85em; }

.dash-btn--primary {
  background: var(--orange);
  color: var(--navy-deep);
  border-color: var(--orange);
}

.dash-btn--primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  box-shadow: 0 5px 18px rgba(232, 137, 43, 0.32);
}

.dash-btn--ghost {
  background: var(--white);
  color: var(--navy);
  border-color: var(--grey-border);
}

.dash-btn--ghost:hover { border-color: var(--navy); background: var(--grey-light); }

.dash-btn--danger {
  background: var(--white);
  color: var(--danger);
  border-color: rgba(191, 59, 45, 0.4);
}

.dash-btn--danger:hover { background: var(--danger); color: var(--white); border-color: var(--danger); }

.dash-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1.5px solid var(--grey-border);
  border-radius: 6px;
  color: var(--navy);
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.dash-icon-btn:hover { border-color: var(--navy); background: var(--grey-light); }
.dash-icon-btn--danger { color: var(--danger); }
.dash-icon-btn--danger:hover { background: var(--danger); border-color: var(--danger); color: var(--white); }

.dash-pill {
  display: inline-flex;
  align-items: center;
  background: var(--grey-light);
  color: var(--navy);
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.dash-pill--new { background: var(--orange); color: var(--navy-deep); }
.dash-pill--role { background: #e7edf8; color: var(--navy); }

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1.25rem;
}

.dash-inline-form { display: inline-block; }

.dash-save {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--grey-light) 55%, rgba(245, 247, 250, 0));
  padding: 1rem 0 1.25rem;
  margin-top: -0.5rem;
  z-index: 20;
}

/* ============================================================
   FORM FIELDS
============================================================ */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}

.dash-grid--3 { grid-template-columns: repeat(3, 1fr); }

.dash-field { margin-bottom: 1.1rem; }
.dash-grid .dash-field { margin-bottom: 0; }

.dash-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.dash-field input[type="text"],
.dash-field input[type="email"],
.dash-field input[type="url"],
.dash-field input[type="tel"],
.dash-field input[type="password"],
.dash-field input[type="search"],
.dash-field input[type="file"],
.dash-field select,
.dash-field textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--grey-mid);
  background: var(--white);
  border: 1.5px solid var(--grey-border);
  border-radius: 7px;
  padding: 0.7rem 0.9rem;
  width: 100%;
  min-height: 46px;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  font-weight: 400;
}

.dash-field label input,
.dash-field label select,
.dash-field label textarea { margin-top: 0.35rem; }

.dash-field textarea { resize: vertical; line-height: 1.6; min-height: 84px; }

.dash-field input:focus,
.dash-field select:focus,
.dash-field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.12);
}

.dash-field input:disabled,
.dash-field select:disabled {
  background: var(--grey-light);
  color: rgba(74, 74, 74, 0.6);
  cursor: not-allowed;
}

.dash-field input[type="file"] { padding: 0.55rem 0.9rem; cursor: pointer; }

.dash-hint {
  font-size: 0.78rem;
  color: rgba(74, 74, 74, 0.62);
  margin-top: 0.3rem;
  line-height: 1.5;
  font-weight: 400;
}

.dash-upload-form { margin-top: 1.25rem; }

.dash-logo-preview,
.dash-image-preview {
  background: var(--grey-light);
  border: 1.5px dashed var(--grey-border);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.dash-logo-preview img { max-height: 64px; width: auto; }
.dash-image-preview img { max-height: 220px; width: auto; border-radius: 6px; }

/* ============================================================
   REPEATER ROWS
============================================================ */
.dash-repeater { margin-bottom: 1.25rem; }

.dash-row {
  border: 1.5px solid var(--grey-border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  background: var(--white);
  overflow: hidden;
}

.dash-row__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: var(--grey-light);
  border-bottom: 1px solid var(--grey-border);
}

.dash-row__handle { color: rgba(74, 74, 74, 0.35); font-size: 0.85rem; }

.dash-row__number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--orange);
  min-width: 24px;
}

.dash-row__title {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-row__tools { display: flex; gap: 0.35rem; flex-shrink: 0; }

.dash-row__body { padding: 1.1rem 0.9rem; }

/* ============================================================
   TOOLBAR + TABS
============================================================ */
.dash-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.dash-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.dash-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 7px;
  border: 1.5px solid var(--grey-border);
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.dash-tab:hover { border-color: var(--navy); }

.dash-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.dash-tab__count {
  background: rgba(27, 58, 107, 0.09);
  border-radius: 10px;
  padding: 0.05rem 0.45rem;
  font-size: 0.72rem;
}

.dash-tab.is-active .dash-tab__count { background: rgba(255, 255, 255, 0.2); }

.dash-toolbar__right { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }

.dash-search { display: flex; align-items: stretch; }

.dash-search input[type="search"] {
  font-family: var(--font-body);
  font-size: 0.875rem;
  border: 1.5px solid var(--grey-border);
  border-right: none;
  border-radius: 7px 0 0 7px;
  padding: 0.55rem 0.85rem;
  min-height: 44px;
  min-width: 200px;
  color: var(--grey-mid);
}

.dash-search input[type="search"]:focus {
  outline: none;
  border-color: var(--navy);
}

.dash-search button {
  background: var(--navy);
  color: var(--white);
  border: 1.5px solid var(--navy);
  border-radius: 0 7px 7px 0;
  padding: 0 1rem;
  min-height: 44px;
  cursor: pointer;
  transition: background 0.2s;
}

.dash-search button:hover { background: var(--navy-deep); }

.dash-bulk {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.dash-bulk select {
  font-family: var(--font-body);
  font-size: 0.875rem;
  border: 1.5px solid var(--grey-border);
  border-radius: 7px;
  padding: 0.55rem 0.85rem;
  min-height: 44px;
  background: var(--white);
  color: var(--grey-mid);
}

/* ============================================================
   TABLE
============================================================ */
.dash-table-wrap {
  background: var(--white);
  border: 1.5px solid var(--grey-border);
  border-radius: 10px;
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 720px;
}

.dash-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(74, 74, 74, 0.65);
  padding: 0.85rem 1rem;
  border-bottom: 1.5px solid var(--grey-border);
  background: var(--grey-light);
  white-space: nowrap;
}

.dash-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--grey-border);
  vertical-align: middle;
}

.dash-table tr:last-child td { border-bottom: none; }
.dash-table tbody tr:hover { background: rgba(245, 247, 250, 0.7); }

.dash-table tr.is-unread { background: rgba(232, 137, 43, 0.045); }
.dash-table tr.is-unread .dash-table__name { font-weight: 700; }

.dash-table__check { width: 44px; }
.dash-table__check input { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }

.dash-table__name {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-right: 0.4rem;
}

.dash-table__name:hover { color: var(--orange); }

.dash-table__contact { line-height: 1.35; }
.dash-table__contact a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.dash-table__contact a:hover { color: var(--orange); }
.dash-table__contact span { display: block; font-size: 0.8125rem; color: rgba(74, 74, 74, 0.7); }

.dash-pagination { display: flex; gap: 0.35rem; margin-top: 1.25rem; flex-wrap: wrap; }

.dash-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border: 1.5px solid var(--grey-border);
  border-radius: 6px;
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
}

.dash-page:hover { border-color: var(--navy); }
.dash-page.is-active { background: var(--orange); border-color: var(--orange); color: var(--navy-deep); }

/* ============================================================
   ENQUIRY DETAIL
============================================================ */
.dash-detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
  margin-bottom: 0.5rem;
}

.dash-detail dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(74, 74, 74, 0.6);
  margin-bottom: 0.2rem;
}

.dash-detail dd { font-size: 0.9375rem; color: var(--navy); font-weight: 500; }
.dash-detail dd a { text-decoration: underline; text-underline-offset: 2px; }
.dash-detail dd a:hover { color: var(--orange); }

.dash-message {
  background: var(--grey-light);
  border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.dash-message p + p { margin-top: 0.8rem; }

/* ============================================================
   RECENT LIST + QUICK ACTIONS
============================================================ */
.dash-recent { border-top: 1px solid var(--grey-border); }

.dash-recent__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--grey-border);
}

.dash-recent__item:last-child { border-bottom: none; }

.dash-recent__who strong { display: block; font-size: 0.9375rem; color: var(--navy); font-weight: 600; }
.dash-recent__who span { display: block; font-size: 0.8125rem; color: rgba(74, 74, 74, 0.7); }

.dash-recent__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  color: rgba(74, 74, 74, 0.65);
  flex-shrink: 0;
}

.dash-recent__item.is-unread .dash-recent__who strong { font-weight: 700; }

.dash-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
}

.dash-quick__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.1rem;
  border: 1.5px solid var(--grey-border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.dash-quick__item i { color: var(--orange); font-size: 1rem; }

.dash-quick__item:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 58, 107, 0.08);
}

/* ============================================================
   STAFF LIST
============================================================ */
.dash-staff {
  border: 1.5px solid var(--grey-border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  background: var(--white);
  overflow: hidden;
}

.dash-staff__summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  list-style: none;
  background: var(--grey-light);
}

.dash-staff__summary::-webkit-details-marker { display: none; }

.dash-staff__avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}

.dash-staff__who { flex: 1; min-width: 0; line-height: 1.3; }
.dash-staff__who strong { display: block; font-size: 0.9375rem; color: var(--navy); }
.dash-staff__who span { display: block; font-size: 0.8125rem; color: rgba(74, 74, 74, 0.7); overflow: hidden; text-overflow: ellipsis; }

.dash-staff__chev { color: rgba(74, 74, 74, 0.4); font-size: 0.8rem; transition: transform 0.2s var(--ease-out); }
.dash-staff[open] .dash-staff__chev { transform: rotate(180deg); }

.dash-staff__body { padding: 1.25rem 1rem; }
.dash-staff__delete { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--grey-border); display: block; }

/* ============================================================
   ACCESSIBILITY HELPERS
============================================================ */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  top: -200%;
  left: 1rem;
  background: var(--orange);
  color: var(--navy-deep);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0 0 6px 6px;
  z-index: 9999;
}

.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  .rstp-dash-body *,
  .rstp-login-body * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1100px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }

  .dash__sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
    box-shadow: 0 0 40px rgba(8, 20, 40, 0.3);
  }

  .dash__sidebar.is-open { transform: translateX(0); }
  .dash__close { display: flex; align-items: center; justify-content: center; }
  .dash__main { grid-column: 1; }
  .dash__burger { display: flex; }
  .dash__content { padding: 1.25rem; }
  .dash__topbar { padding: 0 1.25rem; }

  .dash-grid,
  .dash-grid--3 { grid-template-columns: 1fr; }

  .dash-detail { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash__user { display: none; }
  .dash__title { font-size: 1.25rem; }

  .dash-toolbar { flex-direction: column; align-items: stretch; }
  .dash-toolbar__right { flex-direction: column; align-items: stretch; }
  .dash-search { width: 100%; }
  .dash-search input[type="search"] { flex: 1; min-width: 0; }

  .dash-actions { flex-direction: column; align-items: stretch; }
  .dash-actions .dash-btn,
  .dash-inline-form,
  .dash-inline-form .dash-btn { width: 100%; }

  .login-card { padding: 2rem 1.5rem 1.75rem; }
}
