/* Design tokens */

:root {
  --navy: #14263d;
  --teal: #087f8c;
  --gold: #ffd166;
  --text: #24354a;
  --muted: #58677a;
  --border: #dce5ec;
  --background: #f2f6fa;
  --white: #ffffff;
  --radius: 16px;
}

/* Base */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

h2 {
  font-size: 1.25rem;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

a {
  color: var(--teal);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

button {
  padding: 10px 16px;
  border: 1px solid var(--teal);
  border-radius: 9px;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
}

button:hover {
  background: #066773;
}

button.secondary {
  background: var(--white);
  border-color: var(--border);
  color: var(--navy);
}

button.secondary:hover {
  background: #edf3f7;
}

select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #9caabc;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

small,
.muted {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 20;
  padding: 12px;
  background: var(--white);
}

.skip-link:focus {
  top: 12px;
}

/* Demo entry */

.login-wrap {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(
      ellipse at top right,
      rgb(8 127 140 / 35%),
      transparent 55%
    ),
    var(--navy);
}

.login-card {
  width: min(100%, 560px);
  padding: clamp(24px, 5vw, 44px);
  border-top: 5px solid var(--gold);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 20px 60px rgb(0 0 0 / 20%);
}

.brand-mark {
  display: inline-grid;
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 16px;
  background: var(--navy);
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 800;
}

.notice {
  padding: 16px;
  margin-bottom: 22px;
  border: 1px solid #b5d3d7;
  border-radius: 10px;
  background: #eaf5f6;
}

.notice p:last-child {
  margin-bottom: 0;
}

/* Dashboard shell */

.dashboard {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 28px 20px;
  background: var(--navy);
  color: var(--white);
}

.sidebar-brand {
  margin-bottom: 28px;
  font-size: 1.3rem;
  font-weight: 800;
}

.sidebar-brand span {
  color: var(--gold);
}

.sidebar-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 9px;
  background: rgb(255 255 255 / 10%);
  color: var(--white);
  text-decoration: none;
}

.sidebar p {
  margin-top: 24px;
  color: #cbd9e8;
  font-size: 0.88rem;
}

.workspace {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff0c5;
  color: #614500;
  font-size: 0.8rem;
  font-weight: 700;
}

.content {
  max-width: 1300px;
  margin-inline: auto;
  padding: 32px;
}

.page-heading {
  margin-bottom: 26px;
}

.page-heading h1 {
  margin-bottom: 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 22px;
}

.card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 6px 24px rgb(20 38 61 / 4%);
}

.card h2 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 22px;
}

.details dt,
.answer-list dt {
  color: var(--muted);
  font-size: 0.88rem;
}

.details dd,
.answer-list dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.answer-list {
  margin: 0;
}

.answer-list > div + div {
  margin-top: 18px;
}

.file-list,
.task-list,
.note-list,
.link-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.file-list li,
.task-list li,
.note-list li,
.link-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}

.file-list li:last-child,
.task-list li:last-child,
.note-list li:last-child,
.link-list li:last-child {
  border-bottom: 0;
}

.file-list small,
.task-list small,
.note-list small {
  display: block;
}

.task-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
  font-weight: 400;
}

.task-label input {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--teal);
  flex-shrink: 0;
}

.task-label input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
}

.note-list p {
  margin-bottom: 5px;
  white-space: pre-wrap;
}

.note-form {
  margin-top: 20px;
}

.note-form button {
  margin-top: 12px;
}

.payment-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.payment-totals div {
  padding: 12px;
  border-radius: 10px;
  background: var(--background);
}

.payment-totals strong {
  display: block;
  margin-top: 4px;
  font-size: 1.15rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.status-message {
  margin: 0;
  padding: 0 32px;
  color: #076773;
  font-weight: 700;
}

.status-message:not(:empty) {
  padding-top: 16px;
}

.status-message[data-error="true"] {
  color: #a52828;
}

/* Responsive layout */

@media (max-width: 1000px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 18px 20px;
  }

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

  .sidebar p {
    margin: 12px 0 0;
  }

  .topbar,
  .content {
    padding: 20px;
  }

  .status-message {
    padding-inline: 20px;
  }

  .details,
  .payment-totals {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }
}
/* Overview and project-list additions */

.sidebar-nav a {
  margin-bottom: 8px;
  background: transparent;
}

.sidebar-nav a:hover {
  background: rgb(255 255 255 / 8%);
}

