:root {
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f4f6fb;
  --blue: #2f66f3;
  --blue-dark: #1f3fad;
  --purple: #9d2fe5;
  --green: #22c55e;
  --red: #ef4444;
  --gold: #d89a00;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f8fafc;
  font-size: 14px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 102, 243, .35);
  outline-offset: 2px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: start;
  position: relative;
  overflow: hidden;
  padding: 28px clamp(24px, 10vw, 120px);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 154, 139, .24), transparent 28%),
    radial-gradient(circle at 72% 78%, rgba(29, 196, 188, .22), transparent 32%),
    #dbeafe url("login-hero.png") center / cover no-repeat;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .38) 54%, rgba(255, 255, 255, .08)),
    rgba(219, 234, 254, .08);
  backdrop-filter: blur(1px);
}

.login-shell::after {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 18px;
  pointer-events: none;
}

.login-panel {
  width: min(540px, 100%);
  display: grid;
  position: relative;
  z-index: 1;
  gap: 26px;
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 32px 100px rgba(16, 31, 64, .2);
  backdrop-filter: blur(14px);
}

.login-brand-block {
  display: grid;
  gap: 14px;
}

.login-logo {
  width: min(250px, 72%);
  height: auto;
  display: block;
}

.eyebrow {
  margin: 8px 0 0;
  color: var(--blue);
  font-weight: 800;
}

.login-panel h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(40px, 6vw, 64px);
  line-height: .98;
  letter-spacing: 0;
  color: #13233f;
}

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

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  font-weight: 800;
  color: #344054;
}

.login-form input {
  width: 100%;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 15px 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, .94);
}

.login-form button {
  border: 0;
  border-radius: 8px;
  padding: 15px 18px;
  color: #fff;
  background: linear-gradient(135deg, #1e5af7, #183760);
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(30, 90, 247, .24);
}

.login-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  color: #b42318;
  background: #fee4e2;
  font-weight: 800;
}

.form-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 800;
}

.admin-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 42px 34px 70px;
  position: relative;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
}

.admin-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.focus-button {
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  color: #fff;
  background: var(--purple);
  font-size: 18px;
  font-weight: 900;
}

.sign-out {
  border: 0;
  background: transparent;
  color: #ef2c2c;
  font-size: 17px;
  font-weight: 900;
}

.reset-button {
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 13px 16px;
  color: #344054;
  background: #fff;
  font-weight: 900;
}

.admin-tabs {
  display: flex;
  gap: clamp(14px, 1.8vw, 30px);
  overflow-x: auto;
  margin: 28px 0 34px;
  border-bottom: 1px solid #d7dce7;
}

.admin-tabs button {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0 6px 18px;
  background: transparent;
  color: #6b7280;
  font-size: 15px;
  font-weight: 900;
}

.admin-tabs .active {
  color: #2765ff;
  border-color: #4d86ff;
}

