/* ─────────────────────────────────────────────
   Trackle 2026 Dashboard – Unified Stylesheet
   Brand: #cfae6f
   ───────────────────────────────────────────── */

:root {
  --gold: #cfae6f;
  --gold-soft: #e6d3a3;
  --gold-dark: #b99855;

  --bg: #0e0f12;
  --panel: #15171c;
  --panel-soft: rgba(255,255,255,0.04);

  --text: #f8fafc;
  --muted: #9ca3af;
  --muted-bright: #b5bdca;
  --border: rgba(255,255,255,0.08);

  --success: #22c55e;
  --danger: #ef4444;
}

/* ───────── Base ───────── */

* {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  margin: 0;
  height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(207,174,111,0.12), transparent),
    radial-gradient(900px 500px at 90% 10%, rgba(207,174,111,0.08), transparent),
    var(--bg);
  display: flex;
  overflow: hidden;
}

/* ───────── Layout ───────── */

.sidebar {
  width: 270px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0.01)
  );
  border-right: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.header {
  height: 68px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.01)
  );
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

#content {
  padding: 28px;
  flex: 1;
  overflow-y: auto;
  animation: fadeIn 0.35s ease;
}

/* ───────── Branding ───────── */

.logo {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 34px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
}

.user {
  font-size: 14px;
  color: var(--muted);
}

/* ───────── Navigation ───────── */

.nav-btn {
  position: relative;
  padding: 13px 16px;
  margin-bottom: 6px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(207,174,111,0.18),
    rgba(207,174,111,0.02)
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav-btn:hover {
  color: var(--text);
}

.nav-btn:hover::before {
  opacity: 1;
}

.nav-btn.active {
  color: #0e0f12;
  font-weight: 600;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  box-shadow: 0 10px 30px rgba(207,174,111,0.25);
}

.nav-btn.active::before {
  display: none;
}

.spacer {
  flex-grow: 1;
}

/* ───────── Dashboard ───────── */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.dashboard-header h2 {
  font-size: 22px;
  font-weight: 600;
}

.dashboard-subtitle {
  font-size: 14px;
  color: var(--muted);
}

/* ───────── Cards ───────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.card.gold {
  background: linear-gradient(
    135deg,
    rgba(207,174,111,0.18),
    rgba(255,255,255,0.02)
  );
}

.card.white {
  background: linear-gradient(
    135deg,
    rgba(224, 222, 219, 0.18),
    rgba(255,255,255,0.12)
  );
}

.card.success {
  background: linear-gradient(
    135deg,
    rgba(34,197,94,0.25),
    rgba(255,255,255,0.02)
  );
}

.card.danger {
  background: linear-gradient(
    135deg,
    rgba(239,68,68,0.25),
    rgba(255,255,255,0.02)
  );
}

.card-label {
  font-size: 13px;
  color: var(--muted-bright);
  margin-bottom: 6px;
}

.card-value {
  font-size: 28px;
  font-weight: 700;
}

/* ───────── Table ───────── */

.table {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.04),
    rgba(255,255,255,0.01)
  );
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 120px 1fr 140px 160px;
  padding: 14px 20px;
  align-items: center;
}

.table-header {
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.table-row {
  transition: background 0.2s ease;
}

.table-row:hover {
  background: rgba(207,174,111,0.06);
}

.table-strong {
  font-weight: 600;
}

/* ───────── Status ───────── */

.status-success {
  color: var(--success);
  font-weight: 500;
}

.status-warning {
  color: var(--gold);
  font-weight: 500;
}

.status-danger {
  color: var(--danger);
  font-weight: 500;
}

/* ───────── Utilities ───────── */

.loading {
  color: var(--muted);
  font-size: 15px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ───────── Scrollbar ───────── */

#content::-webkit-scrollbar {
  width: 10px;
}

#content::-webkit-scrollbar-thumb {
  background: rgba(207,174,111,0.25);
  border-radius: 10px;
}

/* ───────── Responsive ───────── */

@media (max-width: 900px) {
  .sidebar {
    width: 210px;
  }
}



/* ============================================================
   Orders / Deliveries Page (Trackle 2026)
   Requires: root vars from trackle-dashboard.css
   ============================================================ */

/* --- Header action row additions --- */
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.user-info {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(207,174,111,0.18), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
}

