/* =========================================================
   Plantr brand styles
   Loaded after Pico CSS in base.html, so anything here wins.
   ========================================================= */

/* ---------- 1. Brand colours ----------
   "Custom properties" (--name) are reusable values. Change a colour
   here and it changes everywhere it's used. */
:root {
  --forest: #1B2B24;
  --forest-hover: #2A4136;
  --leaf: #6B8F5A;
  --leaf-soft: #E4ECDF;
  --gold: #C69D2A;
  --gold-soft: #F6EDD3;
  --cream: #F7F5F2;
  --charcoal: #333333;
  --line: #E6E2DA;      /* soft borders */
  --white: #FFFFFF;
}

/* ---------- 2. Point Pico CSS at our brand ----------
   Pico builds every button, link and input from these variables.
   The selector matches Pico's own, so ours (loaded later) takes over. */
:root:not([data-theme=dark]), [data-theme=light] {
  --pico-font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pico-background-color: var(--cream);
  --pico-color: var(--charcoal);
  --pico-muted-color: #6E6E6E;
  --pico-muted-border-color: var(--line);
  --pico-h1-color: var(--forest);
  --pico-h2-color: var(--forest);
  --pico-h3-color: var(--forest);

  --pico-primary: var(--forest);
  --pico-primary-background: var(--forest);
  --pico-primary-border: var(--forest);
  --pico-primary-underline: rgba(27, 43, 36, .35);
  --pico-primary-hover: var(--leaf);
  --pico-primary-hover-background: var(--forest-hover);
  --pico-primary-hover-border: var(--forest-hover);
  --pico-primary-hover-underline: var(--leaf);
  --pico-primary-focus: rgba(107, 143, 90, .35);
  --pico-primary-inverse: var(--cream);

  --pico-secondary: #5F6B64;
  --pico-secondary-background: #5F6B64;
  --pico-secondary-border: #C9CEC9;
  --pico-secondary-hover: var(--forest);
  --pico-secondary-hover-background: var(--forest);
  --pico-secondary-hover-border: var(--forest);

  --pico-card-background-color: var(--white);
  --pico-card-sectioning-background-color: var(--cream);
  --pico-card-box-shadow: 0 1px 2px rgba(27, 43, 36, .04), 0 4px 16px rgba(27, 43, 36, .05);
  --pico-border-radius: .65rem;

  --pico-form-element-background-color: var(--white);
  --pico-form-element-border-color: var(--line);
  --pico-form-element-focus-color: var(--leaf);
  --pico-table-border-color: var(--line);
}

body { background: var(--cream); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; font-weight: 600; }

/* ---------- 3. App layout: dark sidebar + page area ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--forest);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1rem;
  position: sticky;   /* stays put while the page scrolls */
  top: 0;
  height: 100vh;
}
.sidebar-logo { display: block; padding: 0 .75rem 1.5rem; }
.sidebar-logo img { width: 128px; height: auto; display: block; }

.sidebar nav, .sidebar nav ul { display: block; }
.sidebar nav ul { padding: 0; margin: 0; }
.sidebar nav li { display: block; padding: 0; margin: 0 0 .25rem; list-style: none; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0;
  padding: .65rem .75rem;
  border-radius: .5rem;
  color: rgba(247, 245, 242, .75);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
}
.sidebar nav a:hover { background: rgba(247, 245, 242, .07); color: var(--cream); }
.sidebar nav a.active { background: rgba(107, 143, 90, .3); color: var(--cream); }
.sidebar svg { width: 1.15rem; height: 1.15rem; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;   /* pushes this to the bottom of the sidebar */
  padding: 1rem .75rem 0;
  border-top: 1px solid rgba(247, 245, 242, .12);
  font-size: .85rem;
  color: rgba(247, 245, 242, .7);
}
.sidebar-footer form { margin: .5rem 0 0; }
.sidebar-footer button {
  width: auto;
  margin: 0;
  padding: .35rem .8rem;
  font-size: .85rem;
  background: transparent;
  border: 1px solid rgba(247, 245, 242, .3);
  color: var(--cream);
}
.sidebar-footer button:hover { background: rgba(247, 245, 242, .1); border-color: var(--cream); }

.app-main {
  flex: 1;
  min-width: 0;       /* lets wide tables scroll instead of stretching the page */
  padding: 2.5rem 3rem;
  max-width: 1150px;
}

/* ---------- 4. Page header: title, subtitle and buttons ---------- */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.page-header h1 { margin: 0; }
.page-header p { margin: .25rem 0 0; color: var(--pico-muted-color); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.actions [role=button], .actions button { margin: 0; }

/* Small gold line from the brand board, used under headings */
.gold-rule { width: 56px; height: 2px; background: var(--gold); border: 0; margin: .9rem 0 0; }

/* ---------- 5. Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--pico-border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.card > h2:first-child { margin-top: 0; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-header h2 { margin: 0; }

/* Dashboard number tiles */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card { margin: 0; padding: 1.25rem 1.5rem; }
.stat-value { font-size: 1.9rem; font-weight: 700; color: var(--forest); line-height: 1.1; }
.stat-label { font-size: .85rem; color: var(--pico-muted-color); margin-top: .35rem; }

/* Two columns of cards side by side on wide screens */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.grid-2 > .card { margin-bottom: 0; }

/* Label / value pairs, e.g. on a booking page */
/* minmax(0, 1fr): the value column may shrink to fit the card (a plain 1fr grows to fit long text) */
.details { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .55rem 1rem; margin: 0; }
.details dt { color: var(--pico-muted-color); font-size: .9rem; font-weight: 500; }
.details dd { margin: 0; overflow-wrap: anywhere; }  /* long emails and addresses wrap onto the next line */

/* ---------- 6. Tables ---------- */
.table-wrap { overflow-x: auto; }   /* wide tables scroll sideways on phones */
.table-wrap table { margin: 0; }
table th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pico-muted-color);
  font-weight: 600;
}
table td, table th { background: transparent; }
table a { text-decoration: none; font-weight: 600; }
table a:hover { text-decoration: underline; }
table small { color: var(--pico-muted-color); }
.empty { color: var(--pico-muted-color); text-align: center; padding: 1.5rem; }

