/*
 * ParadeSmart manage-area shell
 * ------------------------------------------------------------------
 * The redesigned header, sidebar and content frame, from the Figma
 * "READY: Dashboard - Ticketing" frame. Loaded AFTER project.css so it
 * supersedes the old dark-sidebar chrome without disturbing the page
 * content rules that un-migrated screens still rely on.
 *
 * Values come from tokens.css. Do not hardcode colors here.
 */

/* ---------------------------------------------------------------- *
 * Base
 * ---------------------------------------------------------------- */

html, body {
  font-family: var(--ps-font);
  color: var(--ps-ink);
  font-size: var(--ps-text-base);
}

body {
  background: var(--ps-bg);
}

/* ---------------------------------------------------------------- *
 * Frame
 * ---------------------------------------------------------------- */

.page {
  padding-top: 0;
  min-height: 100vh;
}

.manage-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.content-area {
  flex: 1 1 auto;
  min-width: 0;
  margin-left: var(--ps-sidebar-width);
}

.content {
  padding: var(--ps-gutter);
  background: var(--ps-bg);
}

/* ---------------------------------------------------------------- *
 * Header
 * ---------------------------------------------------------------- */

header.manage-header {
  position: fixed;
  top: 0;
  left: var(--ps-sidebar-width);
  right: 0;
  /* project.css sets width: 100%, which with the sidebar offset pushed the
     account block off the right edge on desktop. Let left/right size it. */
  width: auto;
  height: var(--ps-header-height);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px 0 37px;
  background: var(--ps-surface);
  border-bottom: 1px solid var(--ps-border);
  box-shadow: none;
}

.content-area > .content,
.content-area > .messages-wrap {
  padding-top: calc(var(--ps-header-height) + var(--ps-gutter));
}

.manage-header .event-meta {
  min-width: 0;
}

.manage-header .event-name {
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the name links to the client switcher, but reads as the event's name */
.manage-header .event-name a {
  color: inherit;
}

.manage-header .event-name a:hover,
.manage-header .event-name a:focus {
  color: var(--ps-primary-deep);
  text-decoration: none;
}

.manage-header .event-dates {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--ps-font);
  font-weight: 400;
  font-size: var(--ps-text-2xs);
  color: var(--ps-muted);
  line-height: 1.4;
}

.manage-header .event-dates .zmdi {
  font-size: 13px;
}

.manage-header .header-spacer {
  flex: 1 1 auto;
}

/* One hamburger, and only once the sidebar has slid off screen. */
.manage-header .mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: var(--ps-radius-tile);
  background: transparent;
  color: var(--ps-ink);
  font-size: 22px;
  cursor: pointer;
}

.manage-header .mobile-menu-toggle:hover { background: var(--ps-bg); }

/* Account name over access level, with the avatar alongside. */
.manage-header .header-account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.manage-header .header-account .identity {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  line-height: 1.2;
}

.manage-header .header-account .identity .name {
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
  white-space: nowrap;
}

.manage-header .header-account .user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 200;
  min-width: 160px;
  margin: 0;
  padding: 4px 0;
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  box-shadow: 0 8px 24px rgba(11, 45, 60, 0.12);
}

.manage-header .header-account .user-menu.show { display: block; }

.manage-header .header-account .user-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--ps-ink);
  font-size: var(--ps-text-sm);
  letter-spacing: 0;
}

.manage-header .header-account .user-menu a:hover {
  text-decoration: none;
  background: var(--ps-bg);
}

/* User access level pill — "Super User", "Builder", and so on: 20px tall,
   fully rounded. Green by default; teal for builders. */
.access-pill {
  display: inline-block;
  height: 20px;
  padding: 0 10px;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-pill-bg);
  color: var(--ps-pill-text);
  font-family: var(--ps-font);
  font-weight: 400;
  font-size: var(--ps-text-2xs);
  line-height: 20px;
  white-space: nowrap;
}

.access-pill--builder {
  background: #e1f4f9;
  color: var(--ps-primary-deep);
}

/* on Staff Accounts, a builder's or subcontractor's company under its pill */
.ps-access-company {
  display: block;
  margin-top: 4px;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

/* ---------------------------------------------------------------- *
 * Buttons
 * ---------------------------------------------------------------- */

.ps-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 35px;
  padding: 0 14px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  color: var(--ps-ink);
  font-size: var(--ps-text-sm);
  white-space: nowrap;
}

.ps-btn-secondary:hover,
.ps-btn-secondary:focus {
  color: var(--ps-btn-primary);
  text-decoration: none;
}

.ps-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px; /* between "+" and "Create" */
  height: 35px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--ps-radius-control);
  background: var(--ps-btn-primary);
  color: #fff;
  font-weight: 700;
  font-size: var(--ps-text-sm);
}

.ps-btn-primary:hover,
.ps-btn-primary:focus {
  background: var(--ps-btn-primary-hover);
  color: #fff;
  text-decoration: none;
}

/* every button's icon is 14px */
.ps-btn-primary .zmdi,
.ps-btn-secondary .zmdi,
.content .btn .zmdi,
.content .btn .fa { font-size: 14px; }

/* ---------------------------------------------------------------- *
 * Avatar
 * ---------------------------------------------------------------- */

/* 34px circle, #E1F4F9, initials DM Sans Bold 12px #0D6E8A */
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e1f4f9;
  color: var(--ps-primary-deep);
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: var(--ps-text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------------- *
 * Sidebar
 * ---------------------------------------------------------------- */

nav.main-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--ps-sidebar-width);
  z-index: 110;
  display: flex;
  flex-direction: column;
  background: var(--ps-surface);
  border-right: 1px solid var(--ps-border);
  /* the whole sidebar scrolls, the event card with it: on a short screen
     the card comes after the menu (Admin last) rather than over it */
  overflow-x: hidden;  /* where scrollbars take space, the 230px rows don't fit beside one */
  overflow-y: auto;
}

/* The old dark slab behind the menu. */
nav.main-menu:after { content: none; }

/* Logo: 183x46, 39px from the left and 14px from the top. */
.sidebar-logo {
  flex: 0 0 auto;
  padding: 14px 0 0 39px;
}

.sidebar-logo a {
  display: inline-block;
  line-height: 0;
}

.sidebar-logo__mark {
  width: 183px;
  height: 46px;
  object-fit: contain;
  opacity: 1;
}

/* grows to push the event card to the bottom on a tall screen; never
   shrinks, so on a short one the sidebar scrolls instead */
.sidebar-nav {
  flex: 1 0 auto;
  padding: 16px 0;
}

/* Section headers: DM Sans Regular 10px uppercase, lined up with the icons. */
.sidebar-group-label {
  margin: 18px 0 6px;
  padding: 0 0 0 25px;
  font-weight: 400;
  font-size: var(--ps-text-2xs);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ps-nav-group);
}

.sidebar-items { margin: 0; }

.sidebar-item + .sidebar-item { margin-top: 4px; }

/* A menu item: 230x37 with a 15px left margin. The label goes to the
   section; the chevron (a button) opens or closes its submenu. */
.sidebar-row {
  display: flex;
  align-items: center;
  width: 230px;
  height: 37px;
  margin-left: 15px;
  border-radius: var(--ps-radius-tile);
}

.sidebar-row:hover { background: var(--ps-bg); }

/* icon 17x16 at 10px from the left; the text starts at 35px */
.sidebar-link {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 100%;
  padding: 0 0 0 10px;
  border-radius: inherit;
  color: var(--ps-ink);
  font-family: var(--ps-font);
  font-weight: 500;
  font-size: var(--ps-text-nav);
  letter-spacing: 0;
  white-space: nowrap;
}

/* transparent, so the row's light grey (or the active gradient) shows;
   project.css's old dark "nav ul li a:hover" would otherwise win */
.sidebar-link:hover,
.sidebar-link:focus {
  text-decoration: none;
  color: var(--ps-ink);
  background: transparent;
}

.sidebar-link .zmdi {
  flex: 0 0 auto;
  width: 17px;
  height: 16px;
  margin: 0;
  top: 0;
  font-size: 16px !important;
  line-height: 16px;
  text-align: center;
  color: inherit;
}

.sidebar-link .sidebar-label {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-caret {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  color: var(--ps-muted);
  font-size: 14px;
  cursor: pointer;
}

.sidebar-caret .zmdi { transition: transform .2s ease-in-out; }

.sidebar-item.is-expanded > .sidebar-row .sidebar-caret .zmdi { transform: rotate(90deg); }

.sidebar-link:focus-visible,
.sidebar-caret:focus-visible {
  outline: 2px solid var(--ps-primary);
  outline-offset: -2px;
}

/* The section holding this page: the soft gradient, and #0D6E8A text,
   icon and chevron. */
.sidebar-item.is-active > .sidebar-row { background: var(--ps-gradient-soft); }

.sidebar-item.is-active > .sidebar-row .sidebar-link,
.sidebar-item.is-active > .sidebar-row .sidebar-caret { color: var(--ps-primary-deep); }

/* Submenu: 30px rows 3px below the item; a 7px dot 36px in from the item's
   left edge, the text 17px from the dot. */
.sidebar-submenu {
  display: none;
  width: 230px;
  margin: 3px 0 0 15px;
  padding: 0;
}

.sidebar-item.is-expanded > .sidebar-submenu { display: block; }

.sidebar-submenu a {
  position: relative;
  display: block;
  height: 30px;
  padding: 0 10px 0 53px;
  border-radius: var(--ps-radius-tile);
  color: var(--ps-muted);
  font-family: var(--ps-font);
  font-weight: 400;
  font-size: var(--ps-text-sm);
  line-height: 30px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-submenu a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 36px;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #c4ccd0;
}

.sidebar-submenu a:hover,
.sidebar-submenu a:focus {
  text-decoration: none;
  color: var(--ps-ink);
  background: var(--ps-bg);
}

/* the current page's dot */
.sidebar-submenu li.is-active > a::before { background: var(--ps-primary-link); }

/* after a menu item that opens outside the dashboard (Help Center, Blog) */
.sidebar-out {
  margin-left: 4px;
  color: var(--ps-muted);
  font-size: 12px;
}

/* ---- Event switcher card, at the bottom of the sidebar (after the menu
   when the screen is too short for both) ----
   230x198 (15px from each side), 14px radius; a 200x35 Change Event
   button. */

.sidebar-event {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* 15px either side of whatever width there is: centred, also when the
     sidebar shows a scrollbar (230px wide without one) */
  min-height: 198px;
  margin: 0 15px 15px;
  padding: 15px;
  border-radius: var(--ps-radius-card);
  background: linear-gradient(135deg, #1d88ad 0%, #0d6e8a 100%);
  color: #fff;
}

.sidebar-event .event-logo {
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.sidebar-event .event-title {
  margin: 0 0 6px;
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: var(--ps-text-base);
  line-height: 18px;
  color: #fff;
}

.sidebar-event .event-range {
  margin: 0 0 14px;
  font-family: var(--ps-font);
  font-weight: 400;
  font-size: var(--ps-text-sm);
  line-height: 1.3;
  color: #fff;
}

.sidebar-event .change-event {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 200px;
  max-width: 100%;
  height: 35px;
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  color: var(--ps-primary-link);
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: var(--ps-text-sm);
}

.sidebar-event .change-event:hover,
.sidebar-event .change-event:focus {
  text-decoration: none;
  color: var(--ps-primary-deep);
}

/* ---------------------------------------------------------------- *
 * Messages
 * ---------------------------------------------------------------- */

.content-area .messages,
.content-area > .alert {
  margin: 0 var(--ps-gutter);
}

/* ---------------------------------------------------------------- *
 * Small screens
 * ---------------------------------------------------------------- */

@media (max-width: 991px) {
  nav.main-menu {
    transform: translateX(-100%);
    transition: transform .3s ease-in-out;
  }

  nav.main-menu.show { transform: none; }

  .content-area { margin-left: 0; }

  header.manage-header { left: 0; padding-left: 16px; }

  .manage-header .mobile-menu-toggle { display: inline-flex; }
}

/* ---------------------------------------------------------------- *
 * Shared card + page-head primitives
 * ---------------------------------------------------------------- */

.ps-card {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-card);
  padding: 22px;
}

/* Member points sit under the builder's Vue dashboard (manage/dashboard.html). */
.ps-memberpoints {
  margin-top: var(--ps-card-gap);
}

.ps-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.ps-card-head h3 {
  margin: 0;
  font-size: var(--ps-text-xl);
  font-weight: 700;
  color: var(--ps-ink);
}

.ps-icon-well {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-icon-well .zmdi {
  font-size: 26px;
  color: var(--ps-primary-deep);
}

.ps-icon-well svg {
  width: 24px;
  height: 24px;
  fill: var(--ps-primary-deep);
}

.ps-icon-well--teal  { background: var(--ps-well-teal); }
.ps-icon-well--mint  { background: var(--ps-well-mint); }
.ps-icon-well--amber { background: var(--ps-well-amber); }

.ps-page-sub {
  margin: 6px 0 0;
  color: var(--ps-muted);
  font-size: var(--ps-text-base);
}

/* ---------------------------------------------------------------- *
 * Reports landing page
 * ---------------------------------------------------------------- */

.ps-report-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--ps-card-gap);
}

.ps-report-list li + li { border-top: 1px solid var(--ps-border); }

.ps-report-list a {
  display: block;
  padding: 11px 8px;
  border-radius: var(--ps-radius-sm);
  color: var(--ps-ink);
}

.ps-report-list a:hover,
.ps-report-list a:focus {
  text-decoration: none;
  background: var(--ps-bg);
}

.ps-report-label {
  display: block;
  font-weight: 500;
  font-size: var(--ps-text-base);
}

.ps-report-desc {
  display: block;
  margin-top: 2px;
  color: var(--ps-muted);
  font-size: var(--ps-text-sm);
  line-height: 1.4;
}

/* ---------------------------------------------------------------- *
 * Support page
 * ---------------------------------------------------------------- */

.ps-support {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--ps-card-gap);
  align-items: start;
}

