/* =========================================================
   UNITAXI VIP — Admin panel
   Palette: Sapphire Blue (#0066cc) + Emerald Green (#00b37e)
   Gmail-style inbox on every device
   ========================================================= */

:root {
  --blue: #0066cc;
  --blue-bright: #0080ff;
  --blue-deep: #004c99;
  --blue-soft: #e6f0fa;
  --blue-glow: rgba(0, 102, 204, 0.25);

  --green: #00b37e;
  --green-bright: #00d494;
  --green-deep: #008a5e;
  --green-soft: #e6f7f1;
  --green-glow: rgba(0, 179, 126, 0.3);

  --amber: #a47720;
  --amber-soft: #f8edd1;
  --red: #b94d43;
  --red-soft: #f7e5e2;

  --ink: #0f172a;
  --muted: #64748b;
  --cream: #f6f9fc;
  --line: #d9e5f0;
  --line-soft: #eaf1f8;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 102, 204, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 102, 204, 0.15);

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --transition: 0.18s ease;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --bottom-nav-h: 64px;

  --gradient-brand: linear-gradient(135deg, #0066cc 0%, #00b37e 100%);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: contain;
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  font: inherit;
  cursor: pointer;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  background: var(--blue-deep);
  color: #fff;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  -webkit-overflow-scrolling: touch;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 100px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

.sidebar::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 179, 126, 0.35) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding: 0 6px;
  position: relative;
  z-index: 1;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
  flex-shrink: 0;
}

.admin-logo strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #fff;
}

.admin-logo small {
  display: block;
  margin-top: 2px;
  color: #a7d9c8;
  font-size: 9px;
  letter-spacing: 0.22em;
  font-weight: 700;
}

.sidebar nav {
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.sidebar nav a {
  padding: 11px 14px;
  border-radius: 9px;
  color: #c7dffb;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition:
    background var(--transition),
    color var(--transition);
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar nav a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  position: relative;
}

.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  background: var(--green-bright);
  border-radius: 0 3px 3px 0;
}

.sidebar nav a svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.9;
}

.sidebar nav a.active svg {
  color: var(--green-bright);
  opacity: 1;
}

.logout {
  margin-top: auto;
  padding: 12px 14px;
  color: #c7dffb;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 9px;
  transition:
    background var(--transition),
    color var(--transition);
  position: relative;
  z-index: 1;
}

.logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ---------- MAIN ---------- */
.admin-main {
  padding: 32px 36px 60px;
  max-width: 1500px;
  width: 100%;
  min-width: 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-header h1 {
  margin: 6px 0 0;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: var(--blue-deep);
  line-height: 1.1;
}

.eyebrow {
  color: var(--green-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-user {
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 15px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  color: var(--blue-deep);
  white-space: nowrap;
}

.admin-user::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 179, 126, 0.18);
  flex-shrink: 0;
}

/* =========================================================
   STATS (used on status.php)
   ========================================================= */
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--blue-deep);
  line-height: 1;
}

.stat-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--line);
}

.stat-card.pending::after {
  background: var(--amber);
}
.stat-card.confirmed::after {
  background: var(--blue);
}
.stat-card.completed::after {
  background: var(--green);
}
.stat-card.cancelled::after {
  background: var(--red);
}

/* =========================================================
   PANEL
   ========================================================= */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.inbox-panel {
  padding: 0;
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--blue-deep);
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-header p strong {
  color: var(--blue-deep);
}

/* =========================================================
   INBOX FILTERS — compact, 2-row
   ========================================================= */
.inbox-filters {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: #fafcff;
  align-items: center;
}

/* Search */
.filter-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.filter-search-icon {
  position: absolute;
  left: 14px;
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.filter-search input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 38px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.filter-search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.filter-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}

.filter-search-clear {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--line-soft);
  color: var(--muted);
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.filter-search-clear svg {
  width: 12px;
  height: 12px;
}

.filter-search-clear:hover {
  background: var(--red-soft);
  color: var(--red);
}

/* Sort */
.filter-sort {
  flex-shrink: 0;
}

.filter-sort select {
  height: 40px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--blue-deep);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23004c99' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 13px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.filter-sort select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

/* Status pills */
.filter-pills {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 100px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

.filter-pill:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
}

.filter-pill:active {
  transform: scale(0.97);
}

.filter-pill.active {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  color: #fff;
  box-shadow: 0 3px 10px rgba(0, 76, 153, 0.2);
}

