/*
 * Desktop specific stylesheet for FireDoor Inspection Suite
 *
 * This file defines a polished SaaS‑style look for screens wider than
 * 768px. It starts by importing the default mobile‑first stylesheet
 * (style.css) and then overrides variables, spacing and layout for
 * a more spacious, desktop‑oriented design. By importing the base
 * stylesheet at the top you inherit all existing component styles
 * (forms, tables, etc.), ensuring full functionality while allowing
 * you to selectively override what needs to change for desktop.
 */

/* brand palette tuned for a softer SaaS aesthetic */
:root {
  --brand: #0052cc;
  --brand-dark: #003d99;
  --text: #2a2a2a;
  --background: var(--card-bg, #f7faff);
  --card: var(--card-bg, #ffffff);
  --success: #0a8754;
  --danger: #c0392b;
  --border: #dfe5f4;
  --surface-muted: #f4f7ff;
  --panel-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg,
      var(--page-gradient-start, rgba(0, 82, 204, 0.08)),
      var(--page-gradient-mid, rgba(230, 86, 30, 0.05)) 45%,
      var(--page-gradient-end, rgba(15, 23, 42, 0.04))),
    var(--background);
  background-attachment: fixed;
  color: var(--text);
}

/* Installed desktop app: use a branded scrollbar (feels less like a browser tab). */
@media (display-mode: standalone), (display-mode: fullscreen) {
  :root {
    --app-scrollbar-track: rgba(0, 0, 0, 0);
    --app-scrollbar-thumb: color-mix(in srgb, var(--brand, #e6561e) 55%, rgba(15, 23, 42, 0.28));
    --app-scrollbar-thumb-hover: color-mix(in srgb, var(--brand, #e6561e) 70%, rgba(15, 23, 42, 0.3));
    --app-scrollbar-thumb-active: color-mix(in srgb, var(--brand, #e6561e) 82%, rgba(15, 23, 42, 0.3));
  }

  :where(html, body) {
    scrollbar-width: thin;
    scrollbar-color: var(--app-scrollbar-thumb) var(--app-scrollbar-track);
  }

  :where(*) {
    scrollbar-width: thin;
    scrollbar-color: var(--app-scrollbar-thumb) var(--app-scrollbar-track);
  }

  :where(*)::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }

  :where(*)::-webkit-scrollbar-track {
    background: var(--app-scrollbar-track);
  }

  :where(*)::-webkit-scrollbar-thumb {
    background-color: var(--app-scrollbar-thumb);
    border-radius: 999px;
    border: 3px solid rgba(0, 0, 0, 0);
    background-clip: content-box;
  }

  :where(*)::-webkit-scrollbar-thumb:hover {
    background-color: var(--app-scrollbar-thumb-hover);
  }

  :where(*)::-webkit-scrollbar-thumb:active {
    background-color: var(--app-scrollbar-thumb-active);
  }
}

a {
  color: var(--brand);
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Desktop never uses the hamburger nav affordance */
.mobile-nav-trigger,
.mobile-nav-overlay {
  display: none !important;
}

/* Sidebar redesigned for desktop */
.sidebar {
  --sidebar-expanded-width: 224px;
  --sidebar-padding-x: 18px;
  --sidebar-link-padding: 5px 14px 5px 20px;
  width: var(--sidebar-expanded-width);
  color: var(--nav-text, #ffffff);
  padding: 22px var(--sidebar-padding-x) 20px;
  border-radius: 0;
  box-shadow: 0 16px 30px rgba(8, 13, 30, 0.26);
  border-right: 1px solid rgba(8, 13, 30, 0.85);
}

.sidebar::after {
  width: 160px;
  height: 160px;
  top: -45px;
  right: -55px;
}

.sidebar h1 {
  font-size: 1.35rem;
  color: var(--brand);
}

.sidebar-brand {
  margin-bottom: 20px;
}

.sidebar-nav {
  gap: 10px;
}

.sidebar-nav__list {
  gap: 3px;
}

/* Navigation list styles */
.sidebar-nav__link {
  padding: 5px 14px 5px 20px;
  gap: 8px;
  font-size: 0.85rem;
}

.sidebar-nav__link::before {
  left: 0;
  top: 7px;
  bottom: 7px;
}

.sidebar-nav__link:hover,
.sidebar-nav__link:focus-visible {
  transform: none;
  box-shadow: none;
}

.sidebar-nav__divider {
  opacity: 0.4;
}

.sidebar-nav__footer {
  padding-top: 4px;
}

.sidebar-nav__logout-card {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

.sidebar-nav__logout-button {
  font-size: 0.8rem;
}

/* Responsive rules migrated from style.css (desktop-only). */
@media (min-width: 1024px) {
  .sidebar.sidebar--collapsed {
    width: 84px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .sidebar.sidebar--collapsed:hover,
  .sidebar.sidebar--collapsed.sidebar--expanded {
    width: var(--sidebar-expanded-width, 240px);
    padding-left: var(--sidebar-padding-x, 24px);
    padding-right: var(--sidebar-padding-x, 24px);
  }

  .sidebar.sidebar--collapsed .sidebar-brand {
    justify-content: center;
  }

  .sidebar.sidebar--collapsed:not(.sidebar--expanded) .sidebar-nav__link {
    padding: 10px;
    justify-content: center;
  }

  .sidebar.sidebar--collapsed:not(.sidebar--expanded) .sidebar-nav__link::before {
    display: none;
  }

  .sidebar.sidebar--collapsed:hover .sidebar-nav__link,
  .sidebar.sidebar--collapsed.sidebar--expanded .sidebar-nav__link {
    padding: var(--sidebar-link-padding);
    justify-content: flex-start;
  }

  .sidebar.sidebar--collapsed:not(.sidebar--expanded) .sidebar-nav__icon {
    margin: 0;
  }

  .sidebar.sidebar--collapsed:not(.sidebar--expanded) .sidebar-nav__label,
  .sidebar.sidebar--collapsed:not(.sidebar--expanded) .sidebar-brand h1,
  .sidebar.sidebar--collapsed:not(.sidebar--expanded) .sidebar-brand img,
  .sidebar.sidebar--collapsed:not(.sidebar--expanded) .sidebar-nav__divider,
  .sidebar.sidebar--collapsed:not(.sidebar--expanded) .sidebar-nav__footer {
    opacity: 0;
    visibility: hidden;
    width: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidebar.sidebar--collapsed:hover .sidebar-nav__label,
  .sidebar.sidebar--collapsed:hover .sidebar-brand h1,
  .sidebar.sidebar--collapsed:hover .sidebar-brand img,
  .sidebar.sidebar--collapsed:hover .sidebar-nav__divider,
  .sidebar.sidebar--collapsed:hover .sidebar-nav__footer,
  .sidebar.sidebar--collapsed.sidebar--expanded .sidebar-nav__label,
  .sidebar.sidebar--collapsed.sidebar--expanded .sidebar-brand h1,
  .sidebar.sidebar--collapsed.sidebar--expanded .sidebar-brand img,
  .sidebar.sidebar--collapsed.sidebar--expanded .sidebar-nav__divider,
  .sidebar.sidebar--collapsed.sidebar--expanded .sidebar-nav__footer {
    opacity: 1;
    visibility: visible;
    width: auto;
    pointer-events: auto;
  }
}

@media (min-width: 1024px) {
  .page-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .page-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
  }
}

@media (min-width: 768px) {
  .door-detail-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .door-detail-specs {
    justify-content: flex-end;
  }
}

@media (min-width: 769px) {
  .card--wizard .form-progress {
    display: none;
  }

  .fd-preview-toggle-fab {
    display: none;
  }
}

@media (min-width: 640px) {
  .fd-summary-panel__body {
    flex-direction: row;
  }

  .fd-summary-panel__body .summary-grid {
    flex: 1 1 60%;
  }
}

/* Main content area */
.content {
  flex: 1;
  padding: 32px;
  overflow-x: auto;
}

/* Section heading styling */
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

/* Top bar on desktop: white bar with subtle shadow */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6e8ed;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar-user p {
  margin: 0;
  font-size: 0.9rem;
  color: #6a6f7c;
}

.top-bar-logo img {
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

/* Cards grid: more generous spacing on desktop */
.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--card-bg, #ffffff);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(17, 17, 17, 0.06);
  transition: box-shadow 0.2s ease;
}

/* Ensure hero cards keep their themed gradient instead of the generic card background. */
.insp-hero,
.fd-hero,
.analytics-hero,
.schedule-hero {
  background: linear-gradient(
    135deg,
    var(--hero-bg-start, #0f172a),
    var(--hero-bg-end, #2563eb)
  );
  background: linear-gradient(
    135deg,
    color-mix(
      in srgb,
      var(--hero-bg-start, #0f172a) calc(100% - var(--hero-softness, 0%)),
      #ffffff var(--hero-softness, 0%)
    ),
    color-mix(
      in srgb,
      var(--hero-bg-end, #2563eb) calc(100% - var(--hero-softness, 0%)),
      #ffffff var(--hero-softness, 0%)
    )
  );
  color: var(--hero-text, #ffffff);
}

.card:hover {
  box-shadow: 0 6px 24px rgba(17, 17, 17, 0.1);
}

.card h3 {
  margin: 0 0 16px 0;
  font-size: 1.2rem;
}

.stats {
  font-size: 2.2rem;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--button-primary, var(--brand));
  color: var(--button-primary-text, #fff);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--button-primary-dark, var(--brand-dark));
  color: var(--button-primary-dark-text, var(--button-primary-text, #fff));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--button-primary, var(--brand));
  border: 1px solid currentColor;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--button-primary-dark, var(--brand-dark));
  border-color: currentColor;
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text, #111);
  border: 1px solid rgba(15, 23, 42, 0.15);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(15, 23, 42, 0.1);
}

.btn-light {
  background: #ffffff;
  color: var(--text, #111);
  border: 1px solid rgba(15, 23, 42, 0.15);
}

.btn-light:hover,
.btn-light:focus-visible {
  background: #f8faff;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
}

tr:last-child td {
  border-bottom: none;
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-pass {
  background: rgba(10, 135, 84, 0.15);
  color: var(--success);
}

.status-fail {
  background: rgba(192, 57, 43, 0.15);
  color: var(--danger);
}
.status-pill--success {
  background: rgba(10, 135, 84, 0.15);
  color: var(--success);
}
.status-pill--muted {
  background: #f3f4f6;
  color: #475467;
}

/* Misc components reused from mobile style */
/* We include only what's necessary for desktop, other components will fall back to defaults */
.card--wizard .form-section {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.card--wizard .form-section:nth-of-type(even) {
  background: #f4f7ff;
}

.card.card--wizard {
  padding: 32px;
  border: none;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.card.card--wizard h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.card.card--wizard p.text-muted {
  margin-bottom: 24px;
}
body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal[hidden] {
    display: none;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.modal__dialog {
	    position: relative;
	    z-index: 1;
	    background: #fff;
	    border-radius: 16px;
	    width: min(960px, 90%);
	    max-height: 90vh;
	    overflow: auto;
	    padding: 24px;
	    box-shadow: 0 25px 65px rgba(9, 41, 57, 0.18);
	}

:where(
  [data-property-create-modal],
  [data-property-edit-modal],
  [data-fire-door-jobs-modal],
  [data-fire-door-job-modal]
) .modal__dialog {
  overflow-x: hidden;
}

.modal__dialog--narrow {
    width: min(520px, 90%);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.modal__close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inspection-builder__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.inspection-quote-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.inspection-quote-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inspection-quote-editor textarea {
    width: 100%;
}

.inspection-quote-editor__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inspection-quote-editor__actions {
    display: flex;
    gap: 0.5rem;
}
.inspection-quote-table {
    width: 100%;
    border-collapse: collapse;
}

.inspection-quote-table th,
.inspection-quote-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.inspection-quote-row--missing {
    background: #fff7f2;
}

.input-with-prefix {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    align-items: center;
}

.input-with-prefix span {
    background: #f5f5f5;
    padding: 0 0.6rem;
    border-right: 1px solid #ddd;
}

.input-with-prefix input {
    border: none;
    flex: 1;
    padding: 0.4rem 0.6rem;
    min-width: 0;
}

.inspection-builder__table {
    margin-bottom: 1rem;
}

.inspection-builder__actions-cell {
    text-align: right;
}

.inspection-builder__alert {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: #fff3cd;
    color: #856404;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.schedule-status-alert {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    background: #fff3cd;
    color: #856404;
    font-size: 0.9rem;
}

.pricing-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
}

.pricing-toolbar__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pricing-table__actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
}

.text-danger {
    color: #b42318;
}

.pricing-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pricing-form__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.pricing-import-label {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.pricing-import-label input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.theme-settings legend {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.theme-settings label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.color-input {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-reset {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

.billing {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand, #0052cc);
    margin: 0 0 0.35rem 0;
}

.billing-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.billing-header__main h1 {
    margin: 0 0 0.25rem 0;
}

.billing-header__note {
    color: #4b5563;
    margin: 0;
}

.billing-hero__alert {
    margin: 0.65rem 0 0;
    padding: 0.85rem;
    border-radius: 10px;
    background: #fff4e5;
    color: #a04c00;
    font-weight: 600;
}

.billing-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.billing-pulse {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.billing-pulse li {
    background: var(--surface-muted, #f4f7ff);
    border-radius: 12px;
    padding: 1rem;
}

.billing-pulse span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.billing-pulse strong {
    font-size: 1.4rem;
}

.billing-pulse small {
    display: block;
    color: #6b7280;
    margin-top: 0.2rem;
}

.billing-steps {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 1rem;
}

.billing-steps h3 {
    margin: 0 0 0.6rem 0;
}

.billing-steps ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.billing-steps__item {
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.85rem;
    min-height: 100px;
    display: flex;
    align-items: center;
}

.billing-steps__item strong {
    display: block;
    margin-bottom: 0.2rem;
}

.billing-steps__item span {
    color: #6b7280;
    font-size: 0.85rem;
}

.billing-steps__item--pending {
    background: #fff8f0;
    border-color: #ffd7b5;
}

.billing-steps__item--in_progress {
    border-color: var(--brand, #0052cc);
}

.billing-steps__item--up_next {
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.08);
}

.billing-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
}

.billing-overview__card h3 {
    margin-top: 0;
}

.billing-overview__card dl {
    margin: 1rem 0 0;
    display: grid;
    gap: 0.65rem;
}

.billing-overview__card div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.billing-overview__card dt {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.billing-overview__card dd {
    margin: 0;
    font-weight: 600;
}

.billing-overview__card--accent {
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.08), rgba(230, 86, 30, 0.05));
}

.billing-overview__card--accent .btn {
    margin-top: 1rem;
}

.billing-plan-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.billing-plan-section__intro h2 {
    margin: 0.2rem 0 0.5rem;
}

.billing-plan-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    background: var(--surface-muted, #f4f7ff);
}

.billing-plan-toggle span {
    font-weight: 600;
}

.billing-plan-toggle__options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.billing-plan-toggle__option {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
}

.billing-plan-toggle__option.is-active {
    background: var(--brand, #0052cc);
    border-color: var(--brand, #0052cc);
    color: #fff;
}

.billing-plan-toggle__option[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

.billing-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border, #dfe5f4);
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.plan-card--highlight {
    border-color: var(--brand, #0052cc);
    position: relative;
    overflow: hidden;
}

.plan-card__badge {
    width: fit-content;
    background: rgba(0, 82, 204, 0.12);
    color: var(--brand, #0052cc);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0;
}

.plan-card__subtitle {
    margin-top: -0.5rem;
    color: #4b5563;
}

.plan-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    font-size: 0.95rem;
}

.plan-card__price strong {
    font-size: 2.5rem;
    line-height: 1;
}

.plan-card__features {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.plan-card__features li {
    position: relative;
    padding-left: 1.25rem;
    color: #374151;
}

.plan-card__features li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--brand, #0052cc);
}

.plan-card__cta {
    width: 100%;
    margin-top: auto;
}

.plan-card__footer {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

.plan-card--ghost {
    border-style: dashed;
    border-color: rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.05), rgba(255, 255, 255, 0.9));
}

.billing-secondary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.billing-stats p {
    margin-top: 1rem;
    color: #4b5563;
}

.billing-stat-pills {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.billing-stat-pills div {
    background: var(--surface-muted, #f4f7ff);
    border-radius: 12px;
    padding: 1rem;
}

.billing-stat-pills span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
}

.billing-stat-pills strong {
    font-size: 1.2rem;
}

.billing-payment ul,
.billing-faq ul {
    padding-left: 1.25rem;
    margin: 0.5rem 0 1rem;
    color: #4b5563;
}

.billing-invoices ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.billing-invoices li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.billing-invoices li:last-child {
    border-bottom: none;
}

.billing-invoices li span {
    color: #6b7280;
}

.billing-invoices__note {
    font-size: 0.85rem;
    color: #6b7280;
}

.billing-faq button {
    margin-top: auto;
    width: 100%;
}

.settings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 1.4rem 1.6rem;
    position: relative;
    overflow: hidden;
    border: none;
    background: #ffffff;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.settings-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(230, 86, 30, 0.18), rgba(14, 165, 233, 0.14), rgba(15, 23, 42, 0.2));
    opacity: 0.45;
    z-index: 0;
}

.settings-hero::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    right: -60px;
    top: -90px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
    opacity: 0.65;
    z-index: 0;
}

.settings-hero > * {
    position: relative;
    z-index: 1;
}

.settings-hero__brand {
    width: 78px;
    height: 78px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.settings-hero__brand img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-hero__placeholder {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--brand, #0052cc);
}

.settings-hero__body h1 {
    margin: 0.05rem 0 0.25rem;
}

.settings-hero__subtitle {
    margin: 0;
    color: #374151;
}

.settings-hero__subtitle a {
    color: inherit;
    text-decoration: underline;
}

.settings-hero__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 0.75rem 0;
    padding: 0.85rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(8px);
    grid-auto-flow: dense;
}

.settings-hero__meta-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 0.7rem 0.8rem;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

@media (min-width: 1024px) {
    .settings-hero__meta-item--owner {
        grid-column: span 2;
    }
}

.settings-hero__meta strong {
    font-size: 1.05rem;
}

.settings-hero__meta span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.settings-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.settings-hero__flash {
    margin-top: 1rem;
}

.settings-layout {
    display: block;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.settings-card__header p {
    margin: 0.2rem 0 0;
    color: #4b5563;
}

.settings-card__header .eyebrow {
    margin: 0 0 0.35rem 0;
    color: var(--brand, #0052cc);
}

.theme-palette {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.theme-palette__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.theme-palette__item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.85rem;
    text-align: left;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-palette__item:hover {
    border-color: var(--brand, #0052cc);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.theme-palette__label {
    font-weight: 600;
}

.theme-palette__chips {
    display: inline-flex;
    gap: 4px;
}

.theme-palette__chips span {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--chip-color, #e2e8f0);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.theme-palette__toggle {
    align-self: flex-start;
}

.background-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--card-bg, #fff);
}

.background-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.background-card__body {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.background-preview {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex: 1 1 280px;
    background: #f4f4f5;
}

.background-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 280px;
}

.background-preview-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

@media (max-width: 720px) {
    .background-preview-stack {
        grid-template-columns: 1fr;
    }
}

.background-preview-mock__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.background-preview-mock__header .eyebrow {
    margin: 0;
}

.background-preview-mock__header .text-muted {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
}

.background-preview-mock__badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #3730a3;
    line-height: 1.2;
    white-space: nowrap;
}

.background-preview-mock__viewport {
    position: relative;
    height: 190px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.background-preview-mock__chrome {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 12px;
    height: 22px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.background-preview-mock__sidebar {
    position: absolute;
    left: 12px;
    top: 44px;
    bottom: 12px;
    width: 26px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.background-preview-mock__card {
    position: absolute;
    left: 50px;
    right: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.background-preview-mock__card--hero {
    top: 44px;
    height: 44px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.background-preview-mock__card--row1 {
    top: 96px;
    height: 28px;
}

.background-preview-mock__card--row2 {
    top: 132px;
    height: 28px;
    right: 54px;
}

.background-preview-mock__viewport--pdf {
    background-color: #ffffff;
}

.background-preview-mock__pdf-strip {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 12px;
    height: 32px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.background-preview-mock__pdf-content {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 52px;
    bottom: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(15, 23, 42, 0.05);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.background-preview-mock__pdf-line {
    display: block;
    height: 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
    width: 100%;
}

.background-preview-mock__pdf-line--short {
    width: 62%;
}

.background-preview-mock__pdf-line--mid {
    width: 78%;
}

.background-preview__hint {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.background-controls {
    flex: 2 1 320px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.background-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.background-presets__item {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}

.background-presets__item--outline {
    border-style: dashed;
}

.background-presets__divider {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.1);
}

.background-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.color-input--pill {
    align-items: center;
    gap: 0.5rem;
}

.color-input--pill input[type="text"] {
    width: 170px;
    max-width: 100%;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 0.9rem;
}

.color-input--pill input[type="text"]:disabled {
    opacity: 0.6;
    background: #f8fafc;
}

.color-chip {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--chip-color, #cbd5f5);
}
.billing-seat-card__actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.billing-seat-card__form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.billing-seat-card__form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.billing-seat-card__form input {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    font-size: 0.95rem;
}

.billing-seat-card__form--invite button {
    align-self: flex-start;
}

.billing-seat-card__hint {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.support-fab {
  position: fixed;
  right: 28px;
  bottom: 26px;
  z-index: 1300;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #f9fafb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.support-fab__icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(249, 250, 251, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.support-fab__icon svg {
  width: 16px;
  height: 16px;
}

.support-fab__label {
  white-space: nowrap;
}
