/* ============================================================
   Giddy Goat Portal — shared styleguide
   Pulled from giddygoat.com (Shopify Broadcast Theme V6.2.0)
   ============================================================ */

@font-face {
  font-family: "Bricolage Grotesque";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/BricolageGrotesque-Medium.woff2") format("woff2");
}
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("fonts/DMSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url("fonts/DMSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("fonts/DMSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 800; font-display: swap; src: url("fonts/DMSans-ExtraBold.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/DMSans-Italic.woff2") format("woff2"); }

:root {
  --honey: #f1a843;
  --honey-deep: #e38605;
  --cream: #f5f1e7;
  --cream-2: #ede8dd;
  --paper: #f6f5f1;
  --dark: #3a2716;
  --dark-2: #2f2012;
  --muted: rgba(58, 39, 22, 0.6);
  --muted-soft: rgba(58, 39, 22, 0.45);
  --border: rgba(58, 39, 22, 0.12);
  --border-soft: rgba(58, 39, 22, 0.06);
  --error: #d02e2e;
  --error-bg: #F8D7DA;
  --success: #56AD6A;

  --font-heading: "Bricolage Grotesque", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--dark);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--dark); }
a:hover { opacity: 0.7; }

:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 2px; }
.btn-sm:active, .btn-tiny:active { transform: translateY(1px); }

/* ============================================================
   Login layout — split screen
   ============================================================ */

.auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth__left {
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  min-height: 100vh;
}

.auth__brand {
  margin: 24px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.auth__brand img.logo {
  width: 160px;
  height: auto;
  display: block;
}

.auth__brand .role-pill {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark);
  background: rgba(241, 168, 67, 0.18);
  padding: 6px 14px;
  border-radius: 999px;
}

.auth__card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-radius: 18px;
  padding: 44px 44px 40px;
  box-shadow: 0 1px 0 rgba(58, 39, 22, 0.04);
  margin-top: 8px;
}

.auth__card h1 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.1;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.auth__card .lede {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.auth__right {
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100vh;
  overflow: hidden;
  background: var(--dark);
}
.auth__right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; }
  .auth__right { display: none; }
  .auth__left { padding: 40px 24px; }
  .auth__card { padding: 32px 28px; border-radius: 14px; }
  .auth__card h1 { font-size: 30px; }
}

/* ============================================================
   Forms
   ============================================================ */

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 8px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
  background: var(--cream-2);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.15s, background 0.15s;
}
.input-wrap:has(.icon-left) input { padding-left: 44px; }
.input-wrap:has(.icon-right) input { padding-right: 44px; }
.field input::placeholder { color: var(--muted-soft); font-weight: 400; }
.field input:hover { background: #e7e0cf; }
.field input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--honey);
  box-shadow: 0 0 0 4px rgba(241, 168, 67, 0.18);
}

.input-wrap .icon-left,
.input-wrap .icon-right {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  pointer-events: none;
}
.input-wrap .icon-left { left: 14px; }
.input-wrap .icon-right { right: 12px; cursor: pointer; pointer-events: auto; background: none; border: 0; padding: 6px; border-radius: 6px; color: var(--muted); }
.input-wrap .icon-right:hover { color: var(--dark); }
.input-wrap svg { width: 18px; height: 18px; display: block; }