@media (max-width: 991px) {
  .ps-support { grid-template-columns: minmax(0, 1fr); }
}

.ps-field { display: block; margin-bottom: 18px; }

.ps-field__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.ps-field input[type="text"],
.ps-field textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  font-family: inherit;
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
  resize: vertical;
}

.ps-field input[type="text"]:focus,
.ps-field textarea:focus {
  outline: none;
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.15);
}

.ps-field__error {
  display: block;
  margin-top: 6px;
  color: #b4231f;
  font-size: var(--ps-text-sm);
}

/* What the server appends, shown so it is never a surprise. */
.ps-support-meta {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--ps-radius-control);
  background: var(--ps-bg);
}

.ps-support-meta ul { margin: 0; }

.ps-support-meta li {
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
  line-height: 1.6;
}

.ps-support-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ps-support-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  color: var(--ps-ink);
}

.ps-support-link:hover,
.ps-support-link:focus {
  text-decoration: none;
  color: var(--ps-ink);
  border-color: var(--ps-primary);
}

.ps-support-link .ps-icon-well {
  width: 44px;
  height: 44px;
}

.ps-support-link .ps-icon-well .zmdi { font-size: 20px; }

.ps-support-link__body { flex: 1 1 auto; min-width: 0; }

.ps-support-link__title {
  display: block;
  font-weight: 700;
  font-size: var(--ps-text-base);
}

.ps-support-link__desc {
  display: block;
  margin-top: 2px;
  color: var(--ps-muted);
  font-size: var(--ps-text-sm);
  line-height: 1.4;
}

.ps-support-link__out {
  flex: 0 0 auto;
  color: var(--ps-muted);
  font-size: 16px;
}

.ps-support-direct {
  margin: 14px 0 0;
  color: var(--ps-muted);
  font-size: var(--ps-text-sm);
}

/* Add/Edit Push Notification (scheduled_push_form.html): the title across
   the row, like the body under it */
.ps-push-form > #div_id_title { grid-column: 1 / -1; }

/* Active last, on a row of its own (a switch's id is on the div inside) */
.ps-push-form > .form-group:has(> #div_id_active) { grid-column: 1 / -1; }

/* Push Notifications: the automatic vote notification as a card (its
   form is a page of its own) */
.ps-vote-push__card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-bg);
}

.ps-vote-push__message { min-width: 0; }

.ps-vote-push__title {
  margin: 0;
  font-weight: 700;
  color: var(--ps-ink);
}

.ps-vote-push__title .ps-pill { margin-left: 8px; vertical-align: middle; }

.ps-vote-push__body {
  margin: 4px 0 0;
  color: var(--ps-muted);
}

/* Voting: who's leading each category, above the votes */
.ps-vote-leaders { margin-bottom: var(--ps-card-gap); }
/* two classes: .ps-report-card__title (later in this file) zeroes it */
.ps-vote-leaders .ps-report-card__title,
.ps-list-card .ps-list-card__title { margin: 20px 22px 4px; }
.ps-vote-leaders .ps-pill { margin-right: 6px; vertical-align: middle; }
.ps-vote-leaders tr[hidden] { display: none; }
.ps-vote-leaders__toggle { margin: 14px 22px 18px; }

/* "Looking for something else?" over the Help Center and Blog links */
.ps-support-links__label { margin: 0 0 -4px; }

/* Send Message until there's something to send */
.ps-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- *
 * Manager list pages
 * Shared by every /manage/ list; see manage/base/list.html.
 * ---------------------------------------------------------------- */

.ps-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.ps-list-head__main { min-width: 0; }

.ps-breadcrumbs {
  /* project.css styles every <nav> as the old 240px sidebar (and hides it
     under 768px); undo that for the breadcrumb trail. */
  position: static;
  width: auto;
  overflow: visible;
  transition: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--ps-text-base);
  color: var(--ps-muted);
}

.ps-breadcrumbs a { color: var(--ps-muted); }
.ps-breadcrumbs a:hover { color: var(--ps-primary-active); }
.ps-breadcrumbs__sep { color: var(--ps-nav-group); }
.ps-breadcrumbs__current { color: var(--ps-ink); font-weight: 500; }

.ps-list-title {
  margin: 10px 0 0;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.2;
  color: var(--ps-ink);
  /* a long unbroken name (a file name, a web address) wraps rather than
     running under the buttons beside the title */
  overflow-wrap: anywhere;
}

/* a title naming something long, kept to one line ending in "…" (the
   whole of it in the tooltip), e.g. "Edit: advert/2026/04/banner…" */
.ps-list-title:has(.ps-title-name) {
  display: flex;
  white-space: nowrap;
}

.ps-title-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Summary figures beside the title (Homes uses this). */
.ps-list-stats {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  gap: 28px;
  padding: 18px 26px;
  border: 1px solid var(--ps-border-soft);
  border-radius: var(--ps-radius-card);
  background: var(--ps-gradient-soft);
}

.ps-list-stats__rule {
  width: 1px;
  background: rgba(13, 110, 138, 0.18);
}

.ps-list-stats__value {
  margin: 0;
  font-weight: 700;
  font-size: var(--ps-text-xl);
  line-height: 1.2;
  color: var(--ps-primary-deep);
}

.ps-list-stats__label {
  margin: 6px 0 0;
  font-size: var(--ps-text-base);
  color: var(--ps-muted);
}

/* ---- Toolbar ---------------------------------------------------- */

.ps-list-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.ps-list-toolbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ps-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* 38px tall, 8px radius, a 0.6px #E2E6E9 border; DM Sans 14px #202224,
   with a #1D88AD search icon inside */
.ps-search__field {
  position: relative;
  display: flex;
  max-width: 100%;
}

.ps-search__icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--ps-btn-primary);
  font-size: 16px;
  pointer-events: none;
}

.ps-search__input {
  width: 275px;
  max-width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 0.6px solid var(--ps-border-soft);
  border-radius: var(--ps-radius-tile);
  background: var(--ps-surface);
  font-family: var(--ps-font);
  font-size: var(--ps-text-base);
  color: var(--ps-input-text);
}

.ps-search__input:focus {
  outline: none;
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.15);
}

.ps-search__go { height: 38px; }

/* "FILTERS" and its dropdowns, just after the search */
.ps-list-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: 10px; }
.ps-list-filters__label {
  padding-left: 20px;
  border-left: 1px solid var(--ps-border);
  font-size: var(--ps-text-sm);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ps-muted);
}

/* "Not registered", in place of a ticket's empty visitor details */
.ps-ticket-unregistered { white-space: nowrap; }

/* ---- Table ------------------------------------------------------ */

/* a table too wide for the card (e.g. Advertisements at 1200px) scrolls
   sideways, at any screen size */
.ps-list-card { padding: 0; overflow-x: auto; }

/* ...and a row's Edit buttons (pencil, trash) stay pinned at the right
   while it does; the shadow shows only when there's more to scroll to
   (.is-scrollable, set by manage/base/list.html) */
.ps-list-card .ps-table:has(td:last-child .ps-btn-edit) tr > :last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--ps-surface);
}

.ps-list-card .ps-table:has(td:last-child .ps-btn-edit) tbody tr:hover > :last-child {
  background: var(--ps-bg);
}

.ps-list-card.is-scrollable .ps-table:has(td:last-child .ps-btn-edit) tr > :last-child {
  box-shadow: inset 10px 0 8px -8px rgba(11, 45, 60, 0.18);
}

.ps-table {
  width: 100%;
  border-collapse: collapse;
}

.ps-table th {
  padding: 20px 14px;
  border-bottom: 1px solid var(--ps-border);
  font-weight: 500;
  font-size: var(--ps-text-base);
  color: var(--ps-muted);
  text-align: left;
  white-space: nowrap;
}

.ps-table th a { color: inherit; }

/* model fields head their columns in lower case ("name", "required");
   start each with a capital */
.ps-table thead th::first-letter { text-transform: uppercase; }
/* …except a heading whose lower-case start is right, e.g. "iOS Downloads" */
.ps-table thead th.ps-keep-case::first-letter { text-transform: none; }

.ps-table td {
  padding: 14px;
  border-bottom: 1px solid var(--ps-border);
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
  vertical-align: middle;
}

.ps-table tbody tr:last-child td { border-bottom: 0; }
.ps-table tbody tr:hover { background: var(--ps-bg); }

.ps-table th:first-child,
.ps-table td:first-child { padding-left: 22px; }

.ps-table th:last-child,
.ps-table td:last-child { padding-right: 22px; text-align: right; }

.ps-table__check { width: 42px; }

/* Row thumbnail, e.g. the home's primary image. */
.ps-thumb {
  display: block;
  width: 85px;
  height: 85px;
  object-fit: cover;
  border-radius: var(--ps-radius-tile);
  background: var(--ps-placeholder);
}

/* ---- Status pills ----------------------------------------------- */

.ps-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--ps-radius-pill);
  font-size: var(--ps-text-2xs);
  white-space: nowrap;
}

.ps-pill--ok {
  background: var(--ps-pill-bg);
  color: var(--ps-pill-text);
}

.ps-pill--warn {
  background: var(--ps-pill-warn-bg);
  color: var(--ps-pill-warn-text);
}

/* ---- Row toggle -------------------------------------------------- */

.ps-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 82px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-toggle-off);
  cursor: pointer;
  transition: background .18s ease-in-out;
}

.ps-toggle.is-on { background: var(--ps-toggle-on); }

.ps-toggle__label {
  position: absolute;
  top: 0;
  line-height: 28px;
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: var(--ps-text-2xs);
  letter-spacing: -0.11px;
  color: #fff;
}

.ps-toggle.is-on  .ps-toggle__label { left: 12px; }
.ps-toggle.is-off .ps-toggle__label { right: 12px; }

.ps-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform .18s ease-in-out;
}

.ps-toggle.is-on .ps-toggle__knob { transform: translateX(54px); }

.ps-toggle:disabled { opacity: .6; cursor: progress; }

.ps-toggle.is-error {
  outline: 2px solid var(--ps-pill-warn-text);
  outline-offset: 2px;
}

/* ---- Row edit button --------------------------------------------- */

/* A row's edit button: a pencil in a small square, like the dashboard's
   ad edit buttons (Dashboard.vue .ps-goto--small). The words go in its
   title and aria-label. */
.ps-btn-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  color: var(--ps-ink);
  font-size: 16px;
  vertical-align: middle;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.ps-btn-edit .zmdi { font-size: 16px; }