.attention-panel {
  display: grid;
  gap: 22px;
  padding: 28px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(116deg, #3b82f6 0%, #5e57e8 48%, #ad26e2 100%);
  box-shadow: 0 15px 34px rgba(68, 73, 127, .2);
}

.morning-title {
  display: flex;
  gap: 20px;
  align-items: center;
}

.morning-title > span {
  color: #ffdf3c;
  font-size: 32px;
}

.morning-title h2,
.morning-title p {
  margin: 0;
}

.morning-title h2 {
  font-size: 27px;
}

.morning-title p {
  font-size: 18px;
  font-weight: 650;
  opacity: .86;
}

.attention-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.attention-stats article,
.attention-note {
  border-radius: 8px;
  background: rgba(255, 255, 255, .14);
}

.attention-stats strong,
.metric-card strong,
.info-card strong {
  font-size: 30px;
}

.page-panel,
.priority-card,
.purple-card,
.milestones-card,
.project-list,
.welcome-panel {
  padding: 24px;
}

.section-heading h2,
.priority-card h2,
.purple-card h2,
.milestones-card h2,
.project-list h2 {
  font-size: 24px;
}

.attention-stats article {
  padding: 24px;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.attention-stats strong {
  font-size: 42px;
}

.attention-stats span,
.attention-note span {
  font-size: 21px;
  opacity: .85;
}

.attention-note {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
}

.linked-note {
  width: 100%;
  border: 0;
  color: inherit;
  text-align: left;
}

.attention-note strong {
  font-size: 20px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 34px;
  margin-top: 34px;
}

.purple-card,
.priority-card,
.admin-lists article,
.milestones-card,
.project-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(17, 24, 39, .06);
}

.purple-card {
  min-height: 410px;
  padding: 32px;
  color: #fff;
  background: linear-gradient(145deg, #5c5ff2, #9f2df0);
}

.purple-card h2,
.priority-card h2,
.admin-lists h2,
.milestones-card h2,
.project-list h2 {
  margin: 0;
  font-size: 30px;
}

.purple-card p {
  font-size: 22px;
  opacity: .86;
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.empty-state span {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border: 6px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  font-size: 42px;
}

.empty-state strong {
  font-size: 24px;
}

.empty-state small {
  font-size: 20px;
  opacity: .85;
}

.priority-card {
  padding: 36px;
}

.priority-card h2 {
  margin-bottom: 24px;
}

.priority-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  margin-top: 16px;
  padding: 18px 22px;
  border: 1px solid;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.priority-row strong {
  font-size: 24px;
}

.priority-row em {
  justify-self: start;
  min-width: 38px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.priority-row .mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
}

.priority-row.red {
  color: #c12424;
  border-color: #ffc0c0;
  background: #fff1f1;
}

.priority-row.orange {
  color: #da6f35;
  border-color: #ffc58e;
  background: #fff7ed;
}

.priority-row.gold {
  color: #a16207;
  border-color: #f7da63;
  background: #fffdeb;
}

.priority-row.green {
  color: #16803a;
  border-color: #9debb5;
  background: #effdf4;
}

.admin-lists {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 34px;
  margin-top: 34px;
}

.admin-lists article {
  padding: 28px;
}

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

.section-heading button {
  border: 1px solid #cdd8ff;
  border-radius: 8px;
  padding: 10px 14px;
  color: #2458d8;
  background: #f5f8ff;
  font-weight: 900;
}

.customer-table,
.queue-list {
  display: grid;
  gap: 10px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  width: 100%;
  border: 1px solid transparent;
  padding: 15px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475467;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.row-main {
  display: grid;
  grid-template-columns: 1.1fr 1fr .55fr .55fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.customer-table .row-main {
  grid-template-columns: 1.35fr .72fr .45fr .55fr .9fr;
}

.row-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions button,
.form-actions button {
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 9px 12px;
  color: #2458d8;
  background: #fff;
  font-weight: 900;
}

.row-actions .danger-action {
  color: #b42318;
  border-color: #fecaca;
  background: #fff7f7;
}

.form-actions .secondary-action {
  color: #344054;
  background: #f8fafc;
}

.editable-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.editable-row .row-main {
  width: 100%;
}

.table-row strong {
  color: #111827;
}

.customer-name-cell,
.customer-workspace-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.customer-name-cell img,
.customer-workspace-title img,
.customer-logo-preview img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-logo-placeholder {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #2458d8;
  background: #eef4ff;
  font-weight: 900;
}

.customer-logo-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.table-row em {
  font-style: normal;
  font-weight: 800;
  color: #2765ff;
}

.queue-list p {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 15px;
  border-left: 4px solid #7c3aed;
  border-radius: 8px;
  background: #f8f7ff;
}

.queue-list span {
  color: var(--muted);
}

.inline-editor,
.template-allocator,
.template-editor-form,
.contract-preview,
.setup-instructions,
.setup-submit-form {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payment-setup {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.payment-choice {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
}

.payment-instructions {
  border-left-color: #2f66f3;
}

.setup-instructions[hidden],
[data-payment-field][hidden] {
  display: none !important;
}

.inline-editor h3,
.template-allocator h3,
.template-editor-form h3,
.contract-preview h3,
.setup-instructions h3,
.setup-submit-form h3 {
  margin: 0;
}

.inline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.inline-editor label,
.template-allocator label,
.template-editor-form label,
.setup-submit-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 800;
}

.inline-editor input,
.template-allocator input,
.template-allocator select,
.template-editor-form input,
.template-editor-form textarea,
.setup-submit-form input,
.setup-submit-form select,
.setup-submit-form textarea {
  width: 100%;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}

.inline-editor button,
.template-allocator button,
.template-editor-form button,
.setup-submit-form button {
  justify-self: start;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.apple-logo {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 8px;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  font-size: 23px;
  vertical-align: middle;
}

.setup-choice {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.setup-choice button {
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  color: #344054;
  background: transparent;
  font-weight: 900;
}

.setup-choice button.active {
  color: #fff;
  background: #111827;
}

.setup-instructions {
  border-left: 5px solid #111827;
  background: #fbfcff;
}

.setup-instructions p {
  margin: 0;
  color: var(--muted);
}

.setup-instructions ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: #344054;
  line-height: 1.55;
}

.setup-submit-form textarea {
  min-height: 130px;
  resize: vertical;
}

.checkbox-library {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-library label {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
}

.checkbox-library input {
  width: auto;
  margin-top: 3px;
}

.checkbox-library span {
  display: grid;
  gap: 3px;
}

.checkbox-library em {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

.template-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 18px;
}

.template-editor-form textarea {
  min-height: 420px;
  line-height: 1.55;
  resize: vertical;
}

.template-editor-form .codex-notes {
  min-height: 150px;
}

.contract-preview {
  align-content: start;
  max-height: 760px;
  overflow: auto;
  background: #fbfcff;
}

.full-contract-preview {
  max-height: none;
  overflow: visible;
}

.contract-logo-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 16px;
}

.contract-logo-header img {
  width: min(320px, 70%);
  height: auto;
  object-fit: contain;
}

.contract-preview section {
  padding: 12px 0;
  border-top: 1px solid #e6eaf2;
}

.contract-preview h4 {
  margin: 0 0 8px;
  color: #152033;
  font-size: 17px;
}

.contract-preview p,
.contract-preview li {
  margin: 0 0 7px;
  color: #475467;
  line-height: 1.5;
}

.checkbox-library fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid #e6eaf2;
  border-radius: 8px;
  background: #fbfcff;
}

.checkbox-library legend {
  padding: 0 6px;
  color: #152033;
  font-weight: 900;
}

.contract-list,
.contract-signing-panel,
.contract-sign-card {
  display: grid;
  gap: 14px;
}

.contract-list {
  margin-top: 20px;
}

.contract-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contract-row div {
  display: grid;
  gap: 4px;
}

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

.contract-row button,
.signature-form button {
  border: 0;
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.invoice-form,
.invoice-card {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.invoice-form h3 {
  margin: 0;
}

.invoice-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 800;
}

.invoice-form input,
.invoice-form select,
.invoice-form textarea {
  width: 100%;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
}

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

.invoice-form button {
  justify-self: start;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.invoice-list {
  display: grid;
  gap: 14px;
}

.compact-document-card {
  gap: 12px;
  margin-bottom: 0;
  padding: 16px;
}

.compact-document-card header {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}

.invoice-card header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.invoice-card.compact-document-card header {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}

.invoice-card img,
.invoice-template-logo {
  width: 220px;
  max-width: 100%;
  height: auto;
}

.compact-document-card img {
  width: 180px;
}

.invoice-card header div {
  display: grid;
  gap: 4px;
}

.invoice-card header span,
.invoice-card small {
  color: var(--muted);
}

.invoice-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.document-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.document-summary-grid p {
  display: grid;
  gap: 4px;
  margin: 0;
}

.document-summary-grid span,
.document-body h3 {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.document-summary-grid strong {
  color: var(--ink);
}

.document-view-panel {
  align-content: start;
}

.full-document-card {
  margin-bottom: 0;
}

.document-body {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.document-body h3,
.document-body p {
  margin: 0;
}

.invoice-card dt {
  color: var(--muted);
  font-weight: 800;
}

.invoice-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.contract-sign-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.signature-form {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.signature-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 900;
}

.signature-form input {
  width: 100%;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 12px;
}

.signature-line {
  min-height: 74px;
  padding: 18px 20px;
  border: 1px dashed #a7b4cb;
  border-radius: 8px;
  color: #152033;
  background: #f8fafc;
  font-family: "Snell Roundhand", "Brush Script MT", cursive;
  font-size: 30px;
}

.quick-capture {
  position: fixed;
  right: 36px;
  bottom: 36px;
  border: 0;
  border-radius: 999px;
  padding: 24px 32px;
  color: #fff;
  background: #2f66f3;
  box-shadow: 0 12px 24px rgba(47, 102, 243, .36);
  font-size: 22px;
  font-weight: 900;
}

.customer-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: #fff;
  min-width: 0;
}

.portal-sidebar {
  min-height: 100vh;
  min-width: 0;
  padding: 28px 22px;
  border-right: 1px solid #e1e5ed;
  background: #fff;
}

.portal-sidebar h1 {
  margin: 0 0 28px;
  font-size: 30px;
}

.account-card {
  display: grid;
  gap: 5px;
  margin-bottom: 24px;
  padding: 15px;
  border-radius: 8px;
  background: #eef4ff;
}

.account-card span,
.account-card small {
  color: #596579;
  font-size: 16px;
}

.account-card strong {
  font-size: 22px;
}

.account-card button {
  justify-self: start;
  border: 0;
  padding: 6px 0 0;
  color: #2458d8;
  background: transparent;
  font-weight: 900;
}

.portal-sidebar nav {
  display: grid;
  gap: 6px;
}

.portal-sidebar nav button {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 8px;
  padding: 14px 12px;
  background: transparent;
  color: #4b5563;
  font-size: 20px;
  font-weight: 750;
  text-align: left;
}

.portal-sidebar nav button span {
  width: 28px;
  color: #7a8394;
  text-align: center;
}

.portal-sidebar nav .active {
  color: #3b82f6;
  background: #eef4ff;
}

.portal-main {
  min-width: 0;
  background:
    linear-gradient(105deg, rgba(240, 124, 168, .34), rgba(251, 209, 131, .4), rgba(134, 198, 215, .42)),
    #f8fafc;
}

.portal-topbar {
  height: 118px;
  display: flex;
  align-items: center;
  padding: 0 34px;
  color: #fff;
  background: #1f2937;
}

.portal-topbar h1 {
  margin: 0;
  font-size: 36px;
}

.customer-canvas {
  display: grid;
  gap: 22px;
  padding: 28px 28px 50px;
}

.spring-banner {
  position: relative;
  min-height: 202px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(17, 24, 39, .25);
  background: #f5d5df;
}

.spring-banner img {
  width: 100%;
  height: 202px;
  display: block;
  object-fit: cover;
}

.spring-banner::after {
  content: "";
  position: absolute;
  inset: 48% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, .34));
}

.spring-banner strong {
  position: absolute;
  left: 24px;
  bottom: 26px;
  z-index: 1;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
}

.welcome-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 36px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(120deg, #2f66f3, #2244b3);
}

.welcome-panel h2 {
  margin: 0 0 10px;
  font-size: 45px;
}

.welcome-panel p {
  margin: 0;
  color: #d9e4ff;
  font-size: 25px;
  font-weight: 650;
}

.welcome-panel button {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  padding: 17px 28px;
  color: #dce7ff;
  background: rgba(255, 255, 255, .06);
  font-size: 22px;
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.metric-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 150px;
  padding: 35px 34px;
  width: 100%;
  border-left: 5px solid;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(17, 24, 39, .15);
  text-align: left;
}

.metric-card div {
  display: grid;
  gap: 8px;
}

.metric-card span {
  color: #4b5563;
  font-size: 20px;
  font-weight: 850;
}

.metric-card strong {
  font-size: 44px;
}

.metric-card em {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  font-style: normal;
  font-size: 31px;
  font-weight: 900;
}

.metric-card.blue {
  border-color: #3b82f6;
}

.metric-card.blue em {
  color: #2f66f3;
  background: #dbeafe;
}

.metric-card.gold {
  border-color: #eab308;
}

.metric-card.gold em {
  color: #b98104;
  background: #fff4b9;
}

.metric-card.green {
  border-color: #22c55e;
}

.metric-card.green em {
  color: #16a34a;
  background: #dcfce7;
}

.metric-card.red {
  border-color: #ef4444;
}

.metric-card.red em {
  color: #ef2c2c;
  background: #fee2e2;
}

.milestones-card,
.project-list {
  padding: 36px;
}

.milestone-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 350px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: center;
}

.clickable-card {
  border-radius: 8px;
}

.clickable-card:hover,
.metric-card:hover,
.project-card:hover,
.task-row:hover,
.table-row:hover,
.kanban-column button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 24, 39, .12);
}

.calendar-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: 139px;
  height: 139px;
  margin-top: 20px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(#ff7a83 0 24%, #ed272d 24% 100%);
  box-shadow: 0 12px 24px rgba(17, 24, 39, .24);
}

.calendar-illustration::before,
.calendar-illustration::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 22px;
  height: 34px;
  border-radius: 999px;
  background: #87919e;
}

.calendar-illustration::before {
  left: 25px;
}

.calendar-illustration::after {
  right: 25px;
}

.calendar-illustration span {
  font-size: 27px;
  font-weight: 950;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .35);
}

.milestone-empty strong {
  font-size: 28px;
}

.milestone-empty p,
.milestone-empty small {
  margin: 0;
  color: #4b5563;
  font-size: 21px;
}

.milestone-empty em {
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #b42318;
  background: #fee4e2;
  font-style: normal;
  font-weight: 900;
}

.project-list {
  display: grid;
  gap: 16px;
}

.project-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.project-card .row-actions {
  justify-content: flex-start;
}

.project-card div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #344054;
}

.project-card strong {
  color: #111827;
  font-size: 20px;
}

.project-card span {
  font-weight: 900;
  color: #b42318;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf5;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f66f3, #22c55e);
}

.project-card small {
  color: #667085;
  font-size: 15px;
}

.page-panel {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(17, 24, 39, .06);
}

.page-panel .section-heading {
  margin-bottom: 0;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.panel-grid {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #475467;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.task-row .row-main {
  grid-template-columns: .72fr 1.7fr 1fr .62fr;
}

.task-row span {
  color: #2458d8;
  font-weight: 900;
}

.task-row strong {
  color: var(--ink);
}

.task-row em {
  font-style: normal;
}

.task-row small {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2458d8;
  font-weight: 800;
}

.big-table {
  gap: 12px;
}

.selected-row {
  border-color: #2f66f3;
  background: #eef4ff;
}

.customer-workspace {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  background: #fbfcff;
}

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

.customer-workspace-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
}

.customer-login-summary,
.customer-work-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-login-summary article,
.customer-work-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-login-summary span,
.customer-work-grid span {
  display: block;
  color: var(--muted);
}

.customer-work-grid h4 {
  margin: 0;
  color: var(--ink);
}

.customer-work-grid p {
  margin: 0;
}

.big-table .table-row {
  min-height: 70px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.kanban-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 310px;
  padding: 16px;
  border-radius: 8px;
  background: #f8fafc;
}

.kanban-column h3 {
  margin: 0 0 4px;
}

.kanban-column button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease;
}