.filter-pill.pending.active {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 3px 10px rgba(164, 119, 32, 0.2);
}
.filter-pill.confirmed.active {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 3px 10px var(--blue-glow);
}
.filter-pill.completed.active {
  background: var(--green-deep);
  border-color: var(--green-deep);
  box-shadow: 0 3px 10px rgba(0, 138, 94, 0.25);
}
.filter-pill.cancelled.active {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 3px 10px rgba(185, 77, 67, 0.25);
}

.filter-pill.pending::before,
.filter-pill.confirmed::before,
.filter-pill.completed::before,
.filter-pill.cancelled::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.filter-pill.pending::before {
  background: var(--amber);
}
.filter-pill.confirmed::before {
  background: var(--blue);
}
.filter-pill.completed::before {
  background: var(--green);
}
.filter-pill.cancelled::before {
  background: var(--red);
}

.filter-pill.pending.active::before,
.filter-pill.confirmed.active::before,
.filter-pill.completed.active::before,
.filter-pill.cancelled.active::before {
  background: #fff;
}

.filter-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 100px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.filter-pill.active .filter-pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.button,
.btn-admin,
.view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font: inherit;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--transition),
    color var(--transition),
    transform 0.12s ease,
    box-shadow var(--transition);
  white-space: nowrap;
  min-height: 42px;
}

.button:active,
.btn-admin:active {
  transform: translateY(1px);
}

.button.primary,
.btn-admin {
  background: var(--blue);
  color: #fff;
}
.button.primary:hover,
.btn-admin:hover {
  background: var(--blue-bright);
  box-shadow: 0 6px 18px var(--blue-glow);
}

.button.outline {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--blue-deep);
}
.button.outline:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.button.danger {
  background: var(--red-soft);
  color: var(--red);
}
.button.danger:hover {
  background: var(--red);
  color: #fff;
}

.button.sm {
  padding: 8px 12px;
  font-size: 12px;
  min-height: 36px;
}

/* =========================================================
   INBOX LIST
   ========================================================= */
.inbox {
  list-style: none;
  margin: 0;
  padding: 0;
}

.inbox-row {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  background: #fff;
  transition: background var(--transition);
  min-height: 68px;
}

.inbox-row:hover {
  background: #f6faff;
}
.inbox-row:active {
  background: #eef6ff;
}

.inbox-row.read {
  background: #fbfcfd;
}
.inbox-row.read .inbox-from,
.inbox-row.read .inbox-subject {
  font-weight: 600;
  color: #475569;
}

.inbox-row.unread {
  background: #fff;
}
.inbox-row.unread .inbox-from {
  font-weight: 900;
  color: var(--blue-deep);
}
.inbox-row.unread .inbox-subject {
  font-weight: 800;
  color: var(--ink);
}
.inbox-row.unread .inbox-time {
  color: var(--blue);
  font-weight: 900;
}

.inbox-row.unread::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
}

.inbox-row.today {
  background: linear-gradient(
    to right,
    rgba(0, 179, 126, 0.05) 0%,
    transparent 60%
  );
}
.inbox-row.today.unread {
  background: linear-gradient(to right, rgba(0, 179, 126, 0.08) 0%, #fff 60%);
}

/* ---------- Avatar ---------- */
.inbox-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
}

.inbox-avatar.status-pending {
  background: var(--amber-soft);
  color: var(--amber);
}
.inbox-avatar.status-confirmed {
  background: var(--blue-soft);
  color: var(--blue);
}
.inbox-avatar.status-completed {
  background: var(--green-soft);
  color: var(--green-deep);
}
.inbox-avatar.status-cancelled {
  background: var(--red-soft);
  color: var(--red);
}

.inbox-avatar-initial {
  line-height: 1;
}

.inbox-avatar-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--line);
}

.inbox-avatar.status-pending .inbox-avatar-dot {
  background: var(--amber);
}
.inbox-avatar.status-confirmed .inbox-avatar-dot {
  background: var(--blue);
}
.inbox-avatar.status-completed .inbox-avatar-dot {
  background: var(--green);
}
.inbox-avatar.status-cancelled .inbox-avatar-dot {
  background: var(--red);
}

/* ---------- Body ---------- */
.inbox-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inbox-line-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inbox-from {
  font-size: 15px;
  font-weight: 800;
  color: var(--blue-deep);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.inbox-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 100px;
  flex-shrink: 0;
}

.today-chip {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 8px var(--green-glow);
}

.inbox-line-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  overflow: hidden;
}

.inbox-subject {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
  max-width: 55%;
}