/* a row's buttons side by side, e.g. a builder's edit, Points, Deadlines */
.ps-row-actions { display: inline-flex; align-items: center; gap: 8px; }

/* The Advertisements list, kept compact so it scrolls sideways as little
   as it can: smaller thumbnails, headings that wrap. */
.ps-list-card:has(.ps-ad-name) .ps-table th { white-space: normal; }

.ps-ad-thumb { display: block; width: 160px; height: auto; }

@media (max-width: 1400px) {
  .ps-ad-thumb { width: 120px; }
}

/* the ad's areas: wide enough that a list of them doesn't make the row
   very tall */
.ps-ad-areas { display: block; min-width: 170px; }

/* an ad's name (its image's file name): a long one ends in an ellipsis,
   the whole of it in the tooltip */
.ps-ad-name {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* an ad's run dates, under its Running / Scheduled / Ended pill */
.ps-ad-run {
  display: block;
  min-width: 110px; /* "No end date" on one line */
  margin-top: 4px;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

/* a white button sized to sit beside .ps-btn-edit in a table row */
.ps-btn-secondary.ps-btn-row { height: 32px; padding: 0 12px; }

/* where a row's trash can would be, when it has none (a system account) */
.ps-btn-edit--none { visibility: hidden; }

/* the same square, red, for a row's delete (e.g. the Trades list) */
.ps-btn-edit--danger { color: var(--ps-pill-warn-text); cursor: pointer; }
/* a row's second button that isn't a delete, e.g. Ticket Types' Archive */
.ps-btn-edit--action { cursor: pointer; }

.ps-btn-edit:hover,
.ps-btn-edit:focus {
  text-decoration: none;
  color: var(--ps-primary-active);
  border-color: var(--ps-primary);
}

/* after the rule above, so a trash can turns white on red, not blue */
.ps-btn-edit--danger:hover,
.ps-btn-edit--danger:focus {
  color: #fff;
  border-color: var(--ps-pill-warn-text);
  background: var(--ps-pill-warn-text);
}

/* ---- Empty state, bulk actions, footer ---------------------------- */

.ps-list-empty {
  color: var(--ps-muted);
  text-align: center;
  padding: 48px 22px;
}

.ps-bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.ps-select {
  height: 35px;
  padding: 0 10px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  font-family: inherit;
  font-size: var(--ps-text-sm);
  color: var(--ps-ink);
}

.ps-list-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.ps-list-count {
  margin: 0;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.ps-list-foot .ps-pagination { margin: 0 auto; }

.ps-list-foot__aside {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

/* ---- Pagination --------------------------------------------------- */

.ps-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ps-pagination__page,
.ps-pagination__step,
.ps-pagination__gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 27px;
  padding: 0 6px;
  border-radius: var(--ps-radius-sm);
  font-size: var(--ps-text-sm);
  color: var(--ps-ink);
}

.ps-pagination__page:hover,
.ps-pagination__step:hover {
  text-decoration: none;
  background: var(--ps-bg);
  color: var(--ps-primary-active);
}

.ps-pagination__page.is-current {
  background: var(--ps-primary);
  color: #fff;
  font-weight: 700;
}

.ps-pagination__gap,
.ps-pagination__step.is-disabled {
  color: var(--ps-nav-group);
  pointer-events: none;
}

@media (max-width: 991px) {
  .ps-list-head { flex-direction: column; }
  .ps-list-toolbar__actions { margin-left: 0; }
}

/* A form that needs to sit inline among the toolbar's buttons. */
.ps-inline-form { display: inline-flex; margin: 0; }

/* ---------------------------------------------------------------- *
 * Detail, form and report pages
 * The page frame from manage/base/base.html, plus a reskin of the
 * Bootstrap 3 pieces the older templates are built from, so every
 * screen matches the dashboard without rewriting each template.
 * Scoped to .content so the header and sidebar are untouched.
 * ---------------------------------------------------------------- */

/* Detail pages can carry a dozen actions (Ticket has 12). Let the head
   wrap so they drop to their own row instead of crushing the title. */
.ps-page > .ps-list-head { flex-wrap: wrap; }
.ps-page > .ps-list-head > .ps-list-head__main { flex: 1 1 420px; }
/* a short title with a long row of buttons (Tickets): the title takes only
   what it needs, so the buttons stay on its line while they fit */
.ps-page > .ps-list-head--wide-actions > .ps-list-head__main { flex-basis: auto; }

.ps-page-actions {
  flex: 0 1 auto;
  align-self: flex-end; /* level with the title, under the breadcrumbs */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.ps-page-actions:empty { display: none; }
.ps-page-actions .ps-btn-primary { gap: 6px; }

/* level with the title itself when a line of text sits under it (the
   Traits list): past the breadcrumbs, centred on the 48px title */
.ps-page-actions--title { align-self: flex-start; margin-top: 37px; }

.ps-page-body { padding: 28px; }

.ps-page-body > :first-child { margin-top: 0; }
.ps-page-body > :last-child  { margin-bottom: 0; }

@media (max-width: 991px) {
  .ps-page > .ps-list-head > .ps-list-head__main { flex-basis: auto; }
  .ps-page-actions { justify-content: flex-start; align-self: stretch; margin-left: 0; }
  .ps-page-actions--title { margin-top: 0; }
  .ps-page-body { padding: 18px; }
}

/* ---- Type --------------------------------------------------------- */

/* Element-level on purpose: replaces project.css's old link blue without
   outranking component rules like .ps-breadcrumbs a. */
a { color: var(--ps-primary-link); }

a:hover,
a:focus { color: var(--ps-primary-active); }

/* Focus rings: none for a mouse click or tap (Bootstrap draws its blue one
   on a:focus and .btn:focus, around the sidebar items, logo and buttons),
   and one for keyboard focus, :focus-visible. !important because Bootstrap's
   .btn:active:focus and project.css outrank a rule this general. Text
   fields always count as focus-visible, so they keep their own styles. */
:focus:not(:focus-visible) { outline: none !important; }

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ps-primary);
  outline-offset: 2px;
}

/* :where() keeps these at element weight so .ps-card-head h3 and friends,
   earlier in this file, still win; they only replace Bootstrap's sizes. */
:where(.content) h2,
:where(.content) h3,
:where(.content) h4,
:where(.content) h5 {
  font-family: var(--ps-font);
  font-weight: 700;
  color: var(--ps-ink);
}

:where(.content) h2 { font-size: var(--ps-text-xl); }
:where(.content) h3 { font-size: var(--ps-text-lg); }
:where(.content) h4 { font-size: var(--ps-text-md); }

.content legend {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ps-border);
  font-weight: 700;
  font-size: var(--ps-text-md);
  color: var(--ps-ink);
}

.content hr { border-top-color: var(--ps-border); }

.content .text-muted { color: var(--ps-muted); }

.content .text-info,
.content .text-primary { color: var(--ps-primary-deep); }

/* ---- Buttons ------------------------------------------------------ */

.content .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 35px;
  padding: 0 14px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  box-shadow: none;
  text-shadow: none;
  font-family: inherit;
  font-weight: 500;
  font-size: var(--ps-text-sm);
  line-height: 1;
  color: var(--ps-ink);
  white-space: nowrap;
}

.content .btn:hover,
.content .btn:focus { text-decoration: none; }

/* a secondary (plain or btn-default) button: text and icon go #1D88AD on
   hover. :where keeps this from outranking the coloured ones. */
.content .btn:where(:not(.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-link)):hover,
.content .btn:where(:not(.btn-primary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-link)):focus {
  border-color: var(--ps-border);
  background: var(--ps-surface);
  color: var(--ps-btn-primary);
}

.content .btn:active,
.content .btn.active { box-shadow: none; }

.content .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.25);
}

.content .btn-primary,
.content .btn-success {
  background: var(--ps-btn-primary);
  border-color: var(--ps-btn-primary);
  color: #fff;
  font-weight: 700;
}

.content .btn-primary:hover,
.content .btn-primary:focus,
.content .btn-success:hover,
.content .btn-success:focus {
  background: var(--ps-btn-primary-hover);
  border-color: var(--ps-btn-primary-hover);
  color: #fff;
}

.content .btn-danger {
  background: var(--ps-pill-warn-text);
  border-color: var(--ps-pill-warn-text);
  color: #fff;
}

.content .btn-danger:hover,
.content .btn-danger:focus {
  background: #9e2b23;
  border-color: #9e2b23;
  color: #fff;
}

.content .btn-warning {
  background: var(--ps-well-amber);
  border-color: #f1df9c;
  color: #7a5b00;
}

.content .btn-info {
  background: var(--ps-well-teal);
  border-color: var(--ps-well-teal);
  color: var(--ps-primary-deep);
}

.content .btn-link {
  border-color: transparent;
  background: transparent;
  color: var(--ps-primary-link);
}

.content .btn-link:hover,
.content .btn-link:focus {
  border-color: transparent;
  color: var(--ps-primary-active);
  text-decoration: underline;
}

.content .btn-lg { height: 44px; padding: 0 20px; font-size: var(--ps-text-base); }
.content .btn-sm,
.content .btn-group-sm > .btn { height: 30px; padding: 0 10px; border-radius: var(--ps-radius-control); }
.content .btn-xs { height: 26px; padding: 0 8px; font-size: var(--ps-text-xs); border-radius: var(--ps-radius-sm); }
.content .btn-block { display: flex; width: 100%; }

.content .btn.disabled,
.content .btn[disabled] { opacity: .55; }

/* Bootstrap joins grouped buttons; keep that, with our radius at the ends. */
.content .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* ---- Forms -------------------------------------------------------- */

.content label,
.content .control-label {
  font-weight: 500;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.content .form-horizontal .control-label { padding-top: 11px; }

.content .checkbox label,
.content .radio label {
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
}

.content input[type="checkbox"],
.content input[type="radio"] { accent-color: var(--ps-primary); }

.content .form-control {
  height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background-color: var(--ps-surface);
  box-shadow: none;
  font-family: inherit;
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
}

.content textarea.form-control { height: auto; min-height: 96px; }

/* Some selects carry an inline width:auto and a very long option (home
   names); keep them inside their column. */
.content select.form-control { max-width: 100%; }
.content select[multiple].form-control { height: auto; }

/* Dropdowns: our own chevron, 14px in from the right with room beside the
   text, instead of the browser's arrow tight against the edge. */
.content select:not([multiple]):not([size]),
.ps-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7378' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}

.content .form-control:focus {
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.15);
}

.content .form-control[disabled],
.content .form-control[readonly] { background-color: var(--ps-bg); }

.content .help-block {
  margin-top: 6px;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.content .has-error .form-control { border-color: var(--ps-pill-warn-text); }

.content .has-error .help-block,
.content .has-error .control-label,
.content .errorlist { color: var(--ps-pill-warn-text); }

.content .input-group-addon {
  border-color: var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-bg);
  color: var(--ps-muted);
}

.content .select2-container .select2-choice,
.content .select2-container-multi .select2-choices {
  border-color: var(--ps-border);
  border-radius: var(--ps-radius-control);
  background-image: none;
}

/* ---- Tables ------------------------------------------------------- */

.content .table {
  margin-bottom: 20px;
  background: var(--ps-surface);
}

.content .table > thead > tr > th {
  padding: 14px;
  border-bottom: 1px solid var(--ps-border);
  font-weight: 500;
  font-size: var(--ps-text-base);
  color: var(--ps-muted);
  white-space: nowrap;
}

.content .table > thead > tr > th a { color: inherit; }

.content .table > tbody > tr > td,
.content .table > tbody > tr > th,
.content .table > tfoot > tr > td,
.content .table > tfoot > tr > th {
  padding: 12px 14px;
  border-top: 1px solid var(--ps-border);
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
  vertical-align: middle;
}

.content .table-condensed > thead > tr > th,
.content .table-condensed > tbody > tr > td,
.content .table-condensed > tbody > tr > th { padding: 8px 10px; }

/* The Figma ticket list stripes in the page grey. */
.content .table-striped > tbody > tr:nth-of-type(odd) { background: var(--ps-bg); }

.content .table-hover > tbody > tr:hover { background: var(--ps-well-teal); }