/* ---------- 7. Status badges ---------- */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-enquiry   { background: var(--gold-soft); color: #8A6A12; }
.badge-quoted    { background: var(--leaf-soft); color: #45633A; }
.badge-confirmed { background: var(--forest); color: var(--cream); }
.badge-completed { background: #ECECEA; color: var(--charcoal); }
.badge-cancelled { background: #F4E1DE; color: #9B3B30; }

/* ---------- 8. Messages (success / warning) ---------- */
.flash {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--leaf);
  border-radius: .5rem;
  padding: .85rem 1.1rem;
  margin-bottom: 1.25rem;
}
.flash-warning { border-left-color: var(--gold); background: #FFFBF0; }

/* ---------- 9. Forms ---------- */
.form-card { max-width: 720px; }
.form-card button[type=submit] { width: auto; }
.form-buttons { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .5rem; }
.form-buttons > * { margin: 0; }
.danger-zone { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
button.danger, [role=button].danger { background: #9B3B30; border-color: #9B3B30; color: var(--white); }
button.danger:hover { background: #7E2F26; border-color: #7E2F26; }

/* ---------- 10. Login page: brand panel + form ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-brand {
  background: var(--forest);
  color: var(--cream);
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
/* The thin gold arc and star from the brand board */
.auth-brand::after {
  content: "";
  position: absolute;
  right: -40%;
  bottom: -55%;
  width: 120%;
  aspect-ratio: 1;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  opacity: .7;
}
.auth-brand img { width: 150px; position: relative; z-index: 1; }
.tagline {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.3;
  color: var(--cream);
  margin: 0;
}
.tagline-sub { color: rgba(247, 245, 242, .7); margin-top: 1rem; }
.star { color: var(--gold); font-size: 1.6rem; position: relative; z-index: 1; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-form > div { width: 100%; max-width: 380px; }

/* ---------- 11. Public pages (enquiry form) ---------- */
.public { max-width: 680px; margin: 0 auto; padding: 3rem 1rem 2rem; }
.public .card { padding: 2rem 2.25rem; }
.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--pico-muted-color);
  margin-top: 1.5rem;
}
.powered-by img { height: 22px; width: auto; }

/* ---------- 12. Bookings: List | Calendar switch ---------- */
.view-toggle {
  display: inline-flex;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: .6rem;
  padding: 3px;
}
.view-toggle a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border-radius: .45rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--pico-secondary);
  text-decoration: none;
}
.view-toggle a:hover { color: var(--forest); }
.view-toggle a.active { background: var(--forest); color: var(--cream); }
.view-toggle svg { width: 1rem; height: 1rem; }

/* Sort by dropdown + ascending/descending button above the bookings list */
.sort-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.sort-bar label { margin: 0; font-size: .9rem; font-weight: 500; color: var(--pico-muted-color); }
.sort-bar select { width: auto; margin: 0; padding-top: .45rem; padding-bottom: .45rem; font-size: .9rem; }
.sort-bar [role=button] { margin: 0; padding: .45rem .9rem; font-size: .9rem; }

/* Smaller button, e.g. "Customise" in a card header */
.small-button { margin: 0; padding: .35rem .85rem; font-size: .85rem; }

/* Enquiry link editor: the fixed start of the link joined to the text box */
.link-input { display: flex; align-items: stretch; margin-bottom: .35rem; }
.link-input span {
  display: flex;
  align-items: center;
  padding: 0 .75rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--pico-border-radius) 0 0 var(--pico-border-radius);
  color: var(--pico-muted-color);
  font-size: .9rem;
  white-space: nowrap;
}
.link-input input { margin: 0; border-radius: 0 var(--pico-border-radius) var(--pico-border-radius) 0; }
.link-preview { margin-top: 1rem; overflow-wrap: anywhere; }

/* ---------- 13. Month calendar ---------- */
.calendar-card { padding: 1.25rem; }
.calendar-nav { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.calendar-nav h2 { margin: 0; min-width: 11rem; text-align: center; }
.calendar-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
  color: var(--forest);
}
.calendar-arrow:hover { background: var(--cream); }
.calendar-today-link { margin-left: auto; font-size: .9rem; font-weight: 600; }

/* 7 equal columns, one per weekday. minmax(0, 1fr) stops long names stretching a column. */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.calendar-dayname {
  padding: .5rem;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pico-muted-color);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}
.calendar-day {
  min-height: 6.5rem;
  padding: .35rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.calendar-day.other-month { background: #FAF9F7; }
.calendar-day.other-month .calendar-date { color: #B5B5B0; }
.calendar-day-top { display: flex; justify-content: space-between; align-items: center; }
.calendar-date {
  font-size: .85rem;
  font-weight: 600;
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.calendar-day.today .calendar-date { background: var(--gold); color: var(--white); }
.calendar-add {
  opacity: 0;            /* only shows when you hover over the day */
  text-decoration: none;
  font-weight: 600;
  color: var(--leaf);
  padding: 0 .35rem;
}
.calendar-day:hover .calendar-add, .calendar-add:focus { opacity: 1; }
.calendar-event {
  display: block;
  padding: .2rem .45rem;
  border-radius: .35rem;
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;  /* long names end in "..." */
}
.calendar-event:hover { filter: brightness(.95); text-decoration: none; }
.calendar-time { font-weight: 500; opacity: .8; margin-right: .2rem; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* ---------- 14. Phones and small tablets ---------- */
@media (max-width: 800px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: .75rem 1rem;
    gap: .5rem;
  }
  .sidebar-logo { padding: 0 .5rem 0 0; }
  .sidebar-logo img { width: 88px; }
  .sidebar nav { flex: 1; }
  .sidebar nav ul { display: flex; gap: .25rem; }
  .sidebar nav li { margin: 0; }
  .sidebar nav a { padding: .45rem .6rem; font-size: .85rem; }
  .sidebar nav a span { display: none; }   /* icons only, to save room */
  .sidebar-footer { margin: 0; padding: 0; border: 0; }
  .sidebar-footer .who { display: none; }
  .sidebar-footer form { margin: 0; }
  .app-main { padding: 1.5rem 1rem; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }  /* tiles two per row */
  .stat-card { padding: 1rem; }
  .stat-value { font-size: 1.5rem; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 2rem 1.5rem; min-height: 220px; }
  .details { grid-template-columns: 7rem minmax(0, 1fr); }
  .public .card { padding: 1.5rem 1.25rem; }
  /* Link editor on a phone: hide the fixed part (the preview below shows the full link) */
  .link-input span { display: none; }
  .link-input input { border-radius: var(--pico-border-radius); }
  /* Calendar on a phone: smaller squares; bookings become coloured bars */
  .calendar-card { padding: .75rem; }
  .calendar-nav h2 { min-width: 0; font-size: 1.05rem; }
  .calendar-dayname { padding: .35rem .15rem; font-size: .6rem; letter-spacing: 0; text-align: center; }
  .calendar-day { min-height: 4rem; padding: .2rem; }
  .calendar-date { font-size: .75rem; width: 1.4rem; height: 1.4rem; }
  .calendar-add { display: none; }
  .calendar-event { font-size: .62rem; padding: .1rem .25rem; }
  .calendar-time { display: none; }
}

/* ---------- 15. Enquiries / bookings extras ---------- */
/* Small label above a page title, e.g. "ENQUIRY" */
.eyebrow {
  margin: 0 0 .2rem !important;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold) !important;
}
.muted { color: var(--pico-muted-color); }
.row-action { text-align: right; white-space: nowrap; }
.row-action .small-button { padding: .3rem .7rem; font-size: .8rem; }
.table-wrap td:first-child { white-space: nowrap; }  /* keep "16 Oct 2026" on one line */
.table-wrap th, .table-wrap td { padding-left: .6rem; padding-right: .6rem; }
.sort-check { display: inline-flex; align-items: center; gap: .4rem; margin-left: .5rem !important; cursor: pointer; }
.sort-check input { margin: 0; }

/* "Change status" drop-down menu */
.status-menu { margin: 0; position: relative; }
.status-menu summary[role=button] { margin: 0; padding: .55rem 1rem; }
.status-menu ul { min-width: 15rem; right: 0; left: auto; padding: .35rem; }
.status-menu li { padding: 0; list-style: none; }
.status-menu form { margin: 0; }
.status-menu li button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  margin: 0;
  padding: .45rem .5rem;
  background: none;
  border: 0;
  color: var(--charcoal);
  text-align: left;
  font-size: .85rem;
}
.status-menu li button:hover:not(:disabled) { background: var(--cream); }
.status-menu li button:disabled { opacity: .6; cursor: default; }
.status-menu small { color: var(--pico-muted-color); }

/* ---------- 16. Edit quote: Package | Item | Price lines ---------- */
.form-card.quote-editor { max-width: 960px; }   /* wider than other forms, for the 3 columns */
.quote-editor h2 { margin-top: 1.5rem; }
.quote-editor h2:first-of-type { margin-top: 0; }
.quote-lines-head, .quote-line {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr 9rem auto;
  gap: .6rem;
  align-items: start;
}
.quote-lines-head {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pico-muted-color);
  margin-bottom: .35rem;
}
.quote-line { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.quote-line select, .quote-line input { margin: 0; }
.quote-line .errorlist { margin: .25rem 0 0; padding: 0; list-style: none; color: #9B3B30; font-size: .8rem; }
.quote-line-remove button { margin: 0; padding: .55rem .8rem; font-size: .85rem; }
.mobile-label { display: none; }
.quote-lines-foot { display: flex; justify-content: space-between; align-items: center; margin: .9rem 0 .5rem; }
.quote-total { font-size: 1.1rem; }
.quote-total strong { color: var(--forest); }

@media (max-width: 800px) {
  .quote-lines-head { display: none; }
  .quote-line { grid-template-columns: 1fr; padding: .9rem 0; }
  .mobile-label { display: block; font-size: .8rem; margin-bottom: .2rem; color: var(--pico-muted-color); }
}

/* ---------- 17. Settings tabs ---------- */
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  border-bottom: 1px solid var(--line);
  margin: -.5rem 0 1.5rem;
}
.settings-tabs a {
  padding: .6rem 1rem;
  margin-bottom: -1px;            /* sit on top of the grey line */
  border-bottom: 2px solid transparent;
  color: var(--pico-muted-color);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
}
.settings-tabs a:hover { color: var(--forest); }
.settings-tabs a.active { color: var(--forest); border-bottom-color: var(--gold); }
.settings-grid { align-items: start; }
.settings-grid code { font-size: .8rem; background: var(--cream); padding: .1rem .35rem; border-radius: .3rem; }

/* ---------- 18. Wedding planner ---------- */
.planner-form { padding-bottom: 5rem; }   /* room for the save bar */
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.planner-head, .planner-row { display: grid; gap: .5rem; align-items: start; }
.timeline-row { grid-template-columns: 1.5rem 7rem 1.8fr 2fr auto; }
/* Notes start one line tall and grow with what's typed (field-sizing: content) */
.timeline-row textarea { field-sizing: content; min-height: 2.4rem; max-height: 12rem; resize: vertical; line-height: 1.35; }
/* Song rows: Moment | Song | Artist, or Song | Artist, or Guest | Song | Artist (the Spotify link is hidden) */
.song-row-moment { grid-template-columns: 1.2fr 1.8fr 1.4fr auto; }
.song-row-list { grid-template-columns: 1.8fr 1.4fr auto; }
.song-row-guest { grid-template-columns: 1.2fr 1.7fr 1.3fr auto; }
.moment-name input { font-weight: 600; background: var(--cream); }
.planner-head {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pico-muted-color);
  margin-bottom: .3rem;
}
.planner-row { padding: .3rem 0; }
.planner-row input, .planner-row select, .planner-row textarea { margin: 0; padding-top: .45rem; padding-bottom: .45rem; font-size: .9rem; }
.planner-row .errorlist { margin: .2rem 0 0; padding: 0; list-style: none; color: #9B3B30; font-size: .8rem; }
.row-remove { margin: 0; padding: .35rem .7rem; font-size: 1.1rem; line-height: 1; }
.add-row { margin-top: .75rem; }
.lock-toggle { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; font-weight: 500; }
.lock-toggle input { margin: 0; }

/* The Save bar sticks to the bottom of the window while you scroll */
.save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: .5rem;
  padding: .85rem 1rem;
  margin: 0 -1rem;
  background: rgba(247, 245, 242, .95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.save-bar > *, .save-bar button[type=submit] { margin: 0; width: auto; }

@media (max-width: 800px) {
  .field-pair { grid-template-columns: 1fr; }
  .planner-head { display: none; }
  .timeline-row, .song-row { grid-template-columns: 1fr; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .row-remove { justify-self: start; }
}

/* ---------- 19. Rows of same-sized buttons ----------
   e.g. Planner | Quote | Change status | Edit, and the planner's tabs.
   A grid with "1fr" columns makes every button as wide as the widest one. */
.button-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);   /* equal widths, even with a long label */
  gap: .5rem;
}
.button-row > a[role=button],
.button-row > button,
.button-row > details > summary[role=button] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.9rem;
  margin: 0;
  padding: 0 1.1rem;
  font-size: .95rem;
  line-height: 1;
  white-space: nowrap;
}
.button-row > details { margin: 0; }
.button-row > details > summary::after { margin-left: .5rem; }  /* the little arrow */

/* Planner tabs sit above the sections. Long names wrap onto two lines;
   the grid keeps every tab the same height. */
.planner-tabs { margin-bottom: 1.25rem; }
.planner-tabs > button { height: auto; min-height: 2.9rem; white-space: normal; line-height: 1.2; text-align: center; }

@media (max-width: 800px) {
  /* Two buttons per row on phones */
  .button-row { grid-auto-flow: row; grid-template-columns: 1fr 1fr; width: 100%; }
}

/* Run sheet drag handle (the dotted grip on the left of each line) */
.drag-handle {
  cursor: grab;
  user-select: none;
  color: var(--pico-muted-color);
  font-size: 1.1rem;
  letter-spacing: -.35em;
  line-height: 2.4rem;
  text-align: center;
}
.drag-handle:hover { color: var(--forest); }
.drag-ghost { opacity: .35; background: var(--leaf-soft); border-radius: .5rem; }
.row-buttons { display: flex; gap: .5rem; margin-top: .75rem; }
.row-buttons > button { margin: 0; width: auto; }
@media (max-width: 800px) {
  .timeline-row { position: relative; padding-left: 2rem; }
  .timeline-row .drag-handle { position: absolute; left: 0; top: .75rem; }
}

/* The smaller tabs inside the planner's Songs tab */
.song-tabs { margin-bottom: 1rem; }
.song-tabs > button {
  height: auto;
  min-height: 2.4rem;
  font-size: .85rem;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

/* Guest request link with a Copy button */
.link-copy { display: flex; gap: .5rem; margin: 1rem 0 .5rem; }
.link-copy input { margin: 0; font-size: .85rem; background: var(--cream); }
.link-copy button { margin: 0; width: auto; white-space: nowrap; }
.guest-logo { max-height: 90px; max-width: 200px; display: block; margin: 0 auto 1rem; }

/* The planner's sections sit inside a <fieldset> (so a locked planner can be made read-only) */
.planner-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.planner-fieldset[disabled] input, .planner-fieldset[disabled] select, .planner-fieldset[disabled] textarea { opacity: .8; }
.planner-fieldset[disabled] .row-remove, .planner-fieldset[disabled] [data-add],
.planner-fieldset[disabled] #sort-by-time, .planner-fieldset[disabled] .drag-handle { display: none; }

/* Couple's portal logins on a booking page */
.portal-login { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .6rem 0; border-top: 1px solid var(--line); }
.portal-login-actions { display: flex; gap: .4rem; }
.portal-login-actions form { margin: 0; }
.portal-login-actions button { margin: 0; width: auto; }

/* ---------- 20. Couples' portal ---------- */
.portal { background: var(--cream); min-height: 100vh; }
.portal-serif, .portal-hero h1, .wedding-card h2, .ask-title,
.portal-planner section.card > h2 {
  font-family: "Cormorant Garamond", Georgia, serif;   /* the elegant font for names and headings */
}

/* The hero banner across the top */
.portal-hero {
  position: relative;
  overflow: hidden;
  min-height: 290px;
  padding: 3.25rem clamp(1.5rem, 5vw, 4.5rem) 3rem;
  display: flex;
  align-items: center;
  background: linear-gradient(100deg, #FCFBF8 0%, #F5F1E9 55%, #ECE5D8 100%);
  border-bottom: 1px solid var(--line);
}
/* With a cover photo: the photo on the right, fading to cream on the left so the words stay readable */
.portal-hero.has-cover {
  background:
    linear-gradient(90deg, rgba(252, 251, 248, .98) 0%, rgba(252, 251, 248, .9) 32%, rgba(252, 251, 248, .15) 68%, rgba(252, 251, 248, 0) 100%),
    var(--cover) center / cover no-repeat;
}
/* Without one: botanical sprigs drawn in the corner */
.hero-sprig { position: absolute; pointer-events: none; }
.hero-sprig-a { height: 330px; right: 24%; bottom: -70px; opacity: .45; transform: rotate(-20deg); }
.hero-sprig-b { height: 240px; right: 9%; top: -50px; opacity: .3; transform: rotate(155deg); }

.hero-text { position: relative; z-index: 1; max-width: 36rem; }
.hero-eyebrow {
  margin: 0;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #5d5d5d;
}
.portal-hero h1 {
  margin: .35rem 0 .7rem;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 600;
  line-height: 1.02;
  color: var(--forest);
}
.hero-lead { margin: 0; max-width: 30rem; color: #474747; font-size: 1.02rem; line-height: 1.55; }

/* Top-right corner: the DJ's logo on a soft white card, with Log out under it */
.hero-corner {
  position: absolute;
  top: 1.25rem;
  right: clamp(1rem, 3vw, 2.5rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
}
.hero-logo {
  display: block;
  padding: .55rem .8rem;
  background: rgba(255, 255, 255, .88);
  border-radius: .9rem;
  box-shadow: 0 4px 18px rgba(27, 43, 36, .08);
  backdrop-filter: blur(4px);
}
.hero-logo img { height: 112px; width: auto; max-width: 220px; display: block; object-fit: contain; }
.hero-logo span { font-weight: 700; font-size: 1.2rem; color: var(--accent); }
.hero-corner form { margin: 0; }
.hero-logout {
  margin: 0;
  width: auto;
  padding: .2rem .6rem;
  background: none;
  border: 0;
  color: #5d5d5d;
  font-size: .78rem;
  text-decoration: underline;
}
.hero-logout:hover { background: none; color: var(--forest); }

/* Page body: planner on the left, wedding card and tracker on the right */
.portal-main { max-width: 1240px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.portal-side { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 1.25rem; }

/* The note at the top (when it locks), with a sprig and a close button */
.portal-note {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  background: #EEF2EA;
  border: 1px solid #DCE5D5;
  border-radius: .8rem;
  font-size: .92rem;
}
.portal-note.is-warning { background: #FBF4E2; border-color: #EBDDB5; }
.portal-note img { height: 36px; flex-shrink: 0; }
.portal-note p { margin: 0; }
.note-close {
  margin: 0 0 0 auto;
  padding: 0 .25rem;
  width: auto;
  background: none;
  border: 0;
  color: #777;
  font-size: 1.3rem;
  line-height: 1;
}
.note-close:hover { background: none; color: var(--forest); }

/* Your booking */
.portal-booking { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; align-items: start; }
.portal-booking > dl { border-left: 1px solid var(--line); padding-left: 1.75rem; }
.booking-package { font-weight: 600; font-size: 1.05rem; margin: .75rem 0 0; color: var(--forest); }
.booking-service { margin: 0 0 .75rem; font-size: .9rem; }
.booking-quote-link { font-size: .9rem; font-weight: 500; }
.money-list { grid-template-columns: 6.5rem 1fr; }  /* narrower labels so amounts don't wrap */
.money-list dd small { display: block; }

/* The planner inside the portal */
.portal-planner .planner-tabs { margin-top: .25rem; }
.tab-icon { width: 1.05rem; height: 1.05rem; margin-right: .45rem; flex-shrink: 0; }
.portal-planner section.card > h2 { font-size: 1.65rem; font-weight: 600; display: flex; align-items: center; gap: .55rem; margin-bottom: .1rem; }
/* A small sprig in front of each section's heading */
.portal-planner section.card > h2::before {
  content: "";
  width: 1.4rem;
  height: 1.8rem;
  background: url("../img/sprig.f5bedcaa590c.svg") no-repeat center / contain;
  flex-shrink: 0;
}
.section-sub { margin: 0 0 1rem; }

/* Right column cards */
.side-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: .9rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(27, 43, 36, .04);
}
.wedding-card-top {
  padding: 1.5rem 1.5rem 1.35rem;
  background: linear-gradient(135deg, #F7F2E9 0%, #EEE6D7 100%);
}
.wedding-card-top.has-cover {
  background:
    linear-gradient(90deg, rgba(247, 242, 233, .97) 45%, rgba(247, 242, 233, .55) 100%),
    var(--cover) center / cover no-repeat;
}
.wedding-card h2 { margin: .2rem 0 .8rem; font-size: 2.1rem; font-weight: 600; color: var(--forest); line-height: 1.05; }
.wedding-facts { list-style: none; margin: 0; padding: 0; }
.wedding-facts li { display: flex; align-items: center; gap: .55rem; margin: 0 0 .35rem; font-size: .9rem; color: #444; list-style: none; }
.wedding-facts svg { width: 1rem; height: 1rem; flex-shrink: 0; color: #666; }
.wedding-rule { display: block; width: 42px; height: 2px; margin-top: 1rem; background: var(--accent); }

/* The tracker: dots joined by a line */
.tracker { list-style: none; margin: 0; padding: 1.15rem 1.5rem 1.35rem; }
.tracker-step { list-style: none; margin: 0; padding: 0; position: relative; }
.tracker-step a { display: flex; align-items: flex-start; gap: .9rem; padding: .55rem 0; color: inherit; text-decoration: none; }
.tracker-step a:hover strong { color: var(--leaf); }
.tracker-step:not(:last-child)::after {   /* the line down to the next dot */
  content: "";
  position: absolute;
  left: calc(.8rem - 1px);
  top: 2.6rem;
  bottom: -.5rem;
  width: 2px;
  background: var(--line);
}
.tracker-step.is-done:not(:last-child)::after { background: var(--forest); opacity: .35; }
.tracker-dot {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 2px solid #E3C77A;   /* not started: soft gold */
}
.tracker-dot svg { width: .95rem; height: .95rem; }
.is-done .tracker-dot { background: var(--forest); border-color: var(--forest); color: var(--white); }
.is-started .tracker-dot { border-color: var(--forest); box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 12px var(--leaf-soft); }
.tracker-step strong { display: block; font-size: .95rem; font-weight: 600; }
.tracker-step small { display: block; font-size: .78rem; color: var(--pico-muted-color); }

/* Questions? We're here to help. */
.ask-card {
  position: relative;
  padding: 1.6rem 1.5rem 1.75rem;
  background: linear-gradient(135deg, #F0F1EA 0%, #E3E8DB 100%);
}
.ask-sprig { position: absolute; right: -6px; bottom: -24px; height: 150px; opacity: .9; transform: rotate(-28deg); pointer-events: none; }
.ask-title { position: relative; z-index: 1; margin: 0 0 1.1rem; font-size: 1.45rem; font-style: italic; color: var(--forest); line-height: 1.25; }
.ask-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1.15rem;
  background: var(--white);
  border: 1px solid #C9CFC3;
  border-radius: 999px;
  color: var(--charcoal);
  font-weight: 500;
  font-size: .92rem;
  text-decoration: none;
}
.ask-button:hover { border-color: var(--forest); color: var(--forest); }
.ask-button svg { width: 1.1rem; height: 1.1rem; }

/* A small round count, e.g. unread messages */
.nav-count {
  display: inline-block;
  min-width: 1.35rem;
  margin-left: auto;
  padding: .05rem .4rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
}

/* Choosing between several events */
.portal-event { display: flex; flex-direction: column; gap: .25rem; text-decoration: none; color: inherit; }
.portal-event:hover { border-color: var(--leaf); }

@media (max-width: 1000px) {
  .portal-grid { grid-template-columns: 1fr; }
  .portal-side { position: static; }
}
@media (max-width: 800px) {
  .portal-hero { flex-direction: column; align-items: flex-start; min-height: 0; padding: 1rem 1.25rem 2rem; }
  .hero-corner { position: static; align-self: flex-end; margin-bottom: .5rem; }
  .hero-logo img { height: 72px; }
  .portal-main { padding: 1.25rem 1rem 2rem; }
  .portal-booking { grid-template-columns: 1fr; }
  .portal-booking > dl { border-left: 0; padding-left: 0; }
}

/* ---------- Messages (chat) ---------- */
.chat { display: flex; flex-direction: column; gap: .75rem; max-height: 60vh; overflow-y: auto; padding: .25rem 0 1rem; }
.chat-row { display: flex; }
.chat-row.mine { justify-content: flex-end; }
.chat-bubble {
  max-width: 78%;
  padding: .7rem 1rem;
  border-radius: 1rem;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: .95rem;
  line-height: 1.45;
}
.chat-row.theirs .chat-bubble { border-bottom-left-radius: .3rem; }
.chat-row.mine .chat-bubble { background: var(--forest); border-color: var(--forest); color: var(--cream); border-bottom-right-radius: .3rem; }
.chat-meta { font-size: .72rem; opacity: .75; margin-bottom: .2rem; }
.chat-empty { text-align: center; padding: 1.5rem 0; }
.chat-form { display: flex; gap: .5rem; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 1rem; }
.chat-form textarea { margin: 0; field-sizing: content; min-height: 2.8rem; max-height: 10rem; }
.chat-form button { margin: 0; width: auto; }

/* The DJ's Inbox list */
.inbox-list { padding: .25rem 1.25rem; }
.inbox-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem .25rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: var(--cream); }
.inbox-row.unread strong { color: var(--forest); }
.inbox-preview { color: var(--pico-muted-color); font-size: .9rem; margin-top: .15rem; }
.inbox-row.unread .inbox-preview { color: var(--charcoal); font-weight: 500; }
.inbox-when { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; white-space: nowrap; color: var(--pico-muted-color); }

/* ---------- 21. Terms & payments ---------- */
.mini-heading {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--pico-muted-color);
  margin: 0 0 .6rem;
}
/* Terms and conditions, as laid out by the format_terms filter */
.terms-box { max-height: 26rem; overflow-y: auto; padding: 1rem 1.25rem; background: var(--cream); border: 1px solid var(--line); border-radius: .5rem; font-size: .88rem; line-height: 1.55; }
.terms-box h3 { font-size: 1.05rem; margin: 0 0 .75rem; }
.terms-box h4 { font-size: .92rem; margin: .9rem 0 .35rem; }
.terms-box p { margin: 0 0 .5rem; }
.terms-box ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.terms-box li { margin-bottom: .25rem; list-style: disc; }
.terms-section { margin-bottom: .6rem; }
.terms-copy { margin-top: .5rem; }
.terms-copy summary { font-size: .85rem; cursor: pointer; }

/* Tick boxes stay square (the brand's rounded corners otherwise make them circles,
   which look like "pick one" buttons). Switches (role="switch") keep their shape. */
input[type="checkbox"]:not([role="switch"]) { border-radius: .3rem; }

/* The portal's Pay button */
.portal-pay { margin: 1rem 0 0; }
.portal-pay button { width: auto; margin: 0; }

/* ---------- 22. Bookkeeping ---------- */
.expenses-grid { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); align-items: start; }
.gst-toggle { margin-top: 1.9rem; }
.gst-preview { margin: .35rem 0 0; font-weight: 600; color: var(--forest); font-size: .9rem; }
.receipt-link { font-size: .85rem; text-decoration: none; }
.expenses-grid .details { grid-template-columns: 1fr auto; }
@media (max-width: 1100px) { .expenses-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .gst-toggle { margin-top: 0; } }

/* Profit & loss: months/quarters table */
.sort-bar form { display: contents; }   /* the year picker sits in the bar like the toggle */
.pl-table td:not(:first-child), .pl-table th:not(:first-child) { text-align: right; }
.pl-table tr.current td { background: color-mix(in srgb, var(--leaf) 10%, transparent); font-weight: 600; }
.pl-table tr.future td { color: var(--pico-muted-color); }
.pl-table tfoot th { border-top: 2px solid var(--forest); border-bottom: 0; font-weight: 700; color: var(--forest); }
.loss { color: #B3261E; }
.stat-value.loss { color: #B3261E; }
.pl-note { margin: .5rem 0 1.5rem; }
.settings-tabs { justify-content: flex-start; }   /* Pico spreads a <nav> out; keep the tabs together */
.stat-value { white-space: nowrap; }             /* keep "$2,000.00" on one line */
@media (max-width: 1100px) { .money-stats .stat-value { font-size: 1.5rem; } }
.see-all { margin: 1rem 0 0; font-size: .9rem; }

/* Money > Tax */
.stat-card.highlight { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.gst-meter { height: .75rem; border-radius: 1rem; background: var(--cream); overflow: hidden; margin: .5rem 0 .75rem; }
.gst-meter span { display: block; height: 100%; background: var(--leaf); border-radius: 1rem; }
.gst-meter.close span { background: var(--gold); }
.gst-meter.over span { background: #B3261E; }
.finance-form fieldset { margin-bottom: 1.25rem; }
.finance-form legend { font-weight: 600; color: var(--forest); margin-bottom: .5rem; }
/* On narrower screens, squeeze the money tables so every column fits */
@media (max-width: 1100px) {
  .pl-table th, .pl-table td { padding-left: .4rem; padding-right: .4rem; font-size: .9rem; }
  .pl-table td:first-child { white-space: normal; }
}

/* Money > Profit & loss: the year-end export card */
.export-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.export-card h2 { margin-bottom: .25rem; }
.export-card p { margin: 0; max-width: 34rem; }
.export-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.export-buttons [role="button"] { margin: 0; white-space: nowrap; }

/* Money > Bank import */
.import-summary { margin-bottom: .75rem; }
.import-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.import-tools button { margin: 0; width: auto; padding: .35rem .8rem; font-size: .85rem; }
.import-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr);
  gap: .5rem 1rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: .6rem;
  padding: .7rem .9rem;
  margin-bottom: .5rem;
  transition: opacity .15s;
}
.import-line.money-in { border-left-color: var(--leaf); }
.import-line.has-errors { border-color: #B3261E; }
.import-line.off { opacity: .5; }
.import-tick input { margin: 0; }
.import-top { display: flex; justify-content: space-between; gap: .5rem; }
.import-date { font-size: .85rem; color: var(--pico-muted-color); }
.import-amount { white-space: nowrap; }
.money-in .import-amount { color: var(--leaf); }
.import-bank small { display: block; overflow-wrap: anywhere; line-height: 1.3; }
.import-fields { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.import-fields input[type="text"], .import-fields select {
  margin: 0; padding: .35rem .6rem; font-size: .85rem; height: auto; flex: 1 1 9rem;
}
.import-label { width: 100%; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pico-muted-color); }
.import-gst { display: flex; align-items: center; gap: .3rem; font-size: .85rem; margin: 0; white-space: nowrap; }
.import-gst input { margin: 0; }
.import-fields .errorlist { width: 100%; margin: 0; }
.import-recent dd { font-size: .85rem; }
@media (max-width: 900px) {
  .import-line { grid-template-columns: auto minmax(0, 1fr); }
  .import-fields { grid-column: 2; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.save-bar.import-save { position: static; margin-top: 1rem; border-radius: .6rem; }
.import-save .form-buttons { display: flex; gap: .5rem; }

/* ---------- Spotify: song search, album covers, player, playlist strip ---------- */
.song-pick { position: relative; display: flex; align-items: center; gap: .4rem; }
.song-pick input[name$="-title"] { flex: 1; margin: 0; }
.song-play {
  flex: none; width: 2rem; height: 2rem; padding: 0; margin: 0; border-radius: 50%;
  background: #1DB954; border-color: #1DB954; color: #FFFFFF; font-size: .7rem; line-height: 1;
}
.song-play:hover { background: #1AA34A; border-color: #1AA34A; }
.spotify-results {
  position: absolute; top: calc(100% + .25rem); left: 0; right: 0; z-index: 20;
  min-width: 16rem; max-height: 20rem; overflow-y: auto;
  background: var(--white); border: 1px solid var(--line); border-radius: .6rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12); padding: .3rem;
}
.spotify-result {
  display: flex; align-items: center; gap: .6rem; width: 100%; margin: 0; padding: .4rem .5rem;
  background: transparent; border: 0; border-radius: .4rem; color: var(--charcoal, #333); text-align: left;
}
.spotify-result:hover, .spotify-result.active { background: var(--cream); }
.spotify-result img { width: 2.5rem; height: 2.5rem; border-radius: .3rem; object-fit: cover; flex: none; }
.spotify-result span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.spotify-result strong { font-size: .9rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotify-result small { color: var(--pico-muted-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spotify-empty { margin: 0; padding: .5rem; font-size: .85rem; color: var(--pico-muted-color); }
.song-player { grid-column: 1 / -1; padding: .25rem 0 .75rem; }
.song-player iframe { width: 100%; height: 80px; border: 0; border-radius: .75rem; }
.spotify-strip {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--line); border-left: 3px solid #1DB954;
  border-radius: .6rem; padding: .6rem .9rem; margin: .5rem 0 1rem;
}
.spotify-strip > div { flex: 1; min-width: 14rem; }
.spotify-strip form { margin: 0; }
.spotify-strip.has-error { border-left-color: #B3261E; }
.spotify-icon { width: 1.6rem; height: 1.6rem; fill: #1DB954; stroke: #FFFFFF; flex: none; }

/* ---------- Couples' login and welcome pages, in the DJ's branding ---------- */
/* --accent is the DJ's colour; --cover their portal cover photo (if they have one) */
.auth-brand.dj-brand {
  background: color-mix(in srgb, var(--accent) 14%, var(--cream));
  color: var(--forest);
}
.auth-brand.dj-brand::after { border-color: var(--accent); }
.auth-brand.dj-brand .tagline { color: var(--forest); font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; letter-spacing: .01em; }
.auth-brand.dj-brand .tagline-sub { color: color-mix(in srgb, var(--forest) 75%, transparent); }
.auth-brand.dj-brand .star { color: var(--accent); }
.auth-brand.dj-brand.has-cover {
  background: linear-gradient(rgba(20, 24, 22, .35), rgba(20, 24, 22, .7)), var(--cover) center / cover no-repeat;
  color: #FFFFFF;
}
.auth-brand.dj-brand.has-cover .tagline { color: #FFFFFF; }
.auth-brand.dj-brand.has-cover .tagline-sub { color: rgba(255, 255, 255, .85); }
.dj-brand-logo {
  position: relative; z-index: 1; align-self: flex-start;
  background: #FFFFFF; border-radius: .9rem; padding: .9rem 1.2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.dj-brand-logo img { width: auto; max-width: 200px; max-height: 90px; display: block; }
.dj-brand-logo span { font-weight: 700; font-size: 1.2rem; color: var(--accent); }
.dj-brand-words { position: relative; z-index: 1; }
.auth-footnote { margin: 1rem 0 0; line-height: 1.5; }

/* ---------- Plantr owner portal ---------- */
.sidebar-section {
  margin: 0 0 .5rem; padding: 0 .9rem; font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.sidebar-owner-link {
  display: block; margin: .75rem .9rem 0; font-size: .8rem; color: rgba(247, 245, 242, .65); text-decoration: none;
}
.sidebar-owner-link:hover { color: var(--cream); }
.owner-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; align-items: flex-start; }
.owner-actions form { margin: 0; }
.login-as { margin: 0; position: relative; }
.login-as summary { list-style: none; margin: 0; }
.login-as summary::-webkit-details-marker { display: none; }
/* Opens inside the row (not floating), so the scrolling table can't cut it off */
.login-as[open] form {
  margin-top: .5rem; width: 17rem;
  display: flex; flex-direction: column; gap: .5rem; text-align: left; white-space: normal;
  background: var(--cream); border: 1px solid var(--line); border-radius: .6rem; padding: .8rem;
}
.login-as[open] form input { margin: 0; }
.owner-types { grid-template-columns: 1fr; gap: .15rem; }
.owner-types dt { font-weight: 600; color: var(--forest); }
.owner-types dd { margin-bottom: .75rem; }

/* The support banner while "Log in as" is on */
.impersonation-banner {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem 1rem;
  padding: .55rem 1rem; background: var(--gold); color: var(--forest); font-size: .9rem;
}
.impersonation-banner form { margin: 0; }
.impersonation-banner button {
  margin: 0; padding: .3rem .8rem; font-size: .85rem; width: auto;
  background: var(--forest); border-color: var(--forest); color: var(--cream);
}

/* Owner portal: business type and invite status */
.badge-type { background: var(--cream); color: var(--forest); border: 1px solid var(--line); }
.badge.status-pending { background: #FFF4D6; color: #8A6A00; }
.badge.status-details { background: #E8EEF8; color: #2F4F7F; }
.badge.status-active { background: color-mix(in srgb, var(--leaf) 18%, white); color: #3E5E30; }
.confirm-plan { margin: .25rem 0 1rem; }

/* ---------- Team (business owners with DJs and MCs) ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.25rem; }
.team-card { margin: 0; display: flex; flex-direction: column; }
.team-card.inactive { opacity: .55; }
.team-card-top { display: flex; align-items: flex-start; gap: .8rem; }
.team-card-top > div:nth-child(2) { flex: 1; min-width: 0; }
.team-card-top h2 { font-size: 1.05rem; margin: 0; }
.team-card-top p { margin: .1rem 0 0; font-size: .8rem; overflow-wrap: anywhere; }
.team-avatar {
  flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: var(--forest); color: var(--cream);
}
.team-gigs { margin: .9rem 0 .4rem; font-size: .9rem; }
.team-perms { list-style: none; margin: 0 0 1rem; padding: 0; font-size: .8rem; color: var(--pico-muted-color); flex: 1; }
.team-perms li { list-style: none; padding: .1rem 0 .1rem 1.1rem; position: relative; margin: 0; }
.team-perms li::before { content: "✓"; position: absolute; left: 0; color: var(--leaf); font-weight: 700; }
.team-perms li.muted::before { content: ""; }
.team-card-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.team-card-actions form { margin: 0; }
.perm-switch {
  width: 100%; display: flex; align-items: flex-start; gap: .7rem; padding: .7rem 0; margin: 0;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.perm-switch input[type="checkbox"] { margin-top: .2rem; flex: none; }
.perm-switch span { display: flex; flex-direction: column; }
.perm-switch strong { font-weight: 600; font-size: .95rem; }
.perm-switch small { font-size: .8rem; }
.team-form .form-buttons { margin-top: 1.25rem; }
.gig-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.gig-team-person {
  display: flex; align-items: center; gap: .6rem; margin: 0; padding: .6rem .8rem;
  border: 1px solid var(--line); border-radius: .6rem; cursor: pointer; background: var(--white);
}
.gig-team-person:has(input:checked) { border-color: var(--leaf); background: color-mix(in srgb, var(--leaf) 8%, white); }
.gig-team-person input { margin: 0; }
.gig-team-person span { display: flex; flex-direction: column; line-height: 1.25; }
.gig-team-person small { font-size: .75rem; }
.gig-team-list { margin: 0 0 1rem; padding: 0; list-style: none; }
.gig-team-list li { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.gig-team-list li:last-child { border-bottom: 0; }
.team-avatar.small { width: 2rem; height: 2rem; font-size: .75rem; }
.gig-team-edit summary { cursor: pointer; font-size: .9rem; color: var(--forest); font-weight: 600; margin-bottom: .75rem; }
/* Settings > Team roles */
.role-list { list-style: none; margin: 1rem 0; padding: 0; }
.role-list li { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.role-list form { margin: 0; }
.role-add { display: flex; gap: .5rem; }
.role-add input { margin: 0; flex: 1; }
.role-add button { margin: 0; width: auto; white-space: nowrap; }

/* ---------- Settings > Import (clients and gigs from a spreadsheet) ---------- */
.column-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .4rem 1rem; margin-top: 1rem; }
.column-map label { margin: 0; font-size: .85rem; }
.column-map span { display: block; font-weight: 600; margin-bottom: .2rem; }
.column-map select { margin: 0; padding: .35rem .6rem; font-size: .85rem; height: auto; }
.import-preview td { vertical-align: top; font-size: .9rem; }
.import-preview tr.has-problem td { background: #FDF1F0; }
.import-issues small { display: block; line-height: 1.35; }
