@import url('fonts.css');
:root {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #203e35;
  background: #f7f8f2;
  font-synthesis: none;
  --ink: #203e35;
  --muted: #68756b;
  --line: #dfe5da;
  --paper: #f7f8f2;
  --surface: #ffffff;
  --accent: #d2ed82;
  --green: #42664a;
  --soft: #eef3e6;
  --danger: #a13b3b;
  --warning: #855530;
  --warning-bg: #fff3e5;
  --danger-bg: #fceeee;
  --radius: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.15;
  font-weight: 550;
  color: var(--ink);
  overflow-wrap: anywhere;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.4px;
  font-weight: 600;
  color: var(--ink);
}
h3 {
  font-size: 16px;
  font-weight: 600;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--green);
  margin-bottom: 10px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
  min-width: 0;
}
.brand img {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: block;
}
.brand strong {
  display: block;
  font-size: 15px;
  margin-top: 4px;
}
.brand small {
  font-size: 11px;
  line-height: 1.5;
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--ink);
  color: #f6f8ef;
  border-right: 1px solid var(--ink);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  gap: 38px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.nav-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 14px 14px;
}
.nav-item {
  border: 0;
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 8px;
  color: var(--muted);
  text-align: left;
  font-size: 14px;
}
.nav-item.active {
  background: var(--accent);
  color: var(--ink);
  font-weight: 650;
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-note {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  background: var(--paper);
  line-height: 1.6;
  margin-bottom: 20px;
}
.sidebar-note strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}
.admin-badge {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  margin-bottom: 15px;
}
.avatar {
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--ink);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-weight: 700;
}
.main {
  min-width: 0;
}
.topbar {
  height: 75px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--paper);
  font-size: 12px;
  color: var(--muted);
}
.topbar strong {
  color: var(--ink);
  font-weight: 550;
}
.topbar a {
  color: var(--muted);
}
.content {
  width: 100%;
  margin: 0 auto;
  padding: 36px 40px 50px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-head p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}