.content .table-bordered,
.content .table-bordered > thead > tr > th,
.content .table-bordered > tbody > tr > td,
.content .table-bordered > tbody > tr > th { border-color: var(--ps-border); }

/* A table sitting straight on the grey page gets the card treatment. */
.ps-page-body--bare > .table:not(.table-bordered),
.ps-page-body--bare > .table-responsive > .table:not(.table-bordered),
.ps-page-body--bare .row > [class*="col-"] > .table:not(.table-bordered) {
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-card);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.ps-page-body--bare > .table > tbody:first-child > tr:first-child > td,
.ps-page-body--bare > .table > thead + tbody > tr:first-child > td { border-top: 0; }

.content .table-responsive { border: 0; }

/* Wide tables (ticket visits, transactions) scroll inside their card on
   small screens rather than widening the whole page. Done on the table,
   not its container, so dropdowns elsewhere in the page are not clipped. */
@media (max-width: 991px) {
  .content .table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---- Panels, wells, lists ------------------------------------------ */

.content .panel {
  margin-bottom: var(--ps-card-gap);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-card);
  background: var(--ps-surface);
  box-shadow: none;
  overflow: hidden;
}

/* no line under a card's heading, like the dashboard's other cards */
.content .panel > .panel-heading {
  padding: 22px 22px 0;
  border-bottom: 0;
  border-radius: 0;
  background: var(--ps-surface);
  color: var(--ps-ink);
}

.content .panel-title,
.content .panel > .panel-heading h3,
.content .panel > .panel-heading h4 {
  margin: 0;
  font-weight: 700;
  font-size: var(--ps-text-md);
  color: var(--ps-ink);
}

.content .panel-body { padding: 22px; }

.content .panel-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--ps-border);
  background: var(--ps-bg);
}

.content .panel > .table,
.content .panel > .table-responsive > .table { margin-bottom: 0; }

.content .well,
.content .jumbotron {
  border: 0;
  border-radius: var(--ps-radius-card);
  background: var(--ps-bg);
  box-shadow: none;
}

.content .well { padding: 20px 22px; }
.content .jumbotron { padding: 28px; }

.content .list-group-item {
  border-color: var(--ps-border);
  color: var(--ps-ink);
}

.content .list-group-item:first-child {
  border-top-left-radius: var(--ps-radius-control);
  border-top-right-radius: var(--ps-radius-control);
}

.content .list-group-item:last-child {
  border-bottom-left-radius: var(--ps-radius-control);
  border-bottom-right-radius: var(--ps-radius-control);
}

.content .list-group-item.active,
.content .list-group-item.active:hover {
  border-color: var(--ps-primary);
  background: var(--ps-primary);
}

.content .img-thumbnail {
  border-color: var(--ps-border);
  border-radius: var(--ps-radius-tile);
}

/* ---- Alerts, labels, badges ----------------------------------------- */

.content .alert {
  border: 0;
  border-radius: var(--ps-radius-control);
  font-size: var(--ps-text-base);
}

.content .alert-info    { background: var(--ps-well-teal);   color: var(--ps-primary-deep); }
.content .alert-success { background: var(--ps-pill-bg);     color: var(--ps-pill-text); }
.content .alert-danger  { background: var(--ps-pill-warn-bg); color: var(--ps-pill-warn-text); }
.content .alert-warning { background: var(--ps-well-amber);  color: #7a5b00; }

.content .alert .alert-link { color: inherit; }

/* "YOU ARE VIEWING:" an inactive event (manage/base.html), with room
   between it and the page's breadcrumbs */
.content .ps-viewing { margin-bottom: 28px; }
.ps-viewing__label {
  margin-right: 4px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* Bootstrap labels become the design's status pills. */
.content .label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--ps-radius-pill);
  font-weight: 500;
  font-size: var(--ps-text-xs);
  line-height: 1.2;
}

.content .label-default { background: #eef0f2;                color: var(--ps-muted); }
.content .label-primary { background: var(--ps-primary);       color: #fff; }
.content .label-info    { background: var(--ps-well-teal);     color: var(--ps-primary-deep); }
.content .label-success { background: var(--ps-pill-bg);       color: var(--ps-pill-text); }
.content .label-warning { background: var(--ps-well-amber);    color: #7a5b00; }
.content .label-danger  { background: var(--ps-pill-warn-bg);  color: var(--ps-pill-warn-text); }

.content .badge {
  border-radius: var(--ps-radius-pill);
  background: var(--ps-primary);
  font-weight: 700;
}

/* ---- Tabs ----------------------------------------------------------- */

/* Tab pills, as in the Figma "Edit Home / Subcontractors / Preview". */
.content .nav-tabs,
.content .nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 0;
}

.content .nav-tabs::before,
.content .nav-tabs::after,
.content .nav-pills::before,
.content .nav-pills::after { display: none; }

.content .nav-tabs > li,
.content .nav-pills > li { float: none; margin: 0; }

/* sized like the buttons (.ps-btn-secondary): 35px tall, DM Sans 12px */
.content .nav-tabs > li > a,
.content .nav-pills > li > a {
  display: inline-flex;
  align-items: center;
  height: 35px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  font-family: var(--ps-font);
  font-size: var(--ps-text-sm);
  line-height: 1;
  color: var(--ps-ink);
}

.content .nav-tabs > li > a:hover,
.content .nav-pills > li > a:hover {
  border-color: var(--ps-primary);
  background: var(--ps-surface);
}

.content .nav-tabs > li.active > a,
.content .nav-tabs > li.active > a:hover,
.content .nav-tabs > li.active > a:focus,
.content .nav-pills > li.active > a,
.content .nav-pills > li.active > a:hover,
.content .nav-pills > li.active > a:focus {
  border-color: var(--ps-primary);
  background: var(--ps-primary);
  color: #fff;
  font-weight: 700;
}

/* ---- Dropdowns -------------------------------------------------------- */

.content .dropdown-menu {
  padding: 4px 0;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  box-shadow: 0 8px 24px rgba(11, 45, 60, 0.12);
  font-size: var(--ps-text-sm);
}

.content .dropdown-menu > li > a {
  padding: 8px 16px;
  color: var(--ps-ink);
}

.content .dropdown-menu > li > a:hover,
.content .dropdown-menu > li > a:focus {
  background: var(--ps-bg);
  color: var(--ps-ink);
}

.content .dropdown-menu > .active > a,
.content .dropdown-menu > li > a.active {
  background: var(--ps-well-teal);
  color: var(--ps-primary-deep);
}

.content .dropdown-menu .divider { background: var(--ps-border); }

/* ---- Report filter bars -------------------------------------------- */

/* Reports wrap their date filters in a Bootstrap navbar; show it as a
   toolbar strip instead of a grey nav bar. */
.content .navbar-default {
  min-height: 0;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-card);
  background: var(--ps-surface);
}

.content .navbar-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.content .navbar-form.navbar-left,
.content .navbar-form.navbar-right { float: none; }

.content .navbar-form .form-group { margin: 0; }

.content .navbar-text {
  margin: 0;
  color: var(--ps-muted);
}

/* A filter form used without the navbar wrapper (newsletter export). */
.content > .ps-page > .ps-page-body--bare > .navbar-form,
.content .ps-page-body > .navbar-form { margin-bottom: 20px; }

/* ---- Modals ----------------------------------------------------------- */

.modal-content {
  border: 0;
  border-radius: var(--ps-radius-card);
  box-shadow: 0 16px 48px rgba(11, 45, 60, 0.2);
}

.modal-header,
.modal-footer { border-color: var(--ps-border); }

.modal-title {
  font-weight: 700;
  color: var(--ps-ink);
}

/* ---- Home photos & upload modal (parade-homes/detail.html) ------------ */

.ps-photos-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ps-photos-head h3 { margin-top: 0; }
.ps-photos-head .ps-btn-primary { flex: 0 0 auto; gap: 2px; }

.ps-photos-drop { margin: 4px 0 12px; }

.ps-photos-meta,
.ps-photos-empty {
  color: var(--ps-muted);
  font-size: var(--ps-text-sm);
}

.ps-photo-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ps-border);
  border-radius: 50%;
  background: var(--ps-surface);
  color: var(--ps-muted);
  font-size: 16px;
  box-shadow: 0 1px 3px rgba(11, 45, 60, 0.15);
}

.ps-photo-delete:hover,
.ps-photo-delete:focus {
  color: var(--ps-pill-warn-text);
  border-color: var(--ps-pill-warn-text);
  background: var(--ps-pill-warn-bg);
}

/* the page behind blurs while the modal is open */
body.ps-photo-upload-open .modal-backdrop.in {
  opacity: 1;
  background: rgba(11, 45, 60, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.ps-upload-modal .modal-dialog { max-width: 520px; }

.ps-upload-modal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 60px);
  padding: 24px;
}

.ps-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ps-upload-head h2 {
  margin: 0;
  font-size: var(--ps-text-xl);
  font-weight: 700;
  color: var(--ps-ink);
}

.ps-upload-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ps-ink);
  font-size: 22px;
}

.ps-upload-close:hover,
.ps-upload-close:focus { background: var(--ps-bg); }

.ps-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 28px 16px;
  border: 2px dashed var(--ps-border);
  border-radius: var(--ps-radius-card);
  background: var(--ps-bg);
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}

.ps-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ps-dropzone:hover,
.ps-dropzone.is-over,
.ps-dropzone:focus-within {
  border-color: var(--ps-primary);
  background: var(--ps-well-teal);
}

.ps-dropzone__icon {
  font-size: 32px;
  color: var(--ps-primary-deep);
}

.ps-dropzone__title {
  font-size: var(--ps-text-md);
  color: var(--ps-ink);
}

.ps-dropzone__title u { color: var(--ps-primary-link); }

.ps-dropzone__hint {
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.ps-upload-warning {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--ps-radius-control);
  background: var(--ps-well-amber);
  color: var(--ps-ink);
  font-size: var(--ps-text-sm);
}

.ps-upload-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.ps-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
}

.ps-upload-row + .ps-upload-row { margin-top: 8px; }

.ps-upload-row.is-error {
  border-color: var(--ps-pill-warn-bg);
  background: var(--ps-pill-warn-bg);
}

.ps-upload-row__thumb {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: var(--ps-radius-sm);
  background: var(--ps-placeholder);
  object-fit: cover;
}

.ps-upload-row__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ps-upload-row__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
}