.inbox-arrow {
  color: var(--green);
  font-weight: 900;
  flex-shrink: 0;
}

.inbox-preview {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

.inbox-preview::before {
  content: "—";
  margin-right: 6px;
  color: var(--line);
}

/* ---------- Meta (right) ---------- */
.inbox-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.inbox-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Full-row link ---------- */
.inbox-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.inbox-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

/* =========================================================
   STATUS BADGES
   ========================================================= */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.status.pending {
  background: var(--amber-soft);
  color: var(--amber);
}
.status.confirmed {
  background: var(--blue-soft);
  color: var(--blue);
}
.status.completed {
  background: var(--green-soft);
  color: var(--green-deep);
}
.status.cancelled {
  background: var(--red-soft);
  color: var(--red);
}

/* =========================================================
   EMPTY STATE
   ========================================================= */
.empty {
  padding: 60px 30px;
  text-align: center;
  color: var(--muted);
}

.empty svg {
  width: 46px;
  height: 46px;
  color: var(--line);
  margin-bottom: 16px;
}

.empty h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 900;
  color: var(--blue-deep);
}

.empty p {
  margin: 0;
  font-size: 14px;
}
.empty a {
  color: var(--blue);
  font-weight: 700;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 22px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
  background: #fafcff;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  min-height: 42px;
  transition:
    border-color var(--transition),
    background var(--transition);
}

.page-btn:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.page-info {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  padding: 0 8px;
}

.page-info strong {
  color: var(--blue-deep);
  font-weight: 900;
}

/* =========================================================
   BOOKING DETAIL
   ========================================================= */
.booking-layout {
  max-width: 950px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 30px;
}

.detail {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 14px;
}

.detail span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.detail strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  word-break: break-word;
}

.detail strong a {
  color: var(--blue);
}
.detail strong a:hover {
  border-bottom: 1px dashed var(--blue);
}

.notes {
  color: #4a5568;
  line-height: 1.7;
  font-size: 14px;
  min-height: 40px;
  white-space: pre-wrap;
}

/* Status form */
.status-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.status-form label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex: 1;
  min-width: 240px;
}

.status-form select {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fbff;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.status-form select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.status-form .button {
  align-self: flex-end;
  height: 46px;
  padding: 0 22px;
}

/* =========================================================
   BACK LINK
   ========================================================= */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  transition:
    color var(--transition),
    gap var(--transition);
}

.back-link:hover {
  color: var(--green);
  gap: 9px;
}

/* =========================================================
   ALERTS
   ========================================================= */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.alert.error {
  background: var(--red-soft);
  color: var(--red);
}
.alert.success {
  background: var(--green-soft);
  color: var(--green-deep);
}

/* =========================================================
   PROFILE / USER FORMS
   ========================================================= */
.profile-form {
  display: grid;
  gap: 18px;
  max-width: 520px;
}

.profile-form label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.profile-form input {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fbff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.profile-form input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
  background: #fff;
}

.profile-form .button {
  justify-self: start;
  min-width: 200px;
}

/* =========================================================
   STATUS PAGE
   ========================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat-tile {
  position: relative;
  display: block;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.stat-tile:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-tile-label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-tile-value {
  display: block;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--blue-deep);
  line-height: 1;
}

.stat-tile-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.stat-tile-icon svg {
  width: 16px;
  height: 16px;
}

.stat-tile-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.stat-tile-icon.green {
  background: var(--green-soft);
  color: var(--green-deep);
}
.stat-tile-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}
.stat-tile-icon.red {
  background: var(--red-soft);
  color: var(--red);
}

.highlight-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.highlight-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.highlight-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.today-card {
  background: linear-gradient(135deg, rgba(0, 179, 126, 0.06) 0%, #fff 60%);
  border-color: rgba(0, 179, 126, 0.25);
}

.today-card:hover {
  border-color: var(--green);
}

.week-card {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, #fff 60%);
  border-color: rgba(0, 102, 204, 0.18);
}

.highlight-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.highlight-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.highlight-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 900;
  border-radius: 100px;
  background: var(--green-soft);
  color: var(--green-deep);
}

.highlight-badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.highlight-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.highlight-time {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--blue-deep);
  line-height: 1;
}

.highlight-sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.highlight-customer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.highlight-name {
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
}

.highlight-route {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.week-progress {
  height: 8px;
  border-radius: 100px;
  background: var(--line-soft);
  margin-top: 14px;
  overflow: hidden;
}

.week-progress-bar {
  height: 100%;
  border-radius: 100px;
  background: var(--gradient-brand);
  transition: width 0.4s ease;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  transition: background var(--transition);
}

.activity-row:hover {
  background: #f8faff;
}

.activity-dot {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
}

.activity-dot.status-pending {
  background: var(--amber);
}
.activity-dot.status-confirmed {
  background: var(--blue);
}
.activity-dot.status-completed {
  background: var(--green);
}
.activity-dot.status-cancelled {
  background: var(--red);
}

.activity-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.activity-avatar.status-pending {
  background: var(--amber-soft);
  color: var(--amber);
}
.activity-avatar.status-confirmed {
  background: var(--blue-soft);
  color: var(--blue);
}
.activity-avatar.status-completed {
  background: var(--green-soft);
  color: var(--green-deep);
}
.activity-avatar.status-cancelled {
  background: var(--red-soft);
  color: var(--red);
}

.activity-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.activity-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--blue-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-route {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.activity-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* =========================================================
   LOGIN
   ========================================================= */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  padding-top: calc(24px + var(--safe-top));
  padding-bottom: calc(24px + var(--safe-bottom));
  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(0, 179, 126, 0.1) 0%,
      transparent 45%
    ),
    radial-gradient(
      circle at 90% 90%,
      rgba(0, 102, 204, 0.1) 0%,
      transparent 45%
    ),
    var(--cream);
}