.page-head h1 {
  margin-bottom: 10px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 16px;
  transition:
    background 0.15s,
    border-color 0.15s;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: white;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--soft);
  text-decoration: none;
}
.btn.primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.btn.primary:hover {
  background: #355b45;
}
.btn.accent {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.btn.danger {
  color: var(--danger);
}
.btn.small {
  font-size: 12px;
  padding: 7px 10px;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}
.stat {
  min-width: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stat-value {
  display: block;
  font-size: 31px;
  font-weight: 650;
  letter-spacing: -1px;
  margin: 13px 0 4px;
}
.stat small {
  font-size: 11px;
}
.stat-icon {
  height: 28px;
  width: 28px;
  display: grid;
  place-items: center;
  background: var(--soft);
  border-radius: 7px;
  color: var(--green);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 0 16px;
}
.section-head h2 {
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 20px;
  align-items: start;
}
.project-card {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  text-align: left;
  padding: 0;
  color: inherit;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px #203e3510;
}
.project-thumb {
  height: 180px;
  background: var(--soft);
  padding: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.project-thumb .pill {
  position: absolute;
  top: 14px;
  left: 14px;
}
.placeholder-rink {
  width: 80%;
  height: 90px;
  border: 10px solid #b2c4a9;
  border-radius: 18px;
  background: linear-gradient(135deg, #e4eddc, #f7f8f2);
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 12px;
}
.project-info {
  padding: 21px;
}
.project-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.project-info p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
  min-height: 20px;
}
.progress {
  height: 5px;
  background: var(--soft);
  border-radius: 4px;
  overflow: hidden;
  margin: 9px 0 15px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 4px;
}
.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  line-height: 1.5;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: var(--soft);
  color: var(--green);
}
.pill.orange {
  background: var(--warning-bg);
  color: var(--warning);
}
.pill.gray {
  background: #f0f2ec;
  color: var(--muted);
}
.pill.red {
  background: var(--danger-bg);
  color: var(--danger);
}
.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.panel-header h2,
.panel-header h3 {
  margin: 0;
}
.panel-header p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  gap: 22px;
  align-items: start;
}
.grid-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.tabs {
  display: flex;
  background: var(--soft);
  border-radius: 7px;
  padding: 4px;
  gap: 4px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--muted);
}
.tabs button.active {
  background: white;
  box-shadow: 0 1px 3px #203e3510;
  color: var(--ink);
  font-weight: 650;
}
.plan-wrap {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  overflow: hidden;
}
.plan {
  position: relative;
  width: 100%;
  line-height: 0;
  touch-action: pan-y;
  user-select: none;
}
.plan.editing {
  touch-action: none;
  cursor: crosshair;
}
.plan img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.field-box {
  position: absolute;
  border: 2px solid #708f63;
  background: #dce9d1c9;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  font-size: clamp(8px, 1vw, 13px);
  font-weight: 750;
  line-height: 1;
  min-width: 0;
  transition: background 0.12s;
  cursor: pointer;
}
.field-box:hover {
  filter: brightness(0.94);
}
.field-box.occupied {
  background: #b3bcb0d9;
  border-color: #929e8f;
  color: #394a3e;
  cursor: default;
}
.field-box.blocked {
  background: repeating-linear-gradient(
    45deg,
    #b3bcb0b0,
    #b3bcb0b0 4px,
    #e0e5dcb0 4px,
    #e0e5dcb0 8px
  );
  border-color: #929e8f;
  color: #394a3e;
  cursor: default;
}
.field-box.mine {
  background: #d2ed82ed;
  border-color: #8faa47;
  color: var(--ink);
}
.field-box.selected {
  background: #203e35eb;
  color: white;
  border-color: var(--ink);
  box-shadow: 0 0 0 2px white;
}
.field-box.edit-selected {
  background: #d2ed82d9;
  border-color: #779038;
}
.field-box.has-details {
  container: plan-field / size;
  overflow: hidden;
  cursor: pointer;
}
.field-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 8px;
  line-height: 1.25;
  pointer-events: none;
}
.field-number {
  font-size: 13px;
  font-weight: 800;
}
.field-company {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
}
.field-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  background: #f7f8f2;
}
.field-status.info {
  background: #eef5f8;
  color: #305469;
}
.field-status.warning {
  background: #fff3dc;
  color: #805312;
}
.field-status.success {
  background: #e7f2d8;
  color: #34522a;
}
.field-status-dot {
  flex: 0 0 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.field-status-full,
.field-status-short {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field-status-short {
  display: none;
}
@container plan-field (max-width: 170px) {
  .field-status-full {
    display: none;
  }
  .field-status-short {
    display: inline;
  }
}
@container plan-field (max-height: 90px) {
  .field-content {
    gap: 3px;
    padding: 4px;
  }
  .field-number,
  .field-company {
    font-size: 11px;
  }
  .field-status {
    font-size: 10px;
    padding: 2px 5px;
  }
}
@container plan-field (max-height: 60px) {
  .field-content {
    gap: 2px;
    padding: 2px;
  }
  .field-status {
    font-size: 9px;
    padding: 1px 4px;
  }
  .field-company {
    display: none;
  }
  .field-status-full {
    display: none;
  }
  .field-status-short {
    display: inline;
  }
}
@container plan-field (max-height: 30px) or (max-width: 60px) {
  .field-content {
    flex-direction: row;
    justify-content: center;
    padding: 1px;
  }
  .field-company,
  .field-status-full,
  .field-status-short {
    display: none;
  }
  .field-status {
    padding: 3px;
  }
}
.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 15px;
  font-size: 11px;
  color: var(--muted);
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #b2cba2;
}
.dot.occupied {
  background: #a4afa0;
}
.dot.mine {
  background: var(--accent);
}
.dot.selected {
  background: var(--ink);
}
.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 0;
  line-height: 1.5;
}
.empty {
  text-align: center;
  padding: 45px 20px;
  color: var(--muted);
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--soft);
  margin: 0 auto 15px;
  font-size: 24px;
  color: var(--green);
}
.empty h3 {
  color: var(--ink);
  margin-bottom: 8px;
}
.empty p {
  font-size: 13px;
  max-width: 440px;
  margin: 0 auto 20px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
  padding: 13px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  display: block;
  font-size: 13px;
  margin-bottom: 3px;
}
td small {
  font-size: 11px;
}
.surface-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 14px 0;
}
.surface-option {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  display: flex;
  gap: 7px;
  align-items: center;
  background: white;
  cursor: pointer;
}
.surface-option:has(input:checked) {
  background: var(--soft);
  border-color: var(--green);
}
.surface-option:has(input:disabled) {
  opacity: 0.55;
  cursor: default;
}
input[type='checkbox'],
input[type='radio'] {
  accent-color: var(--green);
}
label.form-label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin: 17px 0 7px;
}
input:not([type='checkbox']):not([type='radio']):not([type='file']),
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cdd7c7;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
}
textarea {
  resize: vertical;
  min-height: 94px;
  line-height: 1.5;
}
input[type='file'] {
  max-width: 100%;
  font-size: 12px;
}
input[type='file']::file-selector-button {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 12px;
  color: var(--ink);
  margin-right: 10px;
  cursor: pointer;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  line-height: 1.5;
  margin-top: 12px;
}
.notice {
  border: 1px solid #ead8bf;
  background: var(--warning-bg);
  padding: 12px 15px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--warning);
  margin-bottom: 18px;
}
.notice.blue {
  border-color: #d6e2c7;
  background: var(--soft);
  color: var(--green);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-top: 15px;
}
.modal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.modal-title h2 {
  margin: 0;
}
.modal-title button {
  font-size: 22px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 80px #142c2426;
  max-width: 640px;
  width: calc(100% - 32px);
  padding: 28px;
  color: var(--ink);
  max-height: 90vh;
}
dialog::backdrop {
  background: #142c247a;
  backdrop-filter: blur(3px);
}
dialog p {
  font-size: 13px;
  color: var(--muted);
}
dialog pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.6;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  background: var(--ink);
  color: white;
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 100;
  box-shadow: 0 4px 25px #203e3526;
  display: none;
}
#toast.show {
  display: block;
}
#toast.error {
  background: var(--danger);
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--paper);
}
.login-story {
  min-width: 0;
  background: var(--ink);
  color: white;
  padding: clamp(32px, 4vw, 64px);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-story .brand {
  color: white;
}
.login-story h1 {
  font-size: clamp(36px, 3.8vw, 56px);
  color: white;
  letter-spacing: -2px;
  max-width: 540px;
  margin: 42px 0 18px;
  font-weight: 500;
  line-height: 1.13;
}
.login-story h1 span {
  color: var(--accent);
}
.login-story p {
  color: #d0dccd;
  font-size: 15px;
  max-width: 420px;
}
.login-visual {
  margin: 24px 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #ffffff26;
}
.login-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.login-visual figcaption {
  padding: 14px 18px;
  font-size: 12px;
  color: #e4eddc;
}
.login-story footer {
  margin-top: auto;
  color: #bccbb8;
  font-size: 11px;
}
.login-form-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 45px;
}
.login-form {
  max-width: 440px;
  width: 100%;
}
.login-form h2 {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 550;
}
.login-form .btn {
  width: 100%;
  margin-top: 24px;
  padding: 13px;
}
.login-form p {
  font-size: 13px;
  color: var(--muted);
}
.login-form-footer {
  margin-top: 34px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.account-organisations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 24px;
  align-items: start;
}
.account-organisation {
  min-width: 0;
}
.account-organisation .panel-header {
  flex-wrap: wrap;
  gap: 16px;
}
.account-project-list {
  display: grid;
  gap: 12px;
}
.account-project {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.account-project:hover {
  background: var(--paper);
}
.account-project > span:first-child {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-project small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}
.customer-shell {
  width: 100%;
  margin: 0 auto;
  padding: 0 28px 50px;
}
.grid-two > div {
  min-width: 0;
}
.customer-content {
  min-width: 0;
}
.customer-plan > summary {
  cursor: pointer;
  overflow-wrap: anywhere;
}
.customer-plan > summary strong {
  font-size: 18px;
  margin-right: 16px;
}
.customer-plan > summary span {
  font-size: 13px;
  color: var(--muted);
}
.customer-plan > summary .plan-toggle {
  display: inline-block;
  color: var(--green);
  margin-left: 16px;
  font-weight: 600;
}
.customer-plan[open] > summary {
  margin-bottom: 20px;
}
#customer-map {
  max-width: 1100px;
  margin: 0 auto;
}
.contact-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 16px;
}
.contact-fields .form-label {
  margin-top: 0;
}
.upload-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  margin: 16px 0;
  align-items: start;
}
.upload-field-grid > .design-card {
  margin: 0;
  min-width: 0;
}
.customer-header {
  min-height: 94px;
  padding: 18px 0;
  gap: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.customer-project-cards .project-card {
  color: inherit;
  text-decoration: none;
}
.customer-project-cards h2 {
  margin: 8px 0;
  font-size: 19px;
}
.customer-project-cards .project-meta {
  flex-wrap: wrap;
  gap: 10px;
}
.customer-project-cards .project-meta strong {
  color: var(--green);
}
.customer-verify {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.customer-verify p {
  margin: 5px 0 0;
  max-width: 780px;
}
.customer-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.customer-hero h1 {
  font-size: 34px;
  margin-bottom: 10px;
}
.customer-hero p {
  font-size: 14px;
  color: var(--muted);
}
.steps {
  display: flex;
  gap: 24px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.step {
  display: flex;
  gap: 8px;
  align-items: center;
}
.upload-preview {
  display: block;
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
}
.upload-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: var(--paper);
  border-radius: 8px;
  margin-bottom: 8px;
}
.document-preview {
  margin: 12px 0;
}
.document-preview summary {
  cursor: pointer;
  font-weight: 600;
  padding: 10px 0;
}
.document-preview iframe {
  width: 100%;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
}
.step b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-size: 11px;
}
.step.active {
  color: var(--ink);
  font-weight: 600;
}
.step.active b {
  background: var(--ink);
  color: white;
}
.customer-progress {
  background: #f0f5e6;
  border: 1px solid #d6e2c7;
  border-left: 4px solid #a9c962;
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 24px;
}
.customer-progress .steps {
  margin-bottom: 16px;
}
.customer-progress h2 {
  font-size: 20px;
  margin: 0 0 8px;
}
.customer-progress p {
  margin: 8px 0 16px;
}
.step.done {
  color: var(--green);
  font-weight: 600;
}
.step.done b {
  background: var(--accent);
  color: var(--green);
}
.optional-upload {
  margin-bottom: 24px;
}
.optional-upload > summary {
  cursor: pointer;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
}
.optional-upload[open] > summary {
  margin-bottom: 12px;
}
#customer-contact,
#customer-drafts,
#customer-upload {
  scroll-margin-top: 24px;
}
.kind-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kind-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  align-items: start;
  gap: 9px;
}
.kind-option:has(input:checked) {
  border-color: var(--green);
  background: var(--soft);
}
.kind-option strong {
  font-size: 12px;
  display: block;
  margin: 2px 0 7px;
}
.kind-option small {
  font-size: 11px;
  line-height: 1.5;
  display: block;
}
.upload-box {
  padding: 22px 16px;
  background: var(--paper);
  border: 1px dashed #b3c5a5;
  border-radius: 8px;
  margin-top: 17px;
}
.upload-box p {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 0;
}
.submission {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 17px;
  margin: 14px 0;
}
.surface-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  align-items: start;
}
.surface-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--surface);
}
.surface-card h4 {
  margin: 0 0 12px;
  font-size: 16px;
}
.surface-file + .surface-file {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 12px;
}
.surface-card .quality-result {
  margin-bottom: 0;
}
dialog:has(.surface-card-grid) {
  max-width: 1440px;
  width: calc(100% - 32px);
}
.submission-head {
  flex-wrap: wrap;
}
.draft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  align-items: start;
}
.draft-grid > .surface-card > .submission {
  margin-bottom: 0;
}
.submission-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.submission-head strong {
  font-size: 13px;
}
.submission-head small {
  display: block;
  font-size: 11px;
  margin-top: 4px;
}
.submission p,
.message p {
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0;
  line-height: 1.6;
}
.file-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 12px;
  margin: 7px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.file-link small {
  white-space: nowrap;
}
.message {
  padding: 12px 15px;
  border-radius: 8px;
  background: var(--paper);
  margin: 10px 0;
}
.message.admin {
  background: var(--soft);
  border-left: 3px solid var(--green);
}
.message small {
  font-size: 10px;
}
.messages {
  max-height: 400px;
  overflow: auto;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
}
.editor-properties {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.editor-properties h3 {
  margin-bottom: 10px;
}
.editor-properties .form-label {
  margin-top: 12px;
  font-size: 11px;
}
.editor-properties input {
  padding: 8px !important;
}
.field-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.field-chip {
  border: 1px solid var(--line);
  background: white;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--ink);
}
.field-chip.active {
  background: var(--ink);
  color: white;
}
.file-summary {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.legal {
  max-width: 900px;
  margin: 40px auto;
  padding: clamp(24px, 4vw, 54px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.legal h2 {
  margin-top: 30px;
}
.legal p {
  font-size: 14px;
}
.mobile-brand,
.mobile-nav {
  display: none;
}
.subtle-link {
  font-size: 12px;
  color: var(--muted);
}
@media (min-width: 1600px) {
  .content {
    padding-top: 50px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 24px 15px;
  }
  .content {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 40px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .editor-grid {
    grid-template-columns: 1fr 240px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .mobile-brand {
    display: flex;
  }
  .topbar {
    padding: 0 18px;
    height: 67px;
  }
  .topbar .breadcrumb {
    display: none;
  }
  .content {
    padding: 26px 16px;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
  }
  h1 {
    font-size: 27px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
  }
  .stat-value {
    font-size: 27px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .panel-header {
    flex-wrap: wrap;
  }
  .grid-equal,
  .editor-grid {
    grid-template-columns: 1fr;
  }
  .plan-wrap {
    padding: 8px;
  }
  .legend {
    gap: 12px;
  }
  .login-page {
    display: block;
  }
  .login-story {
    padding: 25px;
    min-height: 220px;
  }
  .login-story h1 {
    font-size: 32px;
    margin: 30px 0 15px;
    letter-spacing: -1px;
  }
  .login-story p,
  .login-visual,
  .login-story footer {
    display: none;
  }
  .login-form-wrap {
    padding: 32px 24px;
  }
  .customer-shell {
    padding: 0 15px 35px;
  }
  .contact-fields {
    grid-template-columns: 1fr;
  }
  .customer-plan > summary span {
    display: block;
    margin: 8px 0 0;
  }
  .customer-plan > summary .plan-toggle {
    margin-left: 0;
  }
  .customer-header {
    min-height: 80px;
    margin-bottom: 25px;
  }
  .customer-header .brand strong {
    font-size: 13px;
  }
  .customer-hero {
    display: block;
  }
  .customer-hero h1 {
    font-size: 28px;
  }
  .steps {
    gap: 15px;
    font-size: 11px;
  }
  .kind-options {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  .actions {
    gap: 7px;
  }
  .btn {
    padding: 10px 13px;
  }
  .customer-header .btn.ghost {
    font-size: 11px;
    padding: 8px;
  }
  .project-thumb {
    height: 170px;
  }
  .customer-hero .pill {
    margin-top: 5px;
  }
  .editor-properties {
    margin-top: 5px;
  }
  .grid-two {
    gap: 0;
  }
  .surface-list {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  }
  .legal {
    margin: 15px auto;
    padding: 20px;
  }
}
.surface-choices {
  margin-top: 17px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.surface-choices summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--green);
  font-weight: 650;
}
.surface-choices .surface-option {
  min-height: 44px;
}
.field-box:disabled {
  cursor: default;
  opacity: 1;
}
[hidden] {
  display: none !important;
}
.design-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 12px 0;
}
.design-card > p {
  font-size: 13px;
  margin: 8px 0;
}
.quality-result {
  padding: 12px;
  border-radius: 7px;
  background: var(--soft);
  font-size: 12px;
  margin-top: 12px;
}
.quality-result.failed {
  background: var(--danger-bg);
  color: var(--danger);
}
.quality-result.manual {
  background: var(--warning-bg);
  color: var(--warning);
}
.quality-result p {
  margin: 7px 0;
  font-size: 12px;
}
.quality-result small {
  font-size: 10px;
}

.dimension-compact h3 {
  margin: 12px 0;
  font-size: 15px;
}
.dimension-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 180px)) auto;
  gap: 12px;
  align-items: end;
  max-width: 800px;
}
.dimension-inputs input {
  margin: 0;
  height: 38px;
  padding: 8px 10px;
}
.dimension-inputs .form-label {
  margin: 0 0 5px;
  font-size: 12px;
}
.dimension-inputs .btn {
  min-height: 38px;
  padding: 9px 14px;
}
.dimension-selection {
  font-size: 12px;
}
.dimension-selection summary {
  cursor: pointer;
}
.dimension-selection p {
  max-height: 110px;
  overflow-y: auto;
}
#dimension-panel .hint {
  margin: 6px 0 10px;
}
@media (max-width: 700px) {
  .dimension-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 380px) {
  .dimension-inputs {
    grid-template-columns: 1fr;
  }
}

.sidebar .brand,
.sidebar-note strong {
  color: #f6f8ef;
}
.sidebar .brand img,
.login-story .brand img {
  filter: brightness(0) invert(1);
}
.login-story .brand img {
  width: 210px;
}
.sidebar small,
.sidebar .nav-label,
.sidebar .nav-item,
.login-story .brand small {
  color: #c8d5c3;
}
.sidebar .nav-item:hover {
  background: #ffffff12;
  color: white;
}
.sidebar .nav-item.active {
  background: var(--accent);
  color: var(--ink);
}
.sidebar-note {
  background: #ffffff08;
  border-color: #ffffff24;
  color: #c8d5c3;
}
.sidebar .avatar {
  background: var(--accent);
  flex-shrink: 0;
}
.sidebar .admin-badge {
  align-items: flex-start;
  line-height: 1.5;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
:focus-visible {
  outline: 2px solid var(--green);
}
.sidebar :focus-visible,
.login-story :focus-visible {
  outline-color: var(--accent);
}
.btn.accent:hover {
  background: #c5e371;
  border-color: #c5e371;
}
.btn.danger:hover {
  background: var(--danger-bg);
}
.btn.ghost:hover,
.file-link:hover {
  background: var(--soft);
  color: var(--ink);
}
.btn:disabled {
  pointer-events: none;
}
.stat:first-child .stat-icon {
  background: var(--accent);
}
.tabs {
  flex-wrap: wrap;
}
tbody tr:hover {
  background: #f7f8f280;
}
.brand-link:hover {
  text-decoration: none;
}
.login-story .eyebrow {
  color: var(--accent);
  margin: 38px 0 -20px;
}
.login-story .brand strong {
  color: #e4eddc;
}
.registration-fields {
  display: grid;
  gap: 16px;
}
.registration-fields .form-label {
  margin-top: 0;
}
.registration-fields .hint {
  font-size: 11px;
  margin-top: 7px;
}
.registration-fields > div {
  min-width: 0;
}
.platform-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tenant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
  align-items: start;
  gap: 20px;
  margin-bottom: 24px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: start;
  gap: 20px;
  margin-bottom: 24px;
}
.backup-notice,
.plan-backup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.plan-backup-list {
  margin-top: 20px;
}
.plan-backup-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.plan-backup-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.team-member {
  margin-bottom: 0;
}
.team-member .panel-header {
  flex-wrap: wrap;
}
.team-member h3 {
  overflow-wrap: anywhere;
}
.team-invite-fields {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.team-invite-fields .form-label {
  margin-top: 0;
}
.team-role-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
.team-role-notes p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.team-role-notes strong {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
}
.team-invitation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.team-invitation:last-child {
  border-bottom: 0;
}
.team-invitation p {
  color: var(--muted);
  margin: 6px 0;
  font-size: 12px;
}
.tenant-card {
  margin: 0;
}
.tenant-card .panel-header {
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tenant-card h2,
.tenant-admin {
  overflow-wrap: anywhere;
}
.tenant-admin {
  font-size: 12px;
  color: var(--muted);
}
.tenant-projects {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin: 18px 0 22px;
}
.tenant-projects h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.tenant-projects a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  font-size: 13px;
}
.tenant-projects a span {
  overflow-wrap: anywhere;
}
.tenant-projects a small {
  white-space: nowrap;
}
#tenant-create .registration-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.login-form .registration-fields {
  margin-top: 24px;
}
.login-form .form-error:empty {
  margin-top: 0;
}
.legal > .brand {
  margin-bottom: 36px;
}
.legal h1 {
  margin-bottom: 14px;
}
.design-card > .check-row {
  margin-top: 0;
}
.surface-card h4 {
  color: var(--ink);
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.surface-card,
.design-card,
.submission {
  border-radius: 12px;
}
.quality-result small {
  color: inherit;
}
.customer-header .actions {
  justify-content: flex-end;
}
.customer-progress p {
  font-size: 14px;
  color: var(--muted);
}
@media (max-width: 1100px) {
  .contact-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: 82px;
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .topbar .actions {
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 150px;
    font-size: 11px;
  }
  .mobile-brand .brand img {
    width: 146px;
  }
  .mobile-brand .brand small {
    font-size: 10px;
  }
  .mobile-nav {
    display: block;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    padding: 12px 16px;
  }
  .mobile-nav summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
  }
  .mobile-nav nav {
    display: grid;
    gap: 5px;
    margin-top: 12px;
  }
  .nav-item {
    min-height: 44px;
  }
  .login-story .brand img {
    width: 180px;
  }
  .login-story .eyebrow {
    margin-top: 28px;
  }
  .login-story h1 {
    max-width: 500px;
  }
  .login-form h2 {
    font-size: 28px;
  }
  .login-form input:not([type='checkbox']):not([type='radio']) {
    font-size: 16px;
  }
  .customer-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .customer-header .brand img {
    width: 155px;
  }
  .customer-header .actions {
    margin-left: auto;
  }
  .customer-progress {
    padding: 18px;
  }
  .contact-fields,
  .team-invite-fields,
  .team-role-notes,
  #tenant-create .registration-fields {
    grid-template-columns: 1fr;
  }
  .platform-stats {
    grid-template-columns: 1fr;
  }
  .platform-stats .stat {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 18px;
  }
  .platform-stats .stat-label {
    justify-content: flex-start;
    flex-direction: row-reverse;
    margin-right: auto;
  }
  .platform-stats .stat-value {
    grid-column: 2;
    grid-row: 1 / 3;
    margin: 0;
    align-self: center;
  }
  .legal {
    margin: 16px;
  }
  .form-footer .btn,
  #tenant-create > .form-footer .btn {
    white-space: normal;
  }
  .submission {
    padding: 12px;
  }
  .surface-card {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
.activity-filters {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(200px, 1.2fr) auto;
  align-items: end;
  gap: 16px;
  padding: 16px 20px;
}
.customer-hero > .pill {
  align-self: center;
}
.activity-summary .stat {
  padding: 16px 20px;
}
.activity-summary .stat-value {
  margin: 4px 0;
}
.activity-grid th,
.activity-grid td {
  padding: 10px 8px;
}
.activity-grid th {
  font-size: 9px;
}
.activity-grid td:first-child {
  min-width: 150px;
}
.activity-grid td:last-child {
  min-width: 90px;
}
.activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 20px;
  align-items: start;
}
.activity-grid .panel {
  min-width: 0;
}
.activity-email {
  display: block;
  overflow-wrap: anywhere;
}
.activity-user {
  padding: 0;
  border: 0;
  background: none;
  color: #214339;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.activity-user:hover {
  text-decoration: underline;
}
.activity-trend {
  margin-bottom: 20px;
  padding: 16px 20px;
}
.activity-trend .panel-header {
  margin-bottom: 8px;
}
.activity-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0;
}
.activity-day {
  flex: 1 0 38px;
  text-align: center;
  font-size: 11px;
}
.activity-day > span {
  display: block;
}
.activity-bar {
  background: #91b83f;
  border-radius: 5px 5px 0 0;
  margin: 4px auto;
  max-width: 38px;
}
@media (max-width: 1250px) {
  .activity-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 800px) {
  .activity-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}