.ps-upload-row__meta {
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.ps-upload-row.is-error .ps-upload-row__meta { color: var(--ps-pill-warn-text); }

.ps-upload-row__status {
  flex: 0 0 auto;
  display: flex;
  font-size: 20px;
}

.ps-upload-row.is-done .ps-upload-row__status { color: var(--ps-pill-text); }
.ps-upload-row.is-error .ps-upload-row__status { color: var(--ps-pill-warn-text); }

.ps-upload-ring {
  width: 24px;
  height: 24px;
  transform: rotate(-90deg);
}

.ps-upload-ring circle {
  fill: none;
  stroke-width: 3;
}

.ps-upload-ring__track { stroke: var(--ps-border); }

.ps-upload-ring__bar {
  stroke: var(--ps-primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.2s ease;
}

.ps-upload-row__action { flex: 0 0 auto; }

/* the trash can sits in the row, not over a thumbnail */
.ps-upload-row .ps-photo-delete {
  position: static;
  box-shadow: none;
}

.ps-upload-row__button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  color: var(--ps-ink);
  font-size: var(--ps-text-sm);
  white-space: nowrap;
}

.ps-upload-row__button:hover,
.ps-upload-row__button:focus { border-color: var(--ps-primary); }

.ps-upload-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.ps-upload-summary {
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

@media (max-width: 640px) {
  .ps-photos-head { flex-direction: column; }
  .ps-upload-modal .modal-content { padding: 18px; }
}

/* ---- Confirm pages ---------------------------------------------------- */

.ps-confirm-text {
  margin: 0 0 18px;
  font-size: var(--ps-text-md);
  color: var(--ps-ink);
}

.ps-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

/* ---- Phones ------------------------------------------------------------ */

@media (max-width: 640px) {
  .ps-list-title { font-size: 28px; }

  /* Change Event is also on the sidebar's event card; the header needs
     the room for the event name and the account chip. */
  .manage-header > .header-change-event { display: none; }

  header.manage-header { gap: 10px; padding-right: 16px; }

  .manage-header .event-meta { flex: 1 1 auto; }

  .manage-header .header-spacer { display: none; }

  /* 16px is the phone gutter */
  .content { padding-left: 16px; padding-right: 16px; }

  .manage-header .event-dates {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---- Generic record details (manage/base/detail.html) ------------------- */

/* a 1px line between rows (the lists' colour, as on Traits), a little
   room above and below, and the values close to their labels */
.ps-detail-table > tbody > tr > th,
.ps-detail-table > tbody > tr > td {
  padding: 14px 0;
  border-top: 1px solid var(--ps-border);
}

.ps-detail-table > tbody > tr > th {
  width: 180px;
  padding-right: 20px;
  font-weight: 500;
  color: var(--ps-muted);
  vertical-align: top;
}

.ps-detail-table > tbody > tr:first-child > th,
.ps-detail-table > tbody > tr:first-child > td { border-top: 0; }

.ps-detail-table .help-block {
  margin: 4px 0 0;
  font-weight: 400;
}

.ps-detail-table__image {
  max-width: 200px;
  max-height: 160px;
  border-radius: var(--ps-radius-tile);
}

/* ---- Date picker ---------------------------------------------------------
   Every date box's calendar (bootstrap-datepicker, set up in
   manage/base/base.html) in the dashboard's look: a rounded card, the
   teal selected day, today ringed, our buttons for Today and Clear. */

.ps-date-input {
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7378' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

body .datepicker.dropdown-menu {
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-card);
  background: var(--ps-surface);
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
  font-family: var(--ps-font);
  font-size: var(--ps-text-sm);
  color: var(--ps-ink);
}

/* no Bootstrap 2 pointer triangles */
body .datepicker-dropdown::before,
body .datepicker-dropdown::after { display: none; }

body .datepicker table { border-collapse: separate; border-spacing: 2px; }

body .datepicker table tr td,
body .datepicker table tr th {
  width: 36px;
  height: 34px;
  border-radius: 8px;
  border: 0;
  text-shadow: none;
}

body .datepicker thead tr:first-child th { height: 38px; }

body .datepicker .datepicker-switch {
  font-size: var(--ps-text-base);
  font-weight: 700;
  color: var(--ps-ink);
}

body .datepicker .prev,
body .datepicker .next { color: var(--ps-muted); font-size: 18px; }

body .datepicker th.dow {
  font-size: 12px;
  font-weight: 500;
  color: var(--ps-muted);
}

body .datepicker table tr td.day:hover,
body .datepicker table tr td.focused,
body .datepicker thead tr:first-child th:hover,
body .datepicker tfoot tr th:hover,
body .datepicker table tr td span:hover {
  background: var(--ps-well-teal);
}

body .datepicker table tr td.old,
body .datepicker table tr td.new { color: var(--ps-muted); opacity: 0.55; }

body .datepicker table tr td.today,
body .datepicker table tr td.today:hover {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ps-primary);
  color: var(--ps-primary-deep);
  font-weight: 700;
}

body .datepicker table tr td.active,
body .datepicker table tr td.active:hover,
body .datepicker table tr td.active.today,
body .datepicker table tr td span.active,
body .datepicker table tr td span.active:hover {
  background: var(--ps-primary) !important;
  background-image: none !important;
  box-shadow: none;
  color: #fff !important;
  font-weight: 700;
}

body .datepicker table tr td span {
  height: 44px;
  line-height: 44px;
  border-radius: 8px;
}

/* Today and Clear: the dashboard's outlined buttons */
body .datepicker tfoot tr th {
  height: auto;
  padding: 8px 0;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  font-weight: 600;
  color: var(--ps-primary-link);
}

body .datepicker tfoot tr:first-child th { margin-top: 6px; }

/* ---- File uploads ------------------------------------------------------- */

/* Browser-default "Choose File" controls, restyled to sit with the other
   inputs: the field matches .form-control, the button .ps-btn-secondary.
   Covers Django forms and the Vue editors, plus the rich-text image picker,
   which is attached outside .content. */
.content input[type="file"],
#image-picker input[type="file"] {
  display: block;
  width: 100%;
  max-width: 520px;
  height: 38px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  box-shadow: none;
  font-family: inherit;
  font-size: var(--ps-text-sm);
  line-height: 28px;
  color: var(--ps-muted);
  cursor: pointer;
}

#image-picker input[type="file"] {
  display: inline-block;
  width: auto;
  vertical-align: middle;
}

.content input[type="file"]:hover,
#image-picker input[type="file"]:hover {
  border-color: var(--ps-primary);
}

.content input[type="file"]:focus,
.content input[type="file"]:focus-visible,
#image-picker input[type="file"]:focus-visible {
  outline: none;
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.15);
}

/* Kept as separate rules: one unknown pseudo-element in a selector list
   would drop the whole rule in the other engine. */
.content input[type="file"]::file-selector-button,
#image-picker input[type="file"]::file-selector-button {
  height: 28px;
  margin-right: 12px;
  padding: 0 14px;
  border: 1px solid var(--ps-border);
  border-radius: 7px;
  background: var(--ps-bg);
  font-family: inherit;
  font-weight: 500;
  font-size: var(--ps-text-sm);
  color: var(--ps-ink);
  cursor: pointer;
  transition: background .15s ease-in-out, border-color .15s ease-in-out, color .15s ease-in-out;
}

.content input[type="file"]::-webkit-file-upload-button,
#image-picker input[type="file"]::-webkit-file-upload-button {
  height: 28px;
  margin-right: 12px;
  padding: 0 14px;
  border: 1px solid var(--ps-border);
  border-radius: 7px;
  background: var(--ps-bg);
  font-family: inherit;
  font-weight: 500;
  font-size: var(--ps-text-sm);
  color: var(--ps-ink);
  cursor: pointer;
}

.content input[type="file"]:hover::file-selector-button,
#image-picker input[type="file"]:hover::file-selector-button {
  border-color: var(--ps-primary);
  background: var(--ps-well-teal);
  color: var(--ps-primary-deep);
}

.content input[type="file"]:hover::-webkit-file-upload-button,
#image-picker input[type="file"]:hover::-webkit-file-upload-button {
  border-color: var(--ps-primary);
  background: var(--ps-well-teal);
  color: var(--ps-primary-deep);
}

.content input[type="file"]:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* The current upload, above the picker (manage/widgets/file_input.html). */
.ps-file-current {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 520px;
  margin-bottom: 8px;
}

.ps-file-current__thumb {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-tile);
  background: var(--ps-bg);
}

.ps-file-current__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--ps-text-sm);
}

.content .ps-file-current__clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 0 auto;
  font-weight: 400;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
  cursor: pointer;
}

/* ---------------------------------------------------------------- *
 * Subcontractors list: card grid (manage/subcontractors/list.html)
 * ---------------------------------------------------------------- */

.ps-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.ps-sub-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  min-width: 0;
}

.ps-sub-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ps-sub-card__name {
  min-width: 0;
  font-weight: 700;
  font-size: var(--ps-text-md);
  line-height: 1.3;
  color: var(--ps-ink);
  overflow-wrap: anywhere;
}

.ps-sub-card__name:hover,
.ps-sub-card__name:focus {
  color: var(--ps-primary-active);
}

.ps-sub-card__head .ps-pill {
  flex: 0 0 auto;
  height: 24px;
}

.ps-pill--muted {
  background: #eef0f2;
  color: var(--ps-muted);
}

.ps-sub-card__jobs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ps-sub-card__jobs li {
  padding: 3px 10px;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-well-teal);
  font-size: var(--ps-text-xs);
  color: var(--ps-primary-deep);
}

.ps-sub-card__contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--ps-text-sm);
  color: var(--ps-ink);
}

.ps-sub-card__contact li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.ps-sub-card__contact li a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-sub-card__contact .zmdi {
  flex: 0 0 14px;
  color: var(--ps-muted);
  text-align: center;
}

.ps-sub-card__none {
  color: var(--ps-muted);
}

.ps-sub-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--ps-border);
}

.ps-sub-card__homes {
  font-size: var(--ps-text-xs);
  color: var(--ps-muted);
}

/* Lists on phones: the stats panel and search box share the width
   instead of pushing the page sideways. */
@media (max-width: 640px) {
  .ps-list-stats {
    align-self: stretch;
    gap: 14px;
    padding: 14px 16px;
  }

  .ps-list-stats > div:not(.ps-list-stats__rule) {
    flex: 1 1 0;
    min-width: 0;
  }

  .ps-list-stats__value { font-size: var(--ps-text-lg); }
  .ps-list-stats__label { font-size: var(--ps-text-xs); }

  .ps-search { width: 100%; }

  .ps-search__field { flex: 1 1 auto; min-width: 0; }

  .ps-search__input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
}

/* Subcontractor page (manage/subcontractors/detail.html). */
.ps-sub-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
}

.ps-sub-detail h3 { margin-top: 0; }

.ps-sub-detail__info {
  padding-right: 32px;
  border-right: 1px solid var(--ps-border);
}

.ps-sub-detail__about {
  margin-top: 14px;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.ps-sub-detail__main {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

@media (max-width: 991px) {
  .ps-sub-detail { grid-template-columns: minmax(0, 1fr); }
  .ps-sub-detail__info {
    padding: 0 0 24px;
    border-right: 0;
    border-bottom: 1px solid var(--ps-border);
  }
}

/* ---- Multi-select pickers (select2 v3), e.g. Login Accounts ------------ */

/* select2 copies the select's .form-control onto its container, which drew
   a field inside a field. Style the inner box as the field instead. */
.content .select2-container.form-control {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.content .select2-container-multi .select2-choices {
  min-height: 38px;
  padding: 3px 6px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  background-image: none;
}

.content .select2-container-multi.select2-container-active .select2-choices {
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.15);
}

.content .select2-container-multi .select2-choices .select2-search-choice {
  margin: 3px 4px 3px 0;
  padding: 4px 10px 4px 22px;
  border: 0;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-well-teal);
  background-image: none;
  box-shadow: none;
  font-size: var(--ps-text-sm);
  line-height: 16px;
  color: var(--ps-primary-deep);
}

.content .select2-container-multi .select2-search-choice-close { top: 6px; left: 6px; }

.content .select2-container-multi .select2-choices .select2-search-field input {
  height: 28px;
  margin: 2px 0;
  padding: 0 4px;
  font-family: inherit;
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
}

/* ---- Single pickers (select2 v3), e.g. Choose Client, menu icons ---- */

.content .select2-container .select2-choice {
  height: 38px;
  padding: 0 0 0 12px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-surface);
  background-image: none;
  box-shadow: none;
  font-size: var(--ps-text-base);
  line-height: 36px;
  color: var(--ps-ink);
}

.content .select2-container .select2-choice.select2-default { color: var(--ps-muted); }

.content .select2-container .select2-choice .select2-arrow {
  width: 34px;
  border: 0;
  border-radius: 0 var(--ps-radius-control) var(--ps-radius-control) 0;
  background: transparent;
  background-image: none;
}

/* A CSS chevron instead of select2's sprite, which showed its next frame
   (the "up" arrow) beside the down arrow in the wider box. */
.content .select2-container .select2-choice .select2-arrow b {
  position: relative;
  /* !important: select2.css swaps in select2x2.png with !important on
     high-DPI screens */
  background: none !important;
}

.content .select2-container .select2-choice .select2-arrow b::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ps-muted);
  border-bottom: 1.5px solid var(--ps-muted);
  transform: translate(-50%, -70%) rotate(45deg);
}

.content .select2-dropdown-open .select2-choice .select2-arrow b::after {
  transform: translate(-50%, -30%) rotate(-135deg);
}
.content .select2-container .select2-choice abbr { top: 12px; }

.content .select2-dropdown-open .select2-choice,
.content .select2-container-active .select2-choice {
  border-color: var(--ps-primary);
  background: var(--ps-surface);
  background-image: none;
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.2);
}

/* The open list is appended to <body>, outside .content; "body" outranks
   select2.css, which some pages load after this file. */