.compact-banner {
  min-height: 180px;
}

.compact-banner img {
  height: 180px;
}

.info-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.info-card span {
  color: var(--muted);
  font-weight: 850;
}

.info-card strong {
  font-size: 38px;
}

.info-card p {
  margin: 0;
  color: #475467;
}

.chart-card {
  display: flex;
  align-items: end;
  gap: 18px;
  min-height: 250px;
  padding: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef4ff, #f5f0ff);
}

.chart-card span {
  flex: 1;
  min-height: 44px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(#2f66f3, #9d2fe5);
}

.database-status {
  padding: 12px 14px;
  border-radius: 8px;
  color: #344054;
  background: #eef4ff;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.database-viewer {
  display: grid;
  gap: 18px;
}

.db-table {
  display: grid;
  gap: 10px;
}

.db-table h3 {
  margin: 0;
  font-size: 22px;
}

.db-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.db-table table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

.db-table th,
.db-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.db-table th {
  color: #344054;
  background: #f8fafc;
  font-size: 13px;
  text-transform: uppercase;
}

.db-table td {
  color: #475467;
  font-size: 14px;
}

.feedback-form,
.capture-form {
  display: grid;
  gap: 12px;
}

.feedback-form label,
.capture-form label {
  font-weight: 900;
  color: #344054;
}

.feedback-form textarea,
.capture-form textarea,
.capture-form input {
  width: 100%;
  min-height: 110px;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  padding: 14px;
  resize: vertical;
}

.capture-form input {
  min-height: auto;
}

.feedback-form button,
.capture-form button {
  justify-self: start;
  border: 0;
  border-radius: 8px;
  padding: 13px 18px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  padding: 13px 18px;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .24);
  font-weight: 900;
}