.row-between {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: -6px 0 24px;
}
.link-muted {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: var(--honey-deep);
  text-decoration: none;
}
.link-muted:hover { text-decoration: underline; opacity: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 24px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.05s, background 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: var(--honey);
  color: var(--dark);
  box-shadow: 0 1px 0 rgba(58, 39, 22, 0.08);
}
.btn-primary:hover { background: var(--honey-deep); color: #fff; }
.btn-primary:active { transform: translateY(1px); }

/* Footer / sub copy */
.auth__foot {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.auth__foot a { font-weight: 700; color: var(--honey-deep); text-decoration: none; }
.auth__foot a:hover { text-decoration: underline; }

.auth__legal {
  margin-top: 32px;
  font-size: 11px;
  color: var(--muted-soft);
  letter-spacing: 0.04em;
  text-align: center;
}
.auth__legal a { color: var(--muted); text-decoration: none; }
.auth__legal a:hover { color: var(--dark); text-decoration: underline; opacity: 1; }

/* Alert */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
  background: var(--error-bg);
  color: #721C24;
  border: 1px solid #F5C6CB;
  display: none;
}
.alert.show { display: block; }

/* ============================================================
   App shell — sidebar + main
   ============================================================ */

.app {
  background: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  overflow-y: auto;
  z-index: 20;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
  margin-bottom: 12px;
  color: inherit;
  text-decoration: none;
  opacity: 1;
}
.sidebar__brand:hover { opacity: 1; }
.sidebar__brand img { width: 36px; height: 36px; max-width: 36px; flex: 0 0 36px; display: block; object-fit: contain; }
.sidebar__brand .name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
}
.sidebar__brand .role {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.12s;
}
.nav a:hover { background: var(--cream); opacity: 1; }
.nav a.active { background: var(--dark); color: #fff; font-weight: 700; }
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav .nav-section { padding: 18px 12px 6px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: none; border-radius: 0; margin: 0; }

.sidebar__user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--border-soft);
  cursor: pointer;
  border-radius: 10px;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.12s;
  position: relative;
  user-select: none;
}
.sidebar__user:hover { background: var(--cream); opacity: 1; }
.sidebar__user .chev {
  margin-left: auto;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.sidebar__user .chev svg { width: 16px; height: 16px; }
.sidebar__user .grow { min-width: 0; }
.sidebar__user-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  right: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(58, 39, 22, 0.10);
  padding: 12px;
  z-index: 50;
}
.sidebar__user-pop[hidden] { display: none; }
.sidebar__user-pop .who { display: flex; align-items: center; gap: 12px; padding: 6px 6px 14px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px; }
.sidebar__user-pop .who .nm { font-weight: 700; font-size: 14px; }
.sidebar__user-pop .who .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sidebar__user-pop .menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.sidebar__user-pop .menu-item:hover { background: var(--cream); opacity: 1; }
.sidebar__user-pop .menu-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--muted); }
.sidebar__user-pop .section-title-mini {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 4px;
}
.sidebar__user-pop .switch-list { max-height: 220px; overflow-y: auto; padding: 0; }
.sidebar__user-pop .switch-list .switch-row { width: 100%; }
.sidebar__user-pop .divider { border-top: 1px solid var(--border-soft); margin: 6px 0; }
.sidebar__user .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cream-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: var(--dark);
  flex-shrink: 0;
}
.sidebar__user .avatar.honey { background: var(--honey); }
.sidebar__user .name { font-weight: 700; font-size: 13px; line-height: 1.2; }
.sidebar__user .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Main column */
.main {
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar { display: none; }
.search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border-radius: 10px;
  padding: 9px 14px;
}
.search svg { width: 16px; height: 16px; color: var(--muted); }
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dark);
  outline: none;
}
.search input::placeholder { color: var(--muted-soft); }

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  color: var(--dark);
}
.icon-btn:hover { background: var(--cream); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute; top: 6px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--honey); border: 2px solid #fff;
}
.avatar-pill {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--honey); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; cursor: pointer;
}

.content { padding: 40px; flex: 1; max-width: 1400px; }