body .select2-drop {
  margin-top: 4px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  box-shadow: 0 8px 24px rgba(11, 45, 60, 0.12);
  font-family: var(--ps-font);
  font-size: var(--ps-text-base);
}

body .select2-drop.select2-drop-above { margin-top: -4px; }
body .select2-drop-active { border-color: var(--ps-border); }

body .select2-drop .select2-search { padding: 8px 8px 4px; }

body .select2-drop .select2-search input {
  height: 34px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  font-family: inherit;
  font-size: var(--ps-text-base);
}

body .select2-drop .select2-search input:focus { border-color: var(--ps-primary); }

body .select2-drop .select2-results {
  margin: 0;
  padding: 4px 8px 8px;
}

body .select2-drop .select2-results .select2-result-label { padding: 6px 8px; }

body .select2-drop .select2-results .select2-highlighted {
  border-radius: var(--ps-radius-sm);
  background: var(--ps-well-teal);
  color: var(--ps-primary-deep);
}

body .select2-drop .select2-results .select2-no-results,
body .select2-drop .select2-results .select2-searching {
  padding: 8px;
  background: transparent;
  color: var(--ps-muted);
}

/* ---- Info panel: the dashboard welcome card's look, for page guidance
   (e.g. manage/advertisements/_sizing.html) ---- */
.ps-info-panel {
  margin-bottom: var(--ps-card-gap);
  padding: 30px 40px;
  border: 1px solid var(--ps-border-soft);
  border-radius: var(--ps-radius-card);
  background: var(--ps-gradient-soft);
}

.ps-info-panel__title {
  margin: 0 0 20px;
  font-family: var(--ps-font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
  color: var(--ps-ink-display);
}

.ps-info-panel__figures {
  display: flex;
  align-items: center;
  gap: 40px;
}

.ps-info-figure__value {
  margin: 0;
  font-weight: 700;
  font-size: var(--ps-text-display);
  line-height: 1.1;
  color: var(--ps-primary-deep);
}

.ps-info-figure__label {
  margin: 6px 0 0;
  font-weight: 600;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.ps-info-figure__rule {
  align-self: stretch;
  width: 1px;
  background: rgba(13, 110, 138, 0.18);
}

.ps-info-panel__text {
  margin: 20px 0 0;
  font-size: var(--ps-text-base);
  line-height: 1.6;
  color: var(--ps-ink);
}

@media (max-width: 640px) {
  .ps-info-panel { padding: 22px; }
  .ps-info-panel__figures { flex-wrap: wrap; gap: 16px 28px; }
  .ps-info-figure__rule { display: none; }
  .ps-info-figure__value { font-size: 26px; }
}

/* ---- Drag to reorder (manage/traits/list.html, manage/menu/list.html) ---- */
.ps-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--ps-radius-sm);
  color: var(--ps-muted);
  font-size: 18px;
  cursor: grab;
}

.ps-drag-handle:hover { background: var(--ps-bg); color: var(--ps-ink); }

.is-sorted .ps-drag-handle { visibility: hidden; }

/* the handle's column only as wide as the handle, not a share of the
   table (Traits, Voting Categories) */
.ps-table tr > :first-child:has(> .ps-drag-handle),
.ps-table:has(td:first-child > .ps-drag-handle) thead th:first-child { width: 1%; }

/* a column of counts, centred (e.g. Voting Categories' Total Homes and
   Total Votes; the page centres their headings) */
.ps-table td:has(> .ps-num-cell) { text-align: center; }

/* where the dragged row will go (Traits, App Menu) */
.is-drag-ghost { background: var(--ps-well-teal); }

/* ---- Save bar: Cancel and Save under a long form, kept in view at the
   bottom while it scrolls, with "Last saved" or "Unsaved changes" on the
   left (pages/detail.html, parade-settings.html) ---- */
.ps-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: var(--ps-card-gap) 0 0;
  padding: 14px 22px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-card);
  background: var(--ps-surface);
  box-shadow: 0 -6px 18px rgba(11, 45, 60, 0.06);
}

.ps-save-bar__status {
  margin-right: auto;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.ps-save-bar__status.is-dirty { color: #7a5b00; font-weight: 500; }
.ps-save-bar__status .zmdi { margin-right: 4px; }

/* on a phone it would cover much of the form: it sits at the end instead,
   with room below to scroll it clear of the file drawer (#user-files) */
@media (max-width: 600px) {
  .ps-save-bar { position: static; margin: var(--ps-card-gap) 0 90px; }
}

/* ---- Delete, at the bottom of a page (parade-homes/detail.html) ---- */
/* the button under its text, on the left: the file drawer (#user-files)
   covers the bottom right */
.ps-danger-zone {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--ps-border);
}

.ps-danger-zone h3 {
  margin: 0 0 4px;
  font-size: var(--ps-text-md);
  font-weight: 700;
  color: var(--ps-ink);
}

.ps-danger-zone p {
  margin: 0;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

/* ---- Stacked forms (manage/base/create.html, HorizontalFormHelper) ----
   Labels above the fields. Short fields share a row, as many as fit;
   long ones (text areas, lists, uploads) take the whole row. */

.ps-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0 24px;
  align-items: start;
}

.ps-form-grid > * { min-width: 0; }

.ps-form-grid > .alert,
.ps-form-grid > .form-group:has(textarea),
.ps-form-grid > .form-group:has(select[multiple]),
.ps-form-grid > .form-group:has(input[type="file"]),
.ps-form-grid > .form-group:has(.controls .checkbox),
.ps-form-grid > .form-group:has(.controls .radio),
.ps-form-grid > .form-group:has(.select2-container-multi) { grid-column: 1 / -1; }

.ps-form-grid > .form-group { margin: 0 0 18px; }

/* Two to a row, in the form's own field order, yes/no switches included
   (traits/_form.html). Narrow screens get one. */
.ps-form-grid--pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps-form-grid--pairs > .form-group:has(.controls .checkbox) { grid-column: auto; }

@media (max-width: 640px) {
  .ps-form-grid--pairs { grid-template-columns: minmax(0, 1fr); }
}

/* the trait form's rows of their own */
.ps-trait-form > #div_id_name,
.ps-trait-form > #div_id_help_text,
.ps-trait-form > #div_id_choices { grid-column: 1 / -1; }

.ps-form-grid .control-label {
  display: block;
  float: none;
  width: auto;
  margin-bottom: 6px;
  padding: 0;
  font-weight: 500;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
  text-align: left;
}

.ps-form-grid .help-block {
  margin: 6px 0 0;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

/* The YES/NO switch, drawn so a plain checkbox can wear it (82x28, #1D88AD
   when on, like .ps-toggle). SVG text can't use the page's DM Sans. */
:root {
  --ps-switch-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='82' height='28'%3E%3Crect width='82' height='28' rx='14' fill='%231a1d1f'/%3E%3Ccircle cx='14' cy='14' r='11' fill='%23fff'/%3E%3Ctext x='60' y='17.5' fill='%23fff' font-family='Helvetica,Arial,sans-serif' font-size='10' font-weight='700' text-anchor='middle'%3ENO%3C/text%3E%3C/svg%3E");
  --ps-switch-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='82' height='28'%3E%3Crect width='82' height='28' rx='14' fill='%231d88ad'/%3E%3Ccircle cx='68' cy='14' r='11' fill='%23fff'/%3E%3Ctext x='26' y='17.5' fill='%23fff' font-family='Helvetica,Arial,sans-serif' font-size='10' font-weight='700' text-anchor='middle'%3EYES%3C/text%3E%3C/svg%3E");
  /* the same, reading OFF / ON (.ps-switch--onoff) */
  --ps-switch-off-onoff: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='82' height='28'%3E%3Crect width='82' height='28' rx='14' fill='%231a1d1f'/%3E%3Ccircle cx='14' cy='14' r='11' fill='%23fff'/%3E%3Ctext x='60' y='17.5' fill='%23fff' font-family='Helvetica,Arial,sans-serif' font-size='10' font-weight='700' text-anchor='middle'%3EOFF%3C/text%3E%3C/svg%3E");
  --ps-switch-on-onoff: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='82' height='28'%3E%3Crect width='82' height='28' rx='14' fill='%231d88ad'/%3E%3Ccircle cx='68' cy='14' r='11' fill='%23fff'/%3E%3Ctext x='26' y='17.5' fill='%23fff' font-family='Helvetica,Arial,sans-serif' font-size='10' font-weight='700' text-anchor='middle'%3EON%3C/text%3E%3C/svg%3E");
}

/* a yes/no field (a lone checkbox, not a list of choices): its label above
   a YES/NO switch, like the Homes list's */
.ps-form-grid .form-group > .checkbox { margin: 0; }

.ps-form-grid .form-group > .checkbox > label {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 6px;
  min-height: 0;
  padding: 0;
  font-weight: 500;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

.ps-form-grid .form-group > .checkbox input[type="checkbox"] {
  position: static;
  width: 82px;
  height: 28px;
  margin: 0;
  border: 0;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-switch-off) no-repeat center / 82px 28px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.ps-form-grid .form-group > .checkbox input[type="checkbox"]:checked {
  background-image: var(--ps-switch-on);
}

/* a switch that reads OFF / ON, where its help text talks of on and off */
.ps-form-grid .form-group > .checkbox input[type="checkbox"].ps-switch--onoff {
  background-image: var(--ps-switch-off-onoff);
}

.ps-form-grid .form-group > .checkbox input[type="checkbox"].ps-switch--onoff:checked {
  background-image: var(--ps-switch-on-onoff);
}

/* no ring for a mouse click (Bootstrap's blue one); keyboard focus below */
.ps-form-grid .checkbox input[type="checkbox"]:focus { outline: none; }

.ps-form-grid .form-group > .checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--ps-primary);
  outline-offset: 2px;
}

/* a list of choices (e.g. an ad's Areas): one tidy row per option, its
   name on the left and a YES/NO switch on the right */
.ps-form-grid .controls:has(> .checkbox) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0 32px;
}

.ps-form-grid .controls > .checkbox,
.ps-area-list > .checkbox { margin: 0; }

.ps-form-grid .controls > .checkbox > label,
.ps-area-list > .checkbox > label {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 1px solid var(--ps-border);
  font-weight: 400;
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
  cursor: pointer;
}

/* an ad's areas, grouped by where they show (advertisements/_areas.html) */
.ps-area-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.ps-area-group {
  padding: 4px 16px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
}

.ps-area-group h4 {
  margin: 12px 0 4px;
  font-size: var(--ps-text-xs);
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ps-muted);
}

.ps-area-list > .checkbox:last-child > label { border-bottom: 0; }

.ps-form-grid .controls > .checkbox input[type="checkbox"],
.ps-area-list > .checkbox input[type="checkbox"] {
  flex: 0 0 auto;
  position: static;
  width: 82px;
  height: 28px;
  margin: 0;
  border: 0;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-switch-off) no-repeat center / 82px 28px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.ps-form-grid .controls > .checkbox input[type="checkbox"]:checked,
.ps-area-list > .checkbox input[type="checkbox"]:checked {
  background-image: var(--ps-switch-on);
}

.ps-form-grid .controls > .checkbox input[type="checkbox"]:focus-visible,
.ps-area-list > .checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--ps-primary);
  outline-offset: 2px;
}

/* an ad's areas read OFF / ON, like its "All areas" switch */
.ps-area-list > .checkbox input[type="checkbox"] { background-image: var(--ps-switch-off-onoff); }
.ps-area-list > .checkbox input[type="checkbox"]:checked { background-image: var(--ps-switch-on-onoff); }

.ps-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--ps-border);
}

/* ---- Rich text editor (TinyMCE 4, manage/_tinymce.html) -------------- */

.content .mce-tinymce.mce-panel {
  border: 1px solid var(--ps-border) !important;
  border-radius: var(--ps-radius-control);
  overflow: hidden;
  box-shadow: none !important;
}

.content .mce-tinymce .mce-toolbar-grp {
  padding: 4px 6px;
  border-bottom: 1px solid var(--ps-border) !important;
  background: var(--ps-bg) !important;
  background-image: none !important;
}