.login-card,
.login-box {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid;
  border-image: var(--gradient-brand) 1;
  border-image-slice: 1 0 0 0;
}

.login-card .logo,
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-card .logo strong,
.login-logo > div:not(.brandmark) {
  display: block;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--blue-deep);
}

.login-card .logo small,
.login-logo small {
  display: block;
  margin-top: 2px;
  color: var(--green-deep);
  font-size: 9px;
  letter-spacing: 0.2em;
  font-weight: 800;
}

.login-card .logo-mark,
.brandmark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 6px 16px var(--blue-glow);
  flex-shrink: 0;
}

.login-card h1,
.login-box h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: var(--blue-deep);
}

.muted,
.login-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 22px;
}

.login-card form,
.login-box form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.login-card label,
.login-box label {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.login-card input,
.login-box input {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f8fbff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.login-card input:focus,
.login-box input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
  background: #fff;
}

.login-card .button,
.login-box .button,
.login-box .btn-admin {
  width: 100%;
  height: 52px;
  font-size: 15px;
}

.login-card .back-link,
.login-box .back-site {
  display: block;
  margin-top: 26px;
  text-align: center;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 700;
}

.login-card .back-link:hover,
.login-box .back-site:hover {
  color: var(--green);
}

/* =========================================================
   MOBILE-ONLY ELEMENTS (hidden on desktop)
   ========================================================= */
.mobile-topbar,
.mobile-bottom-nav,
.sticky-action-bar,
.status-sheet,
.status-sheet-backdrop {
  display: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .stats,
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .admin-main {
    padding: 26px 22px 50px;
  }
  .admin-header h1 {
    font-size: 28px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .highlight-grid {
    grid-template-columns: 1fr;
  }
  .inbox-row {
    padding: 12px 18px;
  }
  .panel-header,
  .inbox-filters,
  .pagination {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* =========================================================
   MOBILE (≤ 750px) — Gmail inbox preserved
   ========================================================= */
@media (max-width: 750px) {
  .sidebar {
    display: none;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
  }

  /* Mobile topbar */
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(12px + var(--safe-top)) 16px 12px;
    background: var(--blue-deep);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 2px 12px rgba(0, 76, 153, 0.25);
    overflow: hidden;
  }

  .mobile-topbar::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(
      circle,
      rgba(0, 179, 126, 0.35) 0%,
      transparent 70%
    );
    pointer-events: none;
  }

  .mobile-topbar .brand-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    position: relative;
    z-index: 1;
  }

  .mobile-topbar .brand-mini .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
  }

  .mobile-topbar .brand-mini strong {
    display: block;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #fff;
    line-height: 1.1;
  }

  .mobile-topbar .brand-mini small {
    display: block;
    margin-top: 1px;
    font-size: 8px;
    letter-spacing: 0.18em;
    color: #a7d9c8;
    font-weight: 800;
  }

  .mobile-topbar .user-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    position: relative;
    z-index: 1;
  }

  .mobile-topbar .user-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-bright);
    box-shadow: 0 0 0 2px rgba(0, 212, 148, 0.3);
  }

  .admin-main {
    padding: 16px 14px 30px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 18px;
  }

  .admin-header h1 {
    font-size: 24px;
  }
  .admin-header .admin-user {
    display: none;
  }

  .panel {
    padding: 0;
    border-radius: 12px;
    margin-bottom: 14px;
  }
  .panel-header {
    padding: 14px 16px;
    align-items: flex-start;
  }
  .panel-header h2 {
    font-size: 16px;
  }
  .panel-header p {
    font-size: 12px;
  }

  /* --- FILTERS: mobile --- */
  .inbox-filters {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px;
  }

  .filter-search input {
    height: 42px;
    padding: 0 40px 0 38px;
    font-size: 15px;
    border-radius: 12px;
  }

  .filter-sort select {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    font-size: 14px;
  }

  .filter-pills {
    margin: 0 -14px;
    padding: 2px 14px;
    gap: 6px;
  }

  .filter-pill {
    padding: 7px 14px;
    font-size: 12.5px;
  }

  .filter-pill-count {
    height: 17px;
    min-width: 19px;
    font-size: 10px;
  }

  /* --- INBOX: mobile --- */
  .inbox-row {
    grid-template-columns: 38px 1fr auto;
    gap: 11px;
    padding: 12px 14px;
    min-height: 66px;
  }

  .inbox-avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }
  .inbox-avatar-dot {
    width: 11px;
    height: 11px;
    border-width: 2px;
  }

  .inbox-body {
    gap: 2px;
  }

  .inbox-from {
    font-size: 14px;
    font-weight: 800;
  }

  .inbox-line-sub {
    gap: 5px;
    font-size: 12px;
  }

  .inbox-subject {
    font-size: 12px;
    max-width: 60%;
    gap: 4px;
  }

  .inbox-arrow {
    font-size: 11px;
  }

  .inbox-preview {
    font-size: 11px;
  }
  .inbox-preview::before {
    margin-right: 4px;
  }

  .inbox-meta {
    gap: 4px;
  }
  .inbox-time {
    font-size: 10px;
    font-weight: 800;
  }
  .inbox-meta .status {
    font-size: 9px;
    padding: 3px 7px;
  }

  .inbox-chip {
    font-size: 8px;
    padding: 2px 6px;
  }

  /* --- Pagination --- */
  .pagination {
    gap: 8px;
    padding: 16px;
    flex-wrap: wrap;
  }

  .page-btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
    height: 48px;
  }

  .page-info {
    flex-basis: 100%;
    order: -1;
    text-align: center;
    padding: 0 0 6px;
    font-size: 12px;
  }

  /* --- Detail page --- */
  .booking-layout {
    max-width: 100%;
  }
  .panel:not(.inbox-panel) {
    padding: 18px 16px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .detail strong {
    font-size: 16px;
  }
  .detail strong a {
    font-size: 16px;
    font-weight: 800;
  }

  .status-form {
    flex-direction: column;
    gap: 12px;
  }
  .status-form label {
    min-width: 0;
    width: 100%;
  }
  .status-form select {
    height: 52px;
    font-size: 16px;
  }
  .status-form .button {
    width: 100%;
    height: 52px;
    font-size: 15px;
  }

  .desktop-only-status {
    display: none;
  }

  .profile-form {
    max-width: 100%;
  }
  .profile-form .button {
    width: 100%;
    justify-self: stretch;
  }

  /* --- Status page mobile --- */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-tile {
    padding: 16px 16px 18px;
    border-radius: 12px;
  }
  .stat-tile-label {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .stat-tile-value {
    font-size: 26px;
  }
  .stat-tile-icon {
    width: 30px;
    height: 30px;
    top: 12px;
    right: 12px;
  }
  .stat-tile-icon svg {
    width: 14px;
    height: 14px;
  }

  .highlight-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }
  .highlight-card {
    padding: 18px;
    border-radius: 14px;
  }
  .highlight-time {
    font-size: 32px;
  }
  .highlight-label {
    font-size: 10px;
  }
  .highlight-badge {
    font-size: 10px;
    padding: 3px 10px;
  }

  .activity-row {
    grid-template-columns: 30px 1fr auto;
    gap: 10px;
    padding: 11px 14px;
  }
  .activity-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .activity-name {
    font-size: 13px;
  }
  .activity-route {
    font-size: 11px;
  }
  .activity-time {
    font-size: 10px;
  }

  /* --- Sticky action bar (booking detail) --- */
  .sticky-action-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 10px 12px;
    gap: 8px;
    z-index: 30;
    box-shadow: 0 -4px 18px rgba(0, 76, 153, 0.1);
  }

  .sticky-action-bar a,
  .sticky-action-bar button {
    flex: 1;
    min-height: 52px;
    padding: 10px 8px;
    border-radius: 12px;
    border: 0;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease;
  }

  .sticky-action-bar a:active,
  .sticky-action-bar button:active {
    transform: scale(0.96);
  }

  .sticky-action-bar svg {
    width: 20px;
    height: 20px;
  }

  .sticky-action-bar .sab-call {
    background: var(--blue-soft);
    color: var(--blue-deep);
  }
  .sticky-action-bar .sab-wa {
    background: var(--green-soft);
    color: var(--green-deep);
  }
  .sticky-action-bar .sab-map {
    background: var(--green-soft);
    color: var(--green-deep);
  }
  .sticky-action-bar .sab-status {
    background: var(--blue);
    color: #fff;
  }

  /* --- Status sheet --- */
  .status-sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 60;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .status-sheet-backdrop.show {
    display: block;
    opacity: 1;
  }

  .status-sheet {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 22px 20px calc(22px + var(--safe-bottom));
    z-index: 61;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    box-shadow: 0 -10px 40px rgba(0, 76, 153, 0.2);
  }

  .status-sheet.show {
    display: block;
    transform: translateY(0);
  }

  .status-sheet::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    margin: -8px auto 16px;
  }

  .status-sheet h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 900;
    color: var(--blue-deep);
  }

  .status-sheet p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 13px;
  }

  .status-sheet-options {
    display: grid;
    gap: 8px;
  }
  .status-sheet-options form {
    margin: 0;
  }

  .status-sheet-options button {
    width: 100%;
    min-height: 56px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #f8fbff;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    color: var(--ink);
  }

  .status-sheet-options button.current {
    border-color: var(--blue);
    background: var(--blue-soft);
  }

  .status-sheet-options .opt-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
  }

  .status-sheet-options .opt-pending .opt-dot {
    background: var(--amber);
  }
  .status-sheet-options .opt-confirmed .opt-dot {
    background: var(--blue);
  }
  .status-sheet-options .opt-completed .opt-dot {
    background: var(--green);
  }
  .status-sheet-options .opt-cancelled .opt-dot {
    background: var(--red);
  }

  .status-sheet-cancel {
    margin-top: 12px;
    width: 100%;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
  }

  /* --- Bottom nav --- */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--blue-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
    box-shadow: 0 -4px 20px rgba(0, 76, 153, 0.25);
  }

  .mobile-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #b8d4f0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    position: relative;
    padding-top: 6px;
  }

  .mobile-bottom-nav a svg {
    width: 20px;
    height: 20px;
  }

  .mobile-bottom-nav a.active {
    color: var(--green-bright);
  }

  .mobile-bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 3px;
    background: var(--green-bright);
    border-radius: 0 0 3px 3px;
  }

  /* --- Login --- */
  .login-page {
    padding: 20px 16px;
  }
  .login-card,
  .login-box {
    padding: 30px 22px;
  }
  .login-card h1,
  .login-box h1 {
    font-size: 26px;
  }
}