.focus-mode .admin-tabs,
.focus-mode .attention-panel,
.focus-mode .admin-lists {
  display: none;
}

@media (max-width: 1150px) {
  .customer-page {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    min-height: 0;
    width: 100%;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .portal-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-topbar {
    height: 96px;
  }

  .metric-grid,
  .attention-stats,
  .admin-grid,
  .admin-lists,
  .two-col,
  .three-col,
  .inline-grid,
  .checkbox-library,
  .template-layout,
  .customer-login-summary,
  .customer-work-grid,
  .document-summary-grid,
  .kanban-board {
    grid-template-columns: 1fr;
  }

  .welcome-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .login-shell {
    justify-items: center;
    padding: 18px;
  }

  .login-shell::before {
    background: rgba(255, 255, 255, .55);
  }

  .login-panel {
    padding: 26px;
  }

  .admin-page,
  .customer-canvas,
  .portal-sidebar {
    padding: 22px;
  }

  .admin-header,
  .admin-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .focus-button,
  .reset-button,
  .sign-out,
  .welcome-panel button {
    width: 100%;
  }

  .invoice-card.compact-document-card header,
  .invoice-card header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .compact-document-card img,
  .invoice-card img {
    width: 180px;
  }

  .attention-panel,
  .welcome-panel,
  .milestones-card,
  .project-list,
  .priority-card,
  .purple-card {
    padding: 22px;
  }

  .portal-sidebar nav {
    display: flex;
    gap: 10px;
    margin-inline: -4px;
    max-width: calc(100vw - 36px);
    overflow-x: auto;
    padding: 4px;
  }

  .portal-sidebar nav button {
    flex: 0 0 188px;
  }

  .welcome-panel h2 {
    font-size: 34px;
  }

  .welcome-panel p,
  .morning-title p {
    font-size: 19px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .task-row {
    grid-template-columns: 1fr;
  }

  .task-row small {
    justify-self: start;
  }

  .page-panel {
    padding: 22px;
  }

  .quick-capture {
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: auto;
  }
}

@media (min-width: 721px) {
  .admin-page,
  .customer-page {
    font-size: 14px;
  }

  .customer-page {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .portal-sidebar {
    padding: 28px 20px;
  }

  .customer-canvas {
    padding: 28px;
  }

  .customer-topbar {
    padding: 26px 32px;
  }

  .customer-topbar h1 {
    font-size: 36px;
  }

  .welcome-panel h2 {
    font-size: 34px;
  }

  .welcome-panel p {
    font-size: 18px;
  }

  .metric-card strong,
  .attention-stats strong,
  .info-card strong {
    font-size: 30px;
  }

  .metric-card,
  .info-card {
    min-height: 118px;
    padding: 18px;
  }

  .quick-capture {
    padding: 16px 24px;
    font-size: 20px;
  }
}