.content .mce-tinymce .mce-btn,
.content .mce-tinymce .mce-btn button {
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.content .mce-tinymce .mce-btn:hover,
.content .mce-tinymce .mce-btn:focus {
  background: var(--ps-surface) !important;
  border-color: var(--ps-border) !important;
}

.content .mce-tinymce .mce-btn.mce-active,
.content .mce-tinymce .mce-btn.mce-active:hover {
  background: var(--ps-well-teal) !important;
  border-color: var(--ps-well-teal) !important;
}

.content .mce-tinymce .mce-btn.mce-active i { color: var(--ps-primary-deep) !important; }

/* a little tighter than the skin, so the toolbar fits one row */
.content .mce-tinymce .mce-btn:not(.mce-listbox) button { padding: 4px 6px !important; }
.content .mce-tinymce .mce-btn-group:not(:first-child) {
  margin-left: 4px;
  padding-left: 4px;
}

/* the Paragraph / heading picker reads as a select */
.content .mce-tinymce .mce-listbox {
  min-width: 128px;
  border-color: var(--ps-border) !important;
  background: var(--ps-surface) !important;
}

.content .mce-tinymce .mce-listbox button { font-family: var(--ps-font) !important; }

.content .mce-tinymce .mce-statusbar {
  border-top: 1px solid var(--ps-border) !important;
  background: var(--ps-surface) !important;
}

/* no "p" element path (elementpath: false is newer than our TinyMCE) */
.content .mce-tinymce .mce-path { display: none !important; }
.content .mce-tinymce .mce-wordcount {
  font-family: var(--ps-font);
  font-size: var(--ps-text-xs);
  color: var(--ps-muted);
}

/* ---- Dialogs (node-apps/manage PsDialog.vue) ---------------------------
   The editor's image and source code dialogs. Header, footer, drop zone
   and buttons are the photo upload modal's (.ps-upload-*, .ps-dropzone). */

body.ps-dialog-open { overflow: hidden; }

.ps-dialog {
  position: fixed;
  inset: 0;
  z-index: 65537; /* above TinyMCE's own layers */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  background: rgba(11, 45, 60, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-family: var(--ps-font);
}

.ps-dialog__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: 100%;
  padding: 24px;
  border-radius: var(--ps-radius-card);
  background: var(--ps-surface);
  box-shadow: 0 24px 60px rgba(11, 45, 60, 0.25);
}

.ps-dialog__panel--wide { max-width: 760px; }

.ps-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* room for focus rings at the edges */
  margin: 0 -4px;
  padding: 0 4px;
}

.ps-dialog__foot {
  flex: 0 0 auto;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--ps-border);
}

.ps-dialog__actions {
  display: inline-flex;
  gap: 10px;
  margin-left: auto;
}

.ps-dialog .ps-btn-primary { gap: 6px; }
.ps-dialog .ps-btn-primary[disabled] { opacity: 0.45; cursor: not-allowed; filter: none; }
.ps-dialog .ps-field { margin-bottom: 0; }

/* "Are you sure?" (confirm.js) */
.ps-confirm .ps-dialog__panel { max-width: 440px; }

.ps-confirm .ps-upload-head { margin-bottom: 10px; }

.ps-confirm .ps-upload-head h2 { font-size: var(--ps-text-lg); }

.ps-confirm__message {
  margin: 0;
  font-size: var(--ps-text-base);
  line-height: 1.5;
  color: var(--ps-ink);
}

.ps-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 35px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--ps-radius-control);
  background: var(--ps-pill-warn-text);
  color: #fff;
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: var(--ps-text-sm);
}

.ps-btn-danger:hover,
.ps-btn-danger:focus {
  background: #9e2b23;
  color: #fff;
}

/* orange: a big change that can't be undone but isn't a delete, e.g. a
   ticket's Reset (it clears the visitor and visits) */
.ps-btn-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 35px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--ps-radius-control);
  background: #c2620f;
  color: #fff;
  font-family: var(--ps-font);
  font-weight: 700;
  font-size: var(--ps-text-sm);
}

.ps-btn-warning:hover,
.ps-btn-warning:focus {
  background: #9a4d0b;
  color: #fff;
  text-decoration: none;
}

/* A button's explanation, shown at once on hover (and keyboard focus),
   unlike a title="", which waits and often doesn't show at all:
   <a class="ps-btn-secondary" data-tip="What this does">. Under the
   button, from its right edge, so one near the page's edge stays on it. */
[data-tip] { position: relative; }

[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1060;
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: var(--ps-radius-control);
  background: var(--ps-ink);
  color: #fff;
  font-family: var(--ps-font);
  font-size: var(--ps-text-sm);
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s;
}

[data-tip]:hover::after,
[data-tip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

/* a list row's icon button: to its left, inside the table (a list card
   cuts off anything below it) */
.ps-row-actions [data-tip]::after {
  top: 50%;
  right: calc(100% + 8px);
  transform: translateY(-50%);
  max-width: 240px;
}

/* a second row of a page's buttons, under its title and right-aligned, in
   groups set apart by a thin line (a ticket's page) */
.ps-action-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px 0;
  margin-bottom: var(--ps-card-gap);
}

.ps-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ps-action-group + .ps-action-group {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--ps-border);
}

/* the image dialog: upload, then the client's images to pick from */
.ps-image-library { margin-top: 20px; }

.ps-image-library__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ps-image-library__head h3 {
  margin: 0;
  font-size: var(--ps-text-md);
  font-weight: 700;
  color: var(--ps-ink);
}

.ps-dialog .ps-image-library__search {
  width: 220px;
  max-width: 50%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  font-size: var(--ps-text-sm);
}

.ps-image-library__note {
  margin: 0;
  padding: 18px;
  border-radius: var(--ps-radius-control);
  background: var(--ps-bg);
  color: var(--ps-muted);
  font-size: var(--ps-text-sm);
  text-align: center;
}

.ps-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-height: 290px;
  overflow-y: auto;
  margin: 0;
  padding: 3px;
  list-style: none;
}

.ps-image-grid li { position: relative; }

.ps-image-grid__pick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  /* a light check pattern, so white and transparent logos still show */
  background: #fff repeating-conic-gradient(#f1f3f5 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
  cursor: pointer;
}

.ps-image-grid__pick img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ps-image-grid__pick:hover { border-color: var(--ps-primary); }

.ps-image-grid li.is-selected .ps-image-grid__pick {
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.35);
}

.ps-image-grid__check {
  position: absolute;
  top: 6px;
  left: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ps-primary);
  color: #fff;
  font-size: 14px;
}

.ps-image-grid li.is-selected .ps-image-grid__check { display: flex; }

.ps-image-grid__badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 1px 8px;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-ink);
  color: #fff;
  font-size: var(--ps-text-2xs);
  font-weight: 700;
}

.ps-image-grid__delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ps-border);
  border-radius: 50%;
  background: var(--ps-surface);
  color: var(--ps-muted);
  font-size: 15px;
  opacity: 0;
}

.ps-image-grid li:hover .ps-image-grid__delete,
.ps-image-grid__delete:focus { opacity: 1; }

.ps-image-grid__delete:hover,
.ps-image-grid__delete:focus {
  color: var(--ps-pill-warn-text);
  border-color: var(--ps-pill-warn-text);
  background: var(--ps-pill-warn-bg);
}

@media (hover: none) {
  .ps-image-grid__delete { opacity: 1; }
}

.ps-image-library__web {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ps-primary-link);
  font-size: var(--ps-text-sm);
}

.ps-image-library__web:hover { text-decoration: underline; }
.ps-image-library__address { margin-top: 12px; }

.ps-image-describe {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--ps-border);
}

.ps-image-describe__hint {
  display: block;
  margin-top: 6px;
  font-size: var(--ps-text-xs);
  color: var(--ps-muted);
}

/* the link dialog */
.ps-link-preview {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
  min-width: 0;
}

.ps-link-preview .ps-field__error { margin-top: 0; }

.ps-link-preview__href {
  overflow: hidden;
  color: var(--ps-primary-link);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-dialog .ps-link-text { margin-top: 18px; }

.ps-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 2px;
  font-weight: 500;
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
  cursor: pointer;
}

.ps-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--ps-primary);
}

.ps-check small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: var(--ps-text-xs);
  color: var(--ps-muted);
}

.ps-link-remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ps-pill-warn-text);
  font-size: var(--ps-text-sm);
  font-weight: 500;
}

.ps-link-remove:hover { text-decoration: underline; }

/* the source code dialog */
.ps-code-editor__intro {
  margin: 0 0 12px;
  font-size: var(--ps-text-base);
  color: var(--ps-muted);
}

.ps-code-editor {
  display: block;
  width: 100%;
  height: 52vh;
  min-height: 220px;
  padding: 14px 16px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: #f8fafb;
  color: var(--ps-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  resize: vertical;
  tab-size: 2;
}

.ps-code-editor:focus {
  outline: none;
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.15);
}

@media (max-width: 600px) {
  .ps-dialog { padding: 12px; }
  .ps-dialog__panel { padding: 18px; }
  .ps-image-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .ps-dialog__actions { width: 100%; }
  .ps-dialog__actions .ps-btn-primary { flex: 1; }
}

/* ---- Report pages: summary cards and table cards ----------------------
   e.g. manage/tickets/ads-report.html, scheduled-push-clicks-report.html */

.ps-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--ps-card-gap);
  margin-bottom: var(--ps-card-gap);
}

.ps-stat-card__value {
  margin: 8px 0 4px;
  font-weight: 700;
  font-size: var(--ps-text-figure);
  line-height: 1.1;
  color: var(--ps-primary-deep);
}

.ps-stat-cards .help-block { margin: 0; }

.ps-report-card { margin-bottom: var(--ps-card-gap); }

.ps-report-card__title {
  margin: 0 0 4px;
  font-size: var(--ps-text-md);
  font-weight: 700;
  color: var(--ps-ink);
}

.ps-report-card__sub {
  margin: 0 0 12px;
  font-size: var(--ps-text-sm);
  color: var(--ps-muted);
}

/* a ps-list-card holding a titled table */
.ps-report-table-card { overflow-x: auto; }
.ps-report-table-card .ps-report-card__title,
.ps-report-table-card .ps-report-card__sub { padding: 0 22px; }
.ps-report-table-card .ps-report-card__title { padding-top: 20px; }
.ps-report-table-card .ps-table td { vertical-align: top; }