/* Page header */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.page-head h1 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 36px;
  margin: 0;
  letter-spacing: -0.5px;
}
.page-head .lede { color: var(--muted); margin-top: 4px; font-size: 15px; }
.page-head__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Buttons (app context) */
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  width: auto;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-sm.btn-dark { background: var(--dark); color: #fff; }
.btn-sm.btn-dark:hover { background: var(--dark-2); }
.btn-sm.btn-honey { background: var(--honey); color: var(--dark); }
.btn-sm.btn-honey:hover { background: var(--honey-deep); color: #fff; }
.btn-sm.btn-outline { background: #fff; color: var(--dark); border: 1px solid var(--border); }
.btn-sm.btn-outline:hover { border-color: var(--dark); }
.btn-sm svg { width: 16px; height: 16px; }

.btn-tiny {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  background: var(--dark);
  color: #fff;
  display: inline-flex; align-items: center; gap: 4px;
}
.btn-tiny:hover { background: var(--dark-2); }

.btn-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.btn-icon:hover { border-color: var(--dark); color: var(--dark); }
.btn-icon svg { width: 16px; height: 16px; }

/* Stat cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
}
.stat .label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat .value {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.5px;
}
.stat .delta { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .delta.up { color: var(--success); }
.stat .delta .pip { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stat .delta .pip.honey { background: var(--honey); }
.stat .delta .pip.error { background: var(--error); }

/* Grid for content panels */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

/* Accordion (stacked, collapsible panels) */
.accordion {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.accordion__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.accordion__head:hover { background: var(--paper); }
.accordion__head h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 22px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.accordion__head .badge {
  background: var(--cream);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.accordion__head .badge.honey { background: rgba(241, 168, 67, 0.22); color: #8a5a13; }
.accordion__head .badge.error { background: rgba(208, 46, 46, 0.12); color: var(--error); }
.accordion__head .right {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}
.accordion__head .chev {
  transition: transform 0.2s;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.accordion__head .chev svg { width: 18px; height: 18px; }
.accordion.open .accordion__head .chev { transform: rotate(180deg); }
.accordion__body {
  display: none;
  padding: 0 26px 24px;
  border-top: 1px solid var(--border-soft);
}
.accordion.open .accordion__body { display: block; padding-top: 16px; }
.accordion__body .subhead { margin-bottom: 12px; }
.accordion__body .tbl th { padding-top: 4px; }
.accordion__head a.action-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--honey-deep);
  text-decoration: none;
}
.accordion__head a.action-link:hover { text-decoration: underline; opacity: 1; }

.panel {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.panel__head h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 22px;
  margin: 0;
}
.panel__head a {
  font-size: 13px; font-weight: 700; color: var(--honey-deep);
  text-decoration: none;
}
.panel__head a:hover { text-decoration: underline; opacity: 1; }

/* Table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-soft);
}
.tbl td {
  padding: 14px 8px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--paper); }
.tbl .dot-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--cream-2); display: inline-block; margin-right: 10px; vertical-align: middle;
}
.tbl .customer-name { font-weight: 600; vertical-align: middle; }
.tbl .arrow { color: var(--muted); }

/* Status pill */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.status .pip { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status.amber { background: rgba(241, 168, 67, 0.18); color: #8a5a13; }
.status.amber .pip { background: var(--honey-deep); }
.status.dark { background: var(--cream-2); color: var(--dark); }
.status.dark .pip { background: var(--dark); }
.status.green { background: rgba(86, 173, 106, 0.16); color: #2c6c3a; }
.status.green .pip { background: var(--success); }
.status.red { background: rgba(208, 46, 46, 0.12); color: var(--error); }
.status.red .pip { background: var(--error); }
.status.muted { background: var(--cream-2); color: var(--muted); }
.status.muted .pip { background: var(--muted-soft); }

/* Side cards */
.subhead {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.list-item:last-child { border-bottom: 0; }
.list-item .thumb {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream-2);
  color: var(--dark);
}
.list-item .thumb.honey { background: var(--honey); }
.list-item .thumb.dark { background: var(--dark); color: #fff; }
.list-item .thumb svg { width: 18px; height: 18px; }
.list-item .body { flex: 1; min-width: 0; }
.list-item .body .ttl { font-weight: 700; font-size: 14px; }
.list-item .body .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-item .action {
  font-size: 13px; font-weight: 700;
  color: var(--honey-deep); text-decoration: none;
}
.list-item .action:hover { text-decoration: underline; opacity: 1; }

.list-foot {
  margin-top: 14px; font-size: 13px; font-weight: 700;
  color: var(--muted);
}

/* Banner / alert strip */
.banner {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.banner svg { width: 20px; height: 20px; color: var(--dark); flex-shrink: 0; }
.banner b { font-weight: 800; }

/* Activity / message feed */
.feed { display: flex; flex-direction: column; gap: 14px; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; }
.feed-item .pip {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 7px; flex-shrink: 0;
}
.feed-item .pip.dark { background: var(--dark); }
.feed-item .pip.honey { background: var(--honey); }
.feed-item .body .ttl { font-weight: 600; font-size: 14px; }
.feed-item .body .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Mobile header */
.mobile-header { display:none; }

@media (max-width: 880px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 19;
  }
  .sidebar-backdrop.show { display: block; }
  .main { margin-left: 0; }
  .mobile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
    position: sticky; top: 0; z-index: 10;
  }
  .mobile-header .hamburger {
    width: 36px; height: 36px; border: none; background: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--dark); border-radius: 8px;
  }
  .mobile-header .hamburger:hover { background: var(--cream); }
  .mobile-header .hamburger svg { width: 22px; height: 22px; }
  .mobile-header .mob-brand {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--dark);
  }
  .mobile-header .mob-brand:hover { opacity: 1; }
  .mobile-header .mob-brand img { width: 28px; height: 28px; max-width: 28px; flex: 0 0 28px; display: block; object-fit: contain; }
  .mobile-header .mob-brand span { font-family: var(--font-heading); font-size: 16px; font-weight: 500; }
  .content { padding: 16px; }
  .page-head { flex-direction: column; gap: 12px; }
  .page-head h1 { font-size: 22px; }
  .page-head__actions { width: 100%; }
  .tbl { font-size: 13px; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .panel { border-radius: 10px; }
  .filterbar { flex-direction: column; gap: 8px; }
  .hide-mobile { display: none !important; }
  .tbl td:first-child, .tbl th:first-child { padding-left: 12px; }
  .tbl td:last-child, .tbl th:last-child { padding-right: 12px; }
}

/* ============================================================
   User menu (topbar avatar dropdown)
   ============================================================ */
.user-menu { position: relative; }
.avatar-pill.cream { background: var(--cream-2); color: var(--dark); }
.user-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 320px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(58, 39, 22, 0.10);
  padding: 14px;
  z-index: 50;
}
.user-menu__head { padding: 6px 6px 14px; border-bottom: 1px solid var(--border-soft); margin-bottom: 10px; }
.user-menu__head .who { display: flex; align-items: center; gap: 12px; }
.user-menu__head .nm { font-weight: 700; font-size: 14px; }
.user-menu__head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.user-menu__section-title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 6px 8px;
}
.user-menu__list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.switch-row {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 0;
  padding: 8px; border-radius: 8px; cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.switch-row:hover { background: var(--cream); }
.switch-row.is-current { background: var(--cream); }
.switch-row .grow { flex: 1; min-width: 0; }
.switch-row .nm { font-weight: 700; font-size: 13px; }
.switch-row .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.switch-row .cur-tag {
  font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--honey-deep);
}
.user-menu__foot { border-top: 1px solid var(--border-soft); margin-top: 10px; padding-top: 10px; }
.logout-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  color: var(--dark); text-decoration: none;
}
.logout-link:hover { background: var(--cream); opacity: 1; }
.logout-link svg { width: 16px; height: 16px; }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  box-shadow: 0 6px 20px rgba(58, 39, 22, 0.2);
}
.toast { display: flex; align-items: center; gap: 10px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast-close { background: none; border: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 0 0 4px; opacity: 0.7; }
.toast-close:hover { opacity: 1; }

/* ============================================================
   Page utilities
   ============================================================ */
.section-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 22px;
  margin: 32px 0 16px;
}
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.spacer-y { height: 16px; }

/* Filter bar */
.filterbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.filterbar .search-mini {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
}
.filterbar .search-mini input { flex: 1; border: 0; outline: none; font: inherit; background: transparent; }
.filterbar .search-mini svg { width: 16px; height: 16px; color: var(--muted); }
.filter-chip {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; font: inherit; font-size: 13px; color: var(--dark);
  appearance: auto; outline: none; cursor: pointer;
}
.filter-chip:focus { border-color: var(--honey); box-shadow: 0 0 0 3px rgba(241, 168, 67, 0.15); }

/* Filter button + popover */
.filter-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 16px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  color: var(--dark);
  cursor: pointer;
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--dark); }
.filter-btn.has-active { border-color: var(--dark); background: var(--dark); color: #fff; }
.filter-btn svg { width: 16px; height: 16px; }
.filter-btn .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--honey);
  color: var(--dark);
  font-weight: 800;
  font-size: 11px;
  margin-left: 2px;
}