.user-name {
  color: var(--text);
  font-weight: 600;
}

/* --- Buttons (gold) --- */
.btn-gold {
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(135deg, rgba(207,174,111,0.22), rgba(255,255,255,0.03));
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(207,174,111,0.18);
  background: linear-gradient(135deg, rgba(207,174,111,0.30), rgba(255,255,255,0.04));
}

.btn-gold:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-gold:disabled,
.btn-gold.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/*greeeeeeen button*/
.btn-green {
  border: 1px solid rgb(119, 151, 115);
  background: linear-gradient(135deg, rgba(105, 180, 98, 0.22), rgba(255, 255, 255, 0.03));
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn-green:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(111, 207, 132, 0.18);
  background: linear-gradient(135deg, rgba(114, 207, 111, 0.527)2), rgba(255, 255, 255, 0.03);
}

.btn-green:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-green:disabled,
.btn-green.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Orders filter row --- */
.date-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

.input {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
  min-width: 220px;
}

.input:focus {
  outline: none;
  border-color: rgba(207,174,111,0.75);
  box-shadow: 0 0 0 2px rgba(207,174,111,0.22);
}

/* --- Section: AM / PM --- */
.package-section {
  margin-top: 18px;
}

.package-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 10px;
  letter-spacing: 0.2px;
}

.package-divider {
  height: 1px;
  width: 100%;
  background: rgba(255,255,255,0.08);
  margin: 18px 0;
}

/* --- Delivery Card --- */
.package-card {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr 110px 44px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 10px;

  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.10);
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  backdrop-filter: blur(14px);

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.package-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  border-color: rgba(207,174,111,0.25);
}

/* left quantity block (big number) */
.package-quantity {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  color: rgba(255,255,255,0.92);
  letter-spacing: -1px;
}

/* info column */
.package-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
}

.package-info .line-1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.package-info .line-2 {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* type badge (BOX) */
.package-type {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 12px;

  color: #0e0f12;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  box-shadow: 0 10px 28px rgba(207,174,111,0.18);
}

/* expand button */
.expand-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.expand-btn:hover {
  background: rgba(207,174,111,0.08);
  border-color: rgba(207,174,111,0.22);
  transform: translateY(-1px);
}

.expand-btn:active {
  transform: translateY(0);
}

/* expanded state + chevron rotate */
.package-card.expanded .expand-btn {
  transform: rotate(180deg);
}

/* hidden details container (optional) */
.package-details {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 15px;
  display: none;
}
.package-details .line-1{
  color: rgb(230, 231, 211);
  background-color: var(--panel);
  border-radius: 5px;
  padding: 5px;
  margin-left: 5px;
  margin-right: 5px;
  margin-bottom: 3px;
  font-size: 13px;
}

.package-card.expanded .package-details {
  display: block;
}

/* empty placeholders */
.package-card.empty {
  min-height: 66px;
  opacity: 0.35;
  background: rgba(255,255,255,0.02);
  border: 2px dashed rgba(255, 255, 255, 0.301);
  box-shadow: none;
}

.package-card.empty:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.281);
}

/* --- Responsive --- */
@media (max-width: 1100px) {
  .package-card {
    grid-template-columns: 64px 1fr 90px 44px;
  }
}