.sidebar-nav a[aria-current="page"] {
  background: rgb(255 255 255 / 14%);
  box-shadow: inset 3px 0 0 var(--gold);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.summary-number {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 2.5rem;
  line-height: 1.2;
}

.summary-card p {
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  padding: 0;
  margin: 0;
  border: 0;
}

.overview-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.overview-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.overview-list li:last-child {
  border-bottom: 0;
}

.overview-list li > div {
  min-width: 0;
  flex: 1 1 220px;
  overflow-wrap: anywhere;
}

.overview-list small,
.table-subtext {
  display: block;
}

.project-status {
  display: inline-block;
  padding: 4px 9px;
  margin-top: 7px;
  border-radius: 999px;
  background: #eaf5f6;
  color: #076773;
  font-size: 0.8rem;
  font-weight: 700;
}

.balance-amount {
  color: var(--navy);
  font-size: 2rem;
  font-weight: 700;
}

.balance-amount small {
  font-size: 0.85rem;
}

.project-filters {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

input[type="search"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #9caabc;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
}

.empty-state {
  padding: 28px 12px;
  text-align: center;
}

.empty-state h2 {
  border: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .summary-grid,
  .project-filters {
    grid-template-columns: 1fr;
  }
}

/* New project form */

.project-create-form {
  display: grid;
  gap: 20px;
}

.project-create-form input:not([type="checkbox"]),
.project-create-form select {
  box-sizing: border-box;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #9caabc;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  font: inherit;
}

.project-create-form fieldset {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.project-create-form fieldset[hidden] {
  display: none;
}

.project-create-form legend {
  padding: 0 6px;
  font-weight: 700;
}

.project-create-form .project-filters {
  margin-bottom: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Demo backup controls */

.topbar {
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-actions button:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Products and Services */

.catalog-form {
  display: grid;
  gap: 20px;
  max-width: 680px;
}

.catalog-form label {
  display: block;
  margin-bottom: 6px;
}

.catalog-form input,
.catalog-form select,
.catalog-form textarea {
  box-sizing: border-box;
  width: 100%;
}

.catalog-form textarea {
  resize: vertical;
}

.catalog-form small {
  display: block;
  margin-top: 6px;
}

.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-actions button {
  white-space: nowrap;
}

#product-results .table-subtext {
  max-width: 420px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Project content editor */

.project-editor input:not([type="checkbox"]) {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #9caabc;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
}

.project-editor button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.website-fieldset {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 20px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.website-fieldset legend {
  padding-inline: 8px;
  color: var(--navy);
  font-weight: 700;
}

.editor-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.editor-section-nav a {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-weight: 700;
  text-decoration: none;
}

.project-editor section {
  scroll-margin-top: 20px;
}

/* Saved website preview */

.preview-help {
  margin: 16px 0 0;
}

.preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.preview-toolbar button[aria-pressed="true"] {
  border-color: var(--teal);
  background: #eaf5f6;
}

.website-preview-shell {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #dfe7ee;
}

.website-preview-frame {
  display: block;
  width: 100%;
  height: 75vh;
  min-height: 500px;
  margin-inline: auto;
  border: 0;
  border-radius: 8px;
  background: white;
}

.website-preview-shell[data-width="mobile"] .website-preview-frame {
  max-width: 390px;
}

/* Workspace information */

.workspace-information {
  margin-bottom: 22px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  font-size: 0.9rem;
}

.workspace-information summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 700;
}

.workspace-information p {
  margin: 10px 0 0;
}

/* Space project and template-preview buttons consistently. */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.form-actions > button {
  margin: 0;
}

/* Shared website gallery editor */

.gallery-enable-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
}

.gallery-enable-label input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--teal);
}

.gallery-editor-item small,
#website-gallery-section .stack > div > small {
  display: block;
  margin-top: 6px;
}

#website-gallery-section small {
  overflow-wrap: anywhere;
}

.gallery-editor-item .form-actions {
  margin-top: 0;
}

.gallery-editor-item button:disabled,
#gallery-add-image:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#gallery-editor-status:empty {
  display: none;
}

/* Website projects and testimonials editors */

.collection-enable-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
}

.collection-enable-label input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--teal);
}

.collection-editor-item small,
#website-projects-section .stack > div > small,
#website-testimonials-section .stack > div > small {
  display: block;
  margin-top: 6px;
}

#website-projects-section small,
#website-testimonials-section small {
  overflow-wrap: anywhere;
}

.collection-editor-item .form-actions {
  margin-top: 0;
}

.collection-editor-item button:disabled,
[data-collection-add]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

[data-collection-status]:empty {
  display: none;
}

/* Sidebar content help and guide */

.sidebar-help {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgb(255 255 255 / 20%);
}

.sidebar-help a {
  border: 1px solid rgb(255 255 255 / 25%);
}

.content-help .answer-list dt {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
}

.content-help li + li {
  margin-top: 10px;
}

.content-help .notice {
  margin-top: 20px;
  margin-bottom: 0;
}

/* Signed-in account identity */

.topbar-actions {
  align-items: center;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
}

.signed-in-user {
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.topbar-actions #logout {
  flex-shrink: 0;
}

/* Staff login inputs and password visibility */

#staff-login-form input[type="email"],
#staff-login-form input[type="password"],
#staff-login-form input[type="text"] {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #9caabc;
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
}

.staff-password-field {
  margin-bottom: 16px;
}

.password-input-wrap {
  position: relative;
}

#staff-login-form .password-input-wrap input {
  padding-right: 60px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: #edf3f7;
  color: var(--navy);
}

.password-toggle svg {
  display: block;
  pointer-events: none;
}

#staff-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Keep long email addresses readable on smaller screens. */

@media (max-width: 700px) {
  .topbar-actions {
    width: 100%;
    margin-left: 0;
  }

  .signed-in-user {
    flex: 1 1 200px;
  }
}