.filter-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(58, 39, 22, 0.10);
  padding: 8px;
  min-width: 240px;
  z-index: 50;
}
.filter-pop[hidden] { display: none; }
.filter-pop__group + .filter-pop__group {
  border-top: 1px solid var(--border-soft);
  margin-top: 6px;
  padding-top: 6px;
}
.filter-pop__title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 4px;
}
.filter-pop label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
}
.filter-pop label:hover { background: var(--cream); }
.filter-pop input[type="checkbox"] {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  flex-shrink: 0;
  transition: background 0.1s, border-color 0.1s;
}
.filter-pop input[type="checkbox"]:checked {
  background: var(--dark);
  border-color: var(--dark);
}
.filter-pop input[type="checkbox"]:checked::after {
  content: '';
  width: 10px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.filter-pop__foot {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-soft);
  margin-top: 6px;
  padding: 8px 6px 4px;
}
.filter-pop__foot button {
  background: transparent;
  border: 0;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.filter-pop__foot button:hover { color: var(--dark); background: var(--cream); }
.filter-pop__foot button.primary { color: var(--honey-deep); }

/* Tag */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--cream-2);
  color: var(--dark);
}
.tag.gold   { background: rgba(241, 168, 67, 0.22); color: #8a5a13; }
.tag.silver { background: #e3e1da; color: #5b5750; }
.tag.bronze { background: #efe1d4; color: #7a563a; }
.tag.admin  { background: var(--dark); color: #fff; }

/* Avatar small */
.av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cream-2); color: var(--dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px;
  flex-shrink: 0;
}
.av.honey { background: var(--honey); }
.av.dark  { background: var(--dark); color: #fff; }
.av.sage  { background: #a0ae7a; }
.av.cream { background: var(--cream-2); }

.cell-with-av { display: flex; align-items: center; gap: 10px; }

/* Action icons in tables */
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions button {
  background: transparent; border: 0; padding: 6px;
  border-radius: 6px; cursor: pointer; color: var(--muted);
}
.row-actions button:hover { background: var(--cream-2); color: var(--dark); }
.row-actions svg { width: 16px; height: 16px; display: block; }
.row-actions .danger:hover { background: rgba(208, 46, 46, 0.1); color: var(--error); }

/* Clickable rows */
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: var(--paper); }
.tbl td.arrow { color: var(--muted); text-align: right; }

/* Detail pages */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 12px;
}
.back-link:hover { color: var(--dark); opacity: 1; }
.back-link svg { width: 14px; height: 14px; }

.form-panel { background: #fff; border-radius: 14px; padding: 32px; margin-bottom: 16px; }
.form-panel h3 { font-family: var(--font-heading); font-weight: 500; font-size: 22px; margin: 0 0 4px; }
.form-panel .lede { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.form-row-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-trio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row-pair, .form-row-trio { grid-template-columns: 1fr; } }
.form-panel select {
  width: 100%; padding: 14px 16px;
  border: 1px solid var(--border-soft); border-radius: 10px;
  background: var(--cream-2);
  font: inherit; color: var(--dark); appearance: auto; outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.form-panel select:hover { background: #e7e0cf; }
.form-panel select:focus { background: #fff; border-color: var(--honey); box-shadow: 0 0 0 4px rgba(241, 168, 67, 0.18); }
.form-panel .input-wrap.select-wrap { background: var(--cream); border-radius: 10px; padding: 0; }
.form-panel textarea {
  width: 100%; padding: 14px 16px; border: 0;
  border-radius: 10px; background: var(--cream-2);
  font: inherit; color: var(--dark);
  resize: vertical; min-height: 90px; outline: none;
}
.form-panel textarea:focus { background: #fff; box-shadow: 0 0 0 4px rgba(241, 168, 67, 0.18); }

.detail-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 12px;
}
.detail-foot .spacer { flex: 1; }
.danger-btn {
  background: transparent;
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.danger-btn:hover { background: var(--error); color: #fff; }

/* Image dropzone (used on event editor) */
.img-drop {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  background: var(--cream);
  transition: border-color 0.15s;
}
.img-drop:hover { border-color: var(--honey); }
.img-drop.has-image { padding: 0; aspect-ratio: 16/9; overflow: hidden; }
.img-drop.has-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-drop > svg { width: 24px; height: 24px; margin-bottom: 6px; }

/* Detail header summary (used on order/customer/etc) */
.detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}
.detail-summary .cell + .cell { border-left: 1px solid var(--border-soft); padding-left: 22px; }
.detail-summary .cell { padding-right: 22px; }
.detail-summary .lbl {
  font-family: var(--font-body); font-weight: 800;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.detail-summary .val { font-size: 16px; font-weight: 700; }
@media (max-width: 700px) {
  .detail-summary .cell + .cell { border-left: 0; padding-left: 0; padding-top: 14px; border-top: 1px solid var(--border-soft); margin-top: 14px; }
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(58, 39, 22, 0.5);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 28px 28px 24px;
}
.modal h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 4px;
}
.modal .lede { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal .field input,
.modal .field select {
  background: var(--cream);
  padding-left: 16px;
}

/* Permissions list */
.perm-list { display: flex; flex-direction: column; gap: 8px; }
.perm-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--cream);
  border-radius: 10px;
}
.perm-row .lbl { font-size: 14px; font-weight: 600; }
.perm-row .lbl .h { font-weight: 700; }
.perm-row .lbl .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px; height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #d9d9d9;
  border-radius: 999px;
  transition: 0.2s;
}
.switch .slider::before {
  content: '';
  position: absolute;
  height: 16px; width: 16px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.switch input:checked + .slider { background: var(--honey); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* Empty state */
.empty {
  background: #fff;
  border-radius: 14px;
  padding: 64px 32px;
  text-align: center;
}
.empty h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 6px;
}
.empty p { color: var(--muted); margin: 0 0 20px; }

/* Two-pane (messages) */
.split {
  display: grid;
  grid-template-columns: 360px 1fr;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  min-height: 560px;
}
.split__list { border-right: 1px solid var(--border-soft); overflow-y: auto; max-height: 70vh; }
.split__item {
  padding: 14px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  display: flex; gap: 12px; align-items: flex-start;
}
.split__item:hover { background: var(--cream); }
.split__item.active { background: var(--cream); border-left: 3px solid var(--honey); padding-left: 15px; }
.split__item .body { flex: 1; min-width: 0; }
.split__item .nm { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; align-items: baseline; }
.split__item .nm .t { font-size: 11px; color: var(--muted); font-weight: 500; }
.split__item .pv { font-size: 13px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split__item.unread .nm::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--honey);
  margin-right: 8px;
  vertical-align: middle;
}
.split__pane {
  display: flex; flex-direction: column;
  padding: 24px;
}
.split__pane .convo {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 8px;
}
.bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
}
.bubble.them { background: var(--cream); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.us   { background: var(--dark); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble .meta { font-size: 11px; color: var(--muted); margin-top: 6px; }
.bubble.us .meta { color: rgba(255,255,255,0.6); }
.compose {
  display: flex; gap: 10px;
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
}
.compose input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  background: var(--cream);
}
.compose input:focus { outline: none; border-color: var(--honey); background: #fff; }

@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } .split__list { max-height: 320px; border-right: 0; border-bottom: 1px solid var(--border-soft); } }

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.settings-tile {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  text-decoration: none;
  color: var(--dark);
  display: block;
  transition: transform 0.1s, box-shadow 0.15s;
}
.settings-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(58, 39, 22, 0.08); opacity: 1; }
.settings-tile .ic {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--cream);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.settings-tile .ic svg { width: 20px; height: 20px; }
.settings-tile h3 { font-family: var(--font-heading); font-weight: 500; font-size: 18px; margin: 0 0 4px; }
.settings-tile p { color: var(--muted); font-size: 13px; margin: 0; }