@media (max-width: 780px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .user-info {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .package-card {
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
  }

  .package-type {
    grid-column: 1 / 2;
    justify-self: start;
  }

  .expand-btn {
    grid-column: 2 / 3;
    justify-self: end;
  }
}


/* ============================================================
   Orders/Deliveries – Condensed rows + type outline + left badge
   ============================================================ */

/* Tighter list spacing */
.package-section { margin-top: 14px; }
.package-title { margin: 8px 0 8px; }

/* Condensed card */
.package-card {
  display: grid;
  grid-template-columns: 84px 1fr 250px 44px; /* left block, main, right meta, expand */
  gap: 12px;
  align-items: center;

  padding: 7px 6px;              /* tighter */
  margin-bottom: 4px;              /* tighter */
  border-radius: 18px;

  border: 2px solid rgba(255,255,255,0.10); /* will be overridden by type outline var */
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  backdrop-filter: blur(14px);

  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

/* Hover keeps it modern but subtle */
.package-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

/* Left block: number with type underneath */
.package-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Big number */
.package-quantity {
  font-size: 32px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -1px;
  color: rgba(255,255,255,0.92);
  margin: 0;
}

/* Type badge under number */
.package-type-badge {
  width: 80px;
  height: 22px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.6px;

  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0,0,0,0.25);
}

/* Main info area – tighter */
.package-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.package-info .line-1 {
  font-size: 16px;
  font-weight: 750;
  color: var(--text);
}

.package-info .line-2 {
  font-size: 15px;
  font-weight: 650;
  color: var(--muted);
}

/* Right meta (Park JOB / PO) aligned right like screenshot */
.package-meta {
  justify-self: end;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.package-meta .meta-1 {
  font-size: 14px;
  font-weight: 750;
  color: var(--text);
}

.package-meta .meta-2 {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

/* Expand button: smaller + cleaner */
.expand-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.expand-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.package-card.expanded .expand-btn { transform: rotate(180deg); }

/* Optional expanded detail area */
.package-details {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 13px;
  display: none;
}

.package-card.expanded .package-details { display: block; }

/* Empty placeholders */
.package-card.empty {
  min-height: 58px;
  opacity: 0.30;
  background: rgba(255,255,255,0.02);
  border: 2px dashed rgba(255, 255, 255, 0.295);
  box-shadow: none;
}

.package-card.empty:hover { transform: none; box-shadow: none; }

/* ------------------------------------------------------------
   Delivery Type Coloring System
   - outline (border) per type
   - badge color per type
------------------------------------------------------------ */

.package-card[data-type] {
  border-color: var(--delivery-color);
  background-color:var(--delivery-color-bg);
}

.package-card[data-type] .package-type-badge {
  background-color: var(--delivery-color);
}


/* Map your classes to a shared variable */
.delivery-t-BOX { --delivery-color: rgb(103, 151, 190); --delivery-color-bg: rgba(103, 151, 190, 0.10); }
.delivery-t-ENVELOPE { --delivery-color: rgb(190 103 103);--delivery-color-bg: rgba(190, 103, 103, 0.11); }
.delivery-t-PROOF { --delivery-color: rgb(190, 183, 103);--delivery-color-bg: rgba(190, 183, 103, 0.10); }
.delivery-t-SKID { --delivery-color: rgb(103 190 147);--delivery-color-bg: rgba(103, 190, 146, 0.103); }
.delivery-t-STAMPS { --delivery-color: rgb(158 103 190); --delivery-color-bg: rgba(158, 103, 190, 0.11); }
.delivery-t-STAYFLAT { --delivery-color: rgb(103 180 190);--delivery-color-bg: rgba(103, 180, 190, 0.103); }
.delivery-t-TRAYS { --delivery-color: rgb(148 190 103);--delivery-color-bg: rgba(148, 190, 103, 0.103); }
.delivery-t-TUBS { --delivery-color: rgb(148 190 103);--delivery-color-bg: rgba(148, 190, 103, 0.096); }
.delivery-t-PICKUP { --delivery-color: rgb(221, 176, 80);--delivery-color-bg: rgba(221, 176, 80, 0.103); }

/* Responsive */
@media (max-width: 980px) {
  .package-card {
    grid-template-columns: 84px 1fr 44px;
  }

  .package-meta {
    grid-column: 2 / 3;
    justify-self: start;
    text-align: left;
    margin-top: 6px;
  }

  .expand-btn {
    grid-column: 3 / 4;
    justify-self: end;
  }
}

input{
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;

}

/* ============================================================
   Create Delivery Form Styles
   ============================================================ */

.form-wrap { display: flex; flex-direction: column; gap: 14px; }

.form-section { padding: 16px; }

.form-section-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid #ebebeb;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field-span-2 { grid-column: 1 / -1; }

.label {
  font-size: 15px;
  color: var(--muted-bright);
  font-weight: 700;
  letter-spacing: 0.2px;
}

.textarea { resize: vertical; min-height: 96px; }

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 6px 2px 2px;
}

.email-directory-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.email-directory {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.check {
  width: 100%;
  height: 35px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.check:hover {
  transform: translateY(-3px);
  border-color: rgba(207,174,111,0.22);
  background: rgba(207,174,111,0.06);
}

.check input { accent-color: rgb(56, 119, 255); }


@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
  .email-directory { grid-template-columns: 1fr; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn-gold { width: 100%; }
}


/* ============================================================
   Split / Two-Column Layout Helpers
   ============================================================ */

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% / 50% */
  gap: 14px;
  align-items: start;
}

/* 2/3 + 1/3 layout */
.split-grid.wide-left {
  grid-template-columns: 2fr 1fr;
}

/* 1/3 + 2/3 layout */
.split-grid.wide-right {
  grid-template-columns: 1fr 2fr;
}

/* Stack on small screens */
@media (max-width: 1000px) {
  .split-grid,
  .split-grid.wide-left,
  .split-grid.wide-right {
    grid-template-columns: 1fr;
  }
}

select{
  color: rgb(255, 255, 255);
  background-color: black;;
}

option{
  color: var(--text);
  background-color: rgb(102, 102, 102);
}

/* ============================================================
   Delivery Records Page
   ============================================================ */

.records-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
}

.records-filter-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 4px;
}

.records-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 2px 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.records-summary-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.records-summary-right {
  display: flex;
  align-items: center;
}

.records-pill {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  padding: 6px 10px;
  border-radius: 999px;
}

.records-muted {
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}

/* Details block layout */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.details-item { display: flex; flex-direction: column; gap: 4px; }

.details-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 750;
  letter-spacing: 0.2px;
}