/* =========================================================
   EXTRA NARROW (< 400px)
   ========================================================= */
@media (max-width: 400px) {
  .admin-main {
    padding: 14px 12px 30px;
  }

  .inbox-filters {
    padding: 10px 12px;
  }

  .filter-pill {
    padding: 6px 12px;
    font-size: 12px;
  }

  .inbox-row {
    grid-template-columns: 34px 1fr auto;
    gap: 9px;
    padding: 11px 12px;
    min-height: 62px;
  }

  .inbox-avatar {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }
  .inbox-avatar-dot {
    width: 10px;
    height: 10px;
  }
  .inbox-from {
    font-size: 13px;
  }
  .inbox-subject {
    font-size: 11px;
    max-width: 55%;
  }
  .inbox-preview {
    font-size: 10px;
  }
  .inbox-meta .status {
    font-size: 8px;
    padding: 2px 6px;
  }
  .inbox-time {
    font-size: 9px;
  }

  .stat-card strong {
    font-size: 20px;
  }
}

/* Landscape short screens */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  :root {
    --bottom-nav-h: 56px;
  }
  .mobile-topbar {
    padding-top: calc(8px + var(--safe-top));
    padding-bottom: 8px;
  }
  .mobile-bottom-nav a svg {
    width: 18px;
    height: 18px;
  }
  .mobile-bottom-nav a {
    font-size: 9px;
  }
}