.ps-report-num {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.ps-report-num.is-zero { color: var(--ps-muted); font-weight: 400; }

.ps-pill--muted { background: #eef0f2; color: var(--ps-muted); }
.ps-pill--amber { background: var(--ps-well-amber); color: #7a5b00; }
.ps-pill.ps-pill--sm { height: 22px; padding: 0 9px; }

/* ---- Reports menu (manage/tickets/_reports_menu.html) --------------- */

.ps-reports-menu {
  min-width: 260px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 6px 0;
  border-color: var(--ps-border);
  border-radius: var(--ps-radius-control);
  box-shadow: 0 8px 24px rgba(11, 45, 60, 0.12);
}

.ps-reports-menu > li > a {
  padding: 6px 16px;
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
}

.ps-reports-menu > li > a:hover,
.ps-reports-menu > li > a:focus {
  background: var(--ps-well-teal);
  color: var(--ps-primary-deep);
}

.ps-reports-menu > .active > a,
.ps-reports-menu > .active > a:hover,
.ps-reports-menu > .active > a:focus {
  background: var(--ps-well-teal);
  color: var(--ps-primary-deep);
  font-weight: 700;
}

.ps-reports-menu .dropdown-header {
  padding: 6px 16px 2px;
  font-size: var(--ps-text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ps-nav-group);
}

.ps-reports-menu .divider { margin: 6px 0; background: var(--ps-border); }

/* ---- Form footers --------------------------------------------------- */

/* The Save button the shared add/edit forms render (form_helper) is a
   plain .btn; make it the primary action, as in the Figma forms. */
.content .form-group > [class*="col-md-offset"] > button[type="submit"].btn:not(.btn-danger),
.content .form-group > [class*="col-md-offset"] > input[type="submit"].btn:not(.btn-danger) {
  border-color: var(--ps-btn-primary);
  background: var(--ps-btn-primary);
  color: #fff;
  font-weight: 700;
}

.content .form-group > [class*="col-md-offset"] > button[type="submit"].btn:not(.btn-danger):hover,
.content .form-group > [class*="col-md-offset"] > input[type="submit"].btn:not(.btn-danger):hover {
  border-color: var(--ps-btn-primary-hover);
  background: var(--ps-btn-primary-hover);
  color: #fff;
}

/* Trades: the "Add a trade" form above the list (manage/trades/list.html). */
.ps-trade-add {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 20px 22px;
}

.ps-trade-add__title {
  margin: 0;
  font-weight: 700;
  font-size: var(--ps-text-lg);
  color: var(--ps-ink);
}

/* the name, with Create Trade beside it */
.ps-trade-add__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  align-self: stretch;
}

.ps-trade-add__name {
  flex: 1 1 260px;
  margin: 0;
}

.content .ps-trade-add__required {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 400;
  font-size: var(--ps-text-base);
  color: var(--ps-ink);
}

.ps-trade-add .help-block { margin: 0; }

/* A YES/NO switch on a checkbox outside the stacked forms, e.g. the
   Trades list's "Required on every home" (same drawing as the forms'). */
input[type="checkbox"].ps-switch {
  flex: none;
  width: 82px;
  height: 28px;
  margin: 0;
  border: 0;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-switch-off) no-repeat center / 82px 28px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

input[type="checkbox"].ps-switch:checked { background-image: var(--ps-switch-on); }
input[type="checkbox"].ps-switch:focus { outline: none; }
input[type="checkbox"].ps-switch:focus-visible {
  outline: 2px solid var(--ps-primary);
  outline-offset: 2px;
}

/* Add/Edit Subcontractor (subcontractors/_form.html): Name its own row */
.ps-sub-form > #div_id_name { grid-column: 1 / -1; }

/* Add/Update Account (users/_form.html): two to a row; Access on a row
   of its own; the passwords in their own section below */
.ps-form-grid.ps-account-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps-account-form > #div_id_access { grid-column: 1 / 2; }

@media (max-width: 640px) {
  .ps-form-grid.ps-account-form { grid-template-columns: minmax(0, 1fr); }
}

/* a headed part of a form, e.g. an account's Password */
.ps-form-section {
  margin-top: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--ps-border);
}

.ps-form-section__title {
  margin: 0;
  font-weight: 700;
  font-size: var(--ps-text-lg);
  color: var(--ps-ink);
}

.content .ps-form-section__help { margin: 4px 0 16px; }

/* Add/Edit Ticket Type (ticket_types.TICKET_TYPE_SECTIONS): titled
   sections, the first without a line above it; the long list of users
   on a row of its own */
.ps-form > .ps-form-section:first-child,
form > .ps-form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.ps-form-section + .ps-form-section { margin-top: 8px; }
/* Sales Open / Close: the date and the time side by side */
.ps-ticket-type-form #div_id_sale_starts_at .controls,
.ps-ticket-type-form #div_id_sale_ends_at .controls { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-ticket-type-form #div_id_sale_starts_at .controls > input,
.ps-ticket-type-form #div_id_sale_ends_at .controls > input { flex: 1 1 140px; width: auto; min-width: 0; }
.ps-ticket-type-form #div_id_sale_starts_at .controls > .help-block,
.ps-ticket-type-form #div_id_sale_ends_at .controls > .help-block { flex-basis: 100%; margin-top: 0; }
.ps-ticket-type-form > #div_id_authorized_users,
.ps-ticket-type-form > #div_id_notes { grid-column: 1 / -1; }
/* Authorized Users' switches, condensed (ticket-types/_form.html): as many
   columns as fit, tighter rows, and a scroll once the list is long; one
   column on a phone */
.ps-ticket-type-form #div_id_authorized_users .controls {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0 28px;
}
.ps-ticket-type-form #div_id_authorized_users .controls > .checkbox > label {
  min-height: 38px;
  padding: 5px 0;
  font-size: var(--ps-text-sm);
}
.ps-ticket-type-form #div_id_authorized_users .controls > .checkbox[hidden] { display: none; }
.ps-ticket-type-form #div_id_authorized_users.is-long .controls {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
}
@media (max-width: 640px) {
  .ps-ticket-type-form #div_id_authorized_users .controls { grid-template-columns: minmax(0, 1fr); }
}

/* its "Everyone" switch (all or none), the count, and a find box */
.ps-user-picker__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 6px;
  padding: 8px 12px;
  border-radius: var(--ps-radius-control);
  background: var(--ps-bg);
}
.ps-user-picker__all {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 700;
  font-size: var(--ps-text-sm);
  color: var(--ps-ink);
  cursor: pointer;
}
.ps-user-picker__all input[type="checkbox"] {
  flex: 0 0 auto;
  width: 82px;
  height: 28px;
  margin: 0;
  border: 0;
  border-radius: var(--ps-radius-pill);
  background: var(--ps-switch-off) no-repeat center / 82px 28px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.ps-user-picker__all input[type="checkbox"]:checked { background-image: var(--ps-switch-on); }
.ps-user-picker__all input[type="checkbox"]:focus { outline: none; }
.ps-user-picker__all input[type="checkbox"]:focus-visible { outline: 2px solid var(--ps-primary); outline-offset: 2px; }
.ps-user-picker__count { font-size: var(--ps-text-sm); color: var(--ps-muted); }
.content .ps-user-picker__find { width: 220px; height: 32px; margin-left: auto; }
@media (max-width: 640px) {
  .content .ps-user-picker__find { width: 100%; margin-left: 0; }
}

/* Edit Ticket (tickets/update.html): Ticket Type and Device on rows of
   their own, so a long type name or device ID isn't cut off */
.ps-ticket-form > #div_id_meta,
.ps-ticket-form > #div_id_device { grid-column: 1 / -1; }

/* Add/Edit Donation (donations/_form.html): Message its own row */
.ps-donation-form > #div_id_message { grid-column: 1 / -1; }

/* Add/Edit Business (businesses/_form.html): Address its own row */
.ps-biz-form > #div_id_address { grid-column: 1 / -1; }

/* Add/Edit Voting Category (awards/_form.html): Title its own row; the
   homes in two columns of switches (one on a phone), with Select all and
   Clear above them */
.ps-award-form > #div_id_title { grid-column: 1 / -1; }
.ps-form-grid .ps-award-form #div_id_homes .controls,
.ps-award-form #div_id_homes .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps-award-form #div_id_homes[hidden] { display: none; }

.ps-award-homes__bar {
  display: flex;
  gap: 8px;
  margin: 0 0 8px;
}

@media (max-width: 640px) {
  .ps-award-form #div_id_homes .controls { grid-template-columns: minmax(0, 1fr); }
}

/* Add/Edit Ad (advertisements/_form.html): four columns, so the switches
   (Active, All areas) and the dates (Show from, Show until) share a row;
   two on a narrower screen, keeping each pair together; one on a phone.
   Everything else takes a whole row (the Link, half of one). */
.ps-form-grid.ps-ad-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ps-ad-form > .form-group { grid-column: 1 / -1; }
.ps-ad-form > #div_id_link { grid-column: span 2; }
/* a switch's id is on the div inside its .form-group */
.ps-ad-form > .form-group:has(> #div_id_active),
.ps-ad-form > .form-group:has(> #div_id_all_areas),
.ps-ad-form > #div_id_starts_on,
.ps-ad-form > #div_id_ends_on { grid-column: auto; }

@media (max-width: 1100px) {
  .ps-form-grid.ps-ad-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .ps-form-grid.ps-ad-form { grid-template-columns: minmax(0, 1fr); }
  .ps-ad-form > #div_id_link { grid-column: auto; }
}

/* Create something on the spot under the field that picks it, e.g. a
   trade under a subcontractor's Trades (subcontractors/_form.html) */
.ps-quick-add {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  background: var(--ps-bg);
}

.ps-quick-add[hidden],
.ps-quick-add__open[hidden],
.ps-quick-add__error[hidden] { display: none; }

.ps-quick-add__intro { margin: 0 0 10px; color: var(--ps-ink); }

.ps-quick-add__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ps-quick-add__row .form-control { flex: 1 1 220px; width: auto; }

.ps-quick-add__error {
  margin: 8px 0 0;
  font-size: var(--ps-text-sm);
  color: var(--ps-pill-warn-text);
}

.ps-quick-add__open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--ps-text-sm);
  font-weight: 500;
  color: var(--ps-primary-link);
  cursor: pointer;
}

.ps-quick-add__open:hover { color: var(--ps-primary-active); }

.ps-sub-detail__info .ps-sub-card__jobs { margin-bottom: 14px; }

/* Jobs This Parade / Add to a Home, below the Edit Subcontractor form. */
.ps-sub-jobs {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--ps-border);
}

.ps-sub-jobs h3 { margin-top: 0; }

/* The parade's logo on the sidebar event card (manage/base.html). */
.sidebar-event .event-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.sidebar-event .event-logo-wrap .event-logo {
  display: block;
  max-width: 100%;
  max-height: 64px;
  width: auto;
  margin: 0;
  object-fit: contain;
}

/* Every visible pixel white; the transparent background stays clear. */
.sidebar-event .event-logo.is-white {
  filter: brightness(0) invert(1);
}

/* A logo with a solid background (JPG) keeps its colours on a white tile. */
.sidebar-event .event-logo-wrap.is-tile {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 6px 10px;
  border-radius: var(--ps-radius-tile);
  background: #fff;
}

.sidebar-event .event-logo-wrap.is-tile .event-logo { max-height: 52px; }

/* The ParadeSmart fallback logo is centred too. */
.sidebar-event > .event-logo {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* The Save button beside "View all Homes" (parade-homes/detail.html and
   create.html). HomeDetail.vue sets body.home-tab-edit while the Edit Info
   form is showing, and the button submits that form. */
#home-save-top { display: none; }
body.home-tab-edit #home-save-top { display: inline-flex; }

/* Reports > App Downloads (manage/app-downloads-report.html). */
.ps-app-dl-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--ps-card-gap);
  margin-bottom: 16px;
}

.ps-app-dl-summary .ps-label .zmdi { margin-right: 6px; }

.ps-app-dl-summary__value {
  margin: 8px 0 4px;
  font-weight: 700;
  font-size: var(--ps-text-figure);
  line-height: 1.1;
  color: var(--ps-primary-deep);
}

.ps-app-dl-summary .help-block { margin: 0; }

.ps-nowrap { white-space: nowrap; }

/* ---- Login (registration/login.html) ----------------------------- */

.ps-login-page {
  min-height: 100vh;
  margin: 0;
  font-family: var(--ps-font);
  color: var(--ps-ink);
  background: var(--ps-gradient-soft);
}

.ps-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 100vh;
  padding: 40px 16px;
}

.ps-login__logo { width: 210px; height: auto; }

.ps-login__card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(11, 45, 60, 0.08);
}

.ps-login__title {
  margin: 0;
  font-family: var(--ps-font);
  font-size: var(--ps-text-xl);
  font-weight: 700;
  color: var(--ps-ink-display);
}

.ps-login__sub {
  margin: 6px 0 22px;
  font-size: var(--ps-text-base);
  color: var(--ps-muted);
}

.ps-login__field { margin-bottom: 16px; }

.ps-login__field label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--ps-text-sm);
  font-weight: 600;
  color: var(--ps-muted);
}

.ps-login__field .form-control {
  height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-control);
  box-shadow: none;
  font-family: inherit;
  font-size: var(--ps-text-base);
  color: var(--ps-input-text);
}

.ps-login__field .form-control:focus {
  outline: none;
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(74, 168, 184, 0.15);
}

.ps-login__field.has-error .form-control { border-color: var(--ps-pill-warn-text); }

.ps-login__field-error {
  margin: 6px 0 0;
  font-size: var(--ps-text-sm);
  color: var(--ps-pill-warn-text);
}

.ps-login__error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: var(--ps-radius-control);
  background: var(--ps-pill-warn-bg);
  color: var(--ps-pill-warn-text);
  font-size: var(--ps-text-sm);
}

.ps-login__error .zmdi { font-size: 16px; line-height: 1.2; }

.ps-login__submit {
  width: 100%;
  height: 42px;
  margin-top: 6px;
  font-size: var(--ps-text-base);
  cursor: pointer;
  transition: background-color .15s ease;
}