.details-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 650;
}

.details-muted {
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}

.details-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}

.details-span-2 { grid-column: 1 / -1; }

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255,255,255,0.10);
}

.tag-success { background: rgba(34,197,94,0.16); color: #b6ffd0; }
.tag-yellow { background: rgba(173, 197, 34, 0.16); color: #fffeda; }
.tag-danger { background: rgba(239,68,68,0.16); color: #ffb3b3; }
.tag-muted { background: rgba(255,255,255,0.05); color: var(--muted); }

@media (max-width: 1100px) {
  .records-filter-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .records-filter-actions { justify-content: stretch; }
  .records-filter-actions .btn-gold { width: 100%; }
  .details-grid { grid-template-columns: 1fr; }
  .details-actions { justify-content: stretch; flex-wrap: wrap; }
  .details-actions .btn-gold { width: 100%; }
}


/* ============================================================
   DELIVERY_RECORD_VIEW styles (paste into trackle-dashboard.css)
   ============================================================ */

.record-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.record-summary {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.record-summary-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.record-id {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.record-id-strong {
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.2px;
}

.record-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.record-status-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.record-summary-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.record-type-pill {
  width: 86px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #fff;
  box-shadow: 0 18px 42px rgba(0,0,0,0.35);
}

.record-type-count {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.record-type-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.7px;
  opacity: 0.95;
}

.record-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-card {
  padding: 16px;
}

.record-card-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
  color: var(--text);
}

/* Key/Value grid */
.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kv { display: flex; flex-direction: column; gap: 4px; }
.kv-span-2 { grid-column: 1 / -1; }

.kv-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.kv-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 650;
}

.prewrap { white-space: pre-wrap; }

.record-note {
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

/* Attachment tiles */
.attach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attach {
  text-decoration: none;
  color: var(--text);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  padding: 12px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.attach:hover {
  transform: translateY(-1px);
  border-color: rgba(207,174,111,0.22);
  background: rgba(207,174,111,0.06);
}

.attach-title {
  font-size: 13px;
  font-weight: 850;
}

.attach-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

/* Email mini actions */
.record-mini-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Audit timeline */
.audit {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-row {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
}

.audit-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(207,174,111,0.85);
  box-shadow: 0 0 0 3px rgba(207,174,111,0.18);
}

.audit-title {
  font-size: 13px;
  font-weight: 850;
  color: var(--text);
}

.audit-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 1000px) {
  .record-summary { flex-direction: column; align-items: flex-start; }
  .record-actions { justify-content: stretch; }
  .record-actions .btn-gold { width: 100%; }
  .kv-grid { grid-template-columns: 1fr; }
  .attach-grid { grid-template-columns: 1fr; }
}


/* HTML: <div class="loader"></div> */
.loader32 {
  width: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: 
    radial-gradient(farthest-side,#ffa516 94%,#0000) top/8px 8px no-repeat,
    conic-gradient(#0000 30%,#ffa516);
  -webkit-mask: radial-gradient(farthest-side,#0000 calc(100% - 8px),#000 0);
  animation: l13 1s infinite linear;
}
@keyframes l13{ 
  100%{transform: rotate(1turn)}
}
/* ============================================================
   Admin Console Page Styles
   Paste into trackle-dashboard.css
   ============================================================ */

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 2px 14px;
}

.admin-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-card { padding: 16px; }

.admin-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
}

.admin-filter-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 2px;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin: 12px 2px 10px;
  flex-wrap: wrap;
}

.admin-tab {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.admin-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(207,174,111,0.22);
  background: rgba(207,174,111,0.06);
}

.admin-tab.active {
  border-color: rgba(207,174,111,0.35);
  background: linear-gradient(135deg, rgba(207,174,111,0.18), rgba(255,255,255,0.03));
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* Table */
.admin-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-table-header {
  display: grid;
  grid-template-columns: 170px 110px 90px 140px 1fr 80px;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  font-weight: 850;
  font-size: 12px;
  letter-spacing: 0.2px;
}

.admin-email-header {
  grid-template-columns: 170px 120px 220px 1fr 130px 80px;
}

.admin-audit-header {
  grid-template-columns: 170px 150px 130px 150px 1fr 80px;
}

.admin-table-row {
  display: grid;
  grid-template-columns: 170px 110px 90px 140px 1fr 80px;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  align-items: center;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.admin-panel#adminPanel_email .admin-table-row {
  grid-template-columns: 170px 120px 220px 1fr 130px 80px;
}

.admin-panel#adminPanel_audit .admin-table-row {
  grid-template-columns: 170px 150px 130px 150px 1fr 80px;
}

.admin-table-row:hover {
  transform: translateY(-1px);
  border-color: rgba(207,174,111,0.22);
  background: rgba(207,174,111,0.06);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
}

.mini-btn {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-weight: 850;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.mini-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(207,174,111,0.22);
  background: rgba(207,174,111,0.06);
}

/* Severity hints */
.log-info { border-left: 3px solid rgba(96,165,250,0.7); }
.log-warn { border-left: 3px solid rgba(245,158,11,0.75); }
.log-error { border-left: 3px solid rgba(239,68,68,0.75); }

/* Tags extras used above */
.tag-warning { background: rgba(245,158,11,0.16); color: #ffd38a; }

/* Drawer */
.admin-drawer {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(520px, calc(100vw - 36px));
  z-index: 50;
  display: none;
}

.admin-drawer.open { display: block; }

.admin-drawer-card { padding: 14px; }

.admin-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-drawer-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: var(--text);
}

.admin-drawer-body {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.admin-empty {
  color: var(--muted);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 1100px) {
  .admin-filter-grid { grid-template-columns: 1fr 1fr; }
  .admin-filter-actions { justify-content: stretch; }
  .admin-filter-actions .btn-gold { width: 100%; }
}

@media (max-width: 900px) {
  .admin-table-header,
  .admin-table-row,
  .admin-email-header,
  .admin-audit-header {
    grid-template-columns: 1fr 1fr;
    row-gap: 8px;
  }

  .admin-table-header { display: none; }

  .admin-table-row > div:nth-child(6) { grid-column: 1 / -1; }
  .mini-btn { width: 100%; }
}

/* ============================================================
   Presets Page Styles
   Paste into trackle-dashboard.css
   ============================================================ */

.presets-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 2px 14px;
}

.presets-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}

.presets-search .input {
  min-width: 320px;
  flex: 1;
}

.presets-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.presets-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 2px 14px;
}

.chip {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-weight: 850;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: rgba(207,174,111,0.22);
  background: rgba(207,174,111,0.06);
}

.chip.active {
  border-color: rgba(207,174,111,0.35);
  background: linear-gradient(135deg, rgba(207,174,111,0.18), rgba(255,255,255,0.03));
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 12px;
}

/* Preset card */
.preset-card {
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.10);
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  backdrop-filter: blur(14px);
  padding: 14px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.preset-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

/* Use the same delivery color variable mapping as your listings */
.preset-card.delivery-t-BOX { border-color: #6797be; }
.preset-card.delivery-t-ENVELOPE { border-color: #be6767; }
.preset-card.delivery-t-PROOF { border-color: #beb767; }
.preset-card.delivery-t-SKID { border-color: #67be93; }
.preset-card.delivery-t-STAMPS { border-color: #9e67be; }
.preset-card.delivery-t-STAYFLAT { border-color: #67b4be; }
.preset-card.delivery-t-TRAYS { border-color: #94be67; }
.preset-card.delivery-t-TUBS { border-color: #94be67; }
.preset-card.delivery-t-PICKUP { border-color: rgb(221, 176, 80); }

.preset-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.preset-title {
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.2px;
  color: var(--text);
}

.preset-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 750;
}

.preset-badge {
  width: 86px;
  height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  box-shadow: 0 18px 42px rgba(0,0,0,0.32);
}

.preset-count {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255,255,255,0.92);
}

.preset-type {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.7px;
  color: var(--muted);
}

.preset-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.preset-label {
  font-size: 12px;
  font-weight: 850;
  color: var(--muted);
  white-space: nowrap;
}

.preset-value {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  text-align: right;
  min-width: 0;
}

.preset-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Drawer */
.preset-drawer {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(560px, calc(100vw - 36px));
  z-index: 60;
  display: none;
}

.preset-drawer.open { display: block; }

.preset-drawer-card { padding: 14px; }

.preset-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.preset-drawer-title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: var(--text);
}

.preset-drawer-body {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.preset-drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .presets-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

@media (max-width: 820px) {
  .presets-grid { grid-template-columns: 1fr; }
  .presets-actions { justify-content: stretch; }
  .presets-actions .btn-gold { width: 100%; }
  .preset-actions { justify-content: stretch; flex-wrap: wrap; }
  .preset-actions .btn-gold { width: 100%; }
  .preset-drawer-actions .btn-gold { width: 100%; }
}


/* ============================================================
   Preset Create Page additions
   Paste into trackle-dashboard.css
   ============================================================ */

.email-directory-3col {
  grid-template-columns: 1fr 1fr 1fr;
}

.email-directory-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .email-directory-3col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .email-directory-3col {
    grid-template-columns: 1fr;
  }
  .email-directory-actions {
    justify-content: stretch;
  }
  .email-directory-actions .btn-gold {
    width: 100%;
  }
}


/* ============================================================
   Delivery Truck (Leaflet) Page Styles
   Paste into trackle-dashboard.css
   ============================================================ */

.truck-card { padding: 16px; }

.truck-card-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: var(--text);
  margin-bottom: 12px;
}

.truck-muted {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
}

.truck-map-wrap {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}

.truck-map {
  width: 100%;
  height: 640px;
}

/* progress */
.truck-progress {
  margin-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 12px;
}

.truck-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.truck-progress-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}

.truck-progress-meta {
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
}

.truck-progress-bar {
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}

.truck-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(207,174,111,0.95), rgba(255,255,255,0.15));
  transition: width .35s ease;
}

.truck-progress-bottom {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

/* lists */
.truck-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.truck-item {
  display: grid;
  grid-template-columns: 68px 1fr 120px;
  gap: 10px;
  align-items: center;

  padding: 10px 10px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);

  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.truck-item:hover {
  transform: translateY(-1px);
  border-color: rgba(207,174,111,0.22);
  background: rgba(207,174,111,0.06);
}

/* Outline color by type using your variable mapping */
.truck-item.delivery-t-BOX { border-color: #6797be; }
.truck-item.delivery-t-ENVELOPE { border-color: #be6767; }
.truck-item.delivery-t-PROOF { border-color: #beb767; }
.truck-item.delivery-t-SKID { border-color: #67be93; }
.truck-item.delivery-t-STAMPS { border-color: #9e67be; }
.truck-item.delivery-t-STAYFLAT { border-color: #67b4be; }
.truck-item.delivery-t-TRAYS { border-color: #94be67; }
.truck-item.delivery-t-TUBS { border-color: #94be67; }
.truck-item.delivery-t-PICKUP { border-color: rgb(221, 176, 80); }

.truck-item-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.truck-item-num {
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  color: rgba(255,255,255,0.92);
}

.truck-item-type {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.truck-item-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
}

.truck-item-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.truck-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.truck-item-tag { justify-self: end; }

@media (max-width: 1000px) {
  .truck-map { height: 360px; }
  .truck-item { grid-template-columns: 68px 1fr; }
  .truck-item-right { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}


/* Job Lookup Overlay */
.job-overlay { position: fixed; inset: 0; z-index: 80; display: none; }
.job-overlay.open { display: block; }

.job-overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.60);
  backdrop-filter: blur(6px);
}

.job-overlay-card{
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 36px));
  padding: 14px;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
}

.job-overlay-header{
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}

.job-overlay-title{
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.3px;
  color: var(--text);
}

.job-overlay-hint{
  margin-top: 8px;
  font-size: 12px;
  font-weight: 750;
  color: var(--muted);
}

.job-overlay-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

.job-overlay-error{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.12);
  color: #ffb3b3;
  font-weight: 800;
  font-size: 12px;
}


/* Preset autocomplete */
.preset-autocomplete { position: relative; }

.preset-autocomplete-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 40;

  display: none;
  max-height: 160px;
  overflow-y: auto;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(20,20,20,0.95);
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}

.preset-autocomplete-list.open { display: block; }

.preset-autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.preset-autocomplete-item:last-child { border-bottom: none; }

.preset-autocomplete-item:hover {
  background: rgba(207,174,111,0.14);
}


/* Additions for fuzzy highlight + keyboard active row */
.preset-hl{
  color: #fff;
  background: rgba(207,174,111,0.28);
  border: 1px solid rgba(207,174,111,0.22);
  padding: 0 2px;
  border-radius: 6px;
}

.preset-autocomplete-item.active{
  background: rgba(207,174,111,0.18);
  outline: 1px solid rgba(207,174,111,0.20);
}


/* ============================================================
   Settings Page Styles (paste into trackle-dashboard.css)
   ============================================================ */

.settings-topbar{
  display:flex; justify-content:space-between; align-items:center;
  gap:12px; flex-wrap:wrap; margin: 10px 2px 14px;
}

.settings-pills{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.settings-actions{ display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }

.settings-card{ padding:16px; }
.settings-card-title{
  display:flex; justify-content:space-between; align-items:baseline;
  gap:12px; margin-bottom:12px;
  font-size:14px; font-weight:900; letter-spacing:0.3px; color:var(--text);
}

.settings-email-tools{
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
  margin-bottom:12px;
}
.settings-email-tools .input{ flex:1; min-width:240px; }

.settings-email-add{
  display:grid;
  grid-template-columns: 1fr 1fr 160px 140px;
  gap:12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  margin-bottom: 12px;
}

.settings-email-add-actions{
  grid-column: 1 / -1;
  display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap;
}

.settings-email-list{
  display:flex; flex-direction:column; gap:8px;
}

.settings-email-row{
  display:flex; justify-content:space-between; align-items:center;
  gap:12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.settings-email-row:hover{
  transform: translateY(-1px);
  border-color: rgba(207,174,111,0.22);
  background: rgba(207,174,111,0.06);
}

.settings-email-title{ font-size:15px; font-weight:900; color:var(--text); }
.settings-email-sub{ margin-top:4px; font-size:13px; font-weight:750; color:var(--muted); }

.settings-email-actions{
  display:flex; gap:10px; align-items:center;
}
.mini-btn.danger{
  border-color: rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.10);
}

.settings-save-row{
  display:flex; justify-content:flex-end; margin-top:12px;
}

.settings-tools-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

.settings-tools-note{
  margin-top:10px;
  font-size:12px;
  font-weight:750;
  color: var(--muted);
}

.email-directory-2col{ grid-template-columns: 1fr 1fr; }

/* Drawer */
.settings-drawer{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(560px, calc(100vw - 36px));
  z-index: 70;
  display: none;
}
.settings-drawer.open{ display:block; }
.settings-drawer-card{ padding:14px; }

.settings-drawer-header{
  display:flex; justify-content:space-between; align-items:center;
  gap:10px; margin-bottom:10px;
}
.settings-drawer-title{
  font-size:14px; font-weight:950; letter-spacing:0.3px; color:var(--text);
}

.settings-drawer-actions{
  display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap;
  margin-top:12px;
}

@media (max-width: 1100px){
  .settings-email-add{ grid-template-columns: 1fr 1fr; }
  .email-directory-2col{ grid-template-columns: 1fr; }
  .settings-tools-grid{ grid-template-columns: 1fr; }
  .settings-save-row .btn-gold{ width:100%; }
}
