:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #f7f7f4;
    background: #111;
    font-synthesis: none;
}

* { box-sizing: border-box; }

html, body, #app { min-height: 100%; margin: 0; }

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(190, 145, 48, .12), transparent 32rem),
        #111;
    color: #f6f6f3;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100dvh; padding-bottom: 82px; }

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 68px;
    padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20,20,20,.94);
    border-bottom: 1px solid #2a2a2a;
    backdrop-filter: blur(14px);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark, .boot-mark {
    width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center;
    justify-content: center; background: #222; border: 1px solid #3a3a3a; position: relative;
}
.brand-m { color: #fff; font-size: 22px; font-weight: 800; }
.brand-chevron, .boot-mark b { color: #c69a3a; font-size: 28px; line-height: 1; margin-left: -2px; }
.brand-name { font-size: 16px; letter-spacing: .01em; }

.notification-button {
    position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    border: 1px solid #303030; background: #202020;
}
.notification-icon { font-size: 20px; filter: grayscale(1) brightness(1.7); }
.notification-badge {
    position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; display: grid; place-items: center; background: #c69a3a; color: #111;
    font-size: 11px; font-weight: 800; border: 2px solid #171717;
}

.app-main { width: min(100%, 980px); margin: 0 auto; padding: 26px 18px 36px; }

h1 { margin: 3px 0 8px; font-size: clamp(28px, 7vw, 42px); line-height: 1.02; letter-spacing: -.03em; }
h2 { margin: 0 0 16px; font-size: 18px; }
p { color: #aaa; }
.lead { line-height: 1.55; max-width: 60ch; }
.eyebrow { margin: 0; color: #c69a3a; text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 800; }
.page-heading { margin-bottom: 22px; }
.page-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

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

.quick-launch-tile {
    position: relative;
    min-height: 142px;
    padding: 18px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background: linear-gradient(145deg, #242424, #1b1b1b);
    border: 1px solid #303030;
    box-shadow: 0 12px 34px rgba(0,0,0,.18);
}
.quick-launch-tile:active { transform: scale(.985); }
.quick-launch-icon { position: absolute; top: 17px; left: 18px; color: #c69a3a; font-size: 32px; font-weight: 800; }
.quick-launch-title { font-weight: 800; font-size: 17px; }
.quick-launch-subtitle { margin-top: 3px; color: #939393; font-size: 12px; }
.quick-launch-badge {
    position: absolute; top: 14px; right: 14px; min-width: 24px; height: 24px; border-radius: 999px;
    display: grid; place-items: center; background: #c69a3a; color: #111; font-weight: 800; font-size: 11px;
}

.info-card {
    margin: 22px 0 14px; padding: 18px; border-radius: 18px; background: #1b1b1b; border: 1px solid #2d2d2d;
}
.detail-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid #292929; }
.detail-row span { color: #929292; }
.detail-row strong { text-align: right; }

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

.button {
    min-height: 52px; border-radius: 14px; padding: 12px 16px; border: 1px solid transparent;
    font: inherit; font-weight: 800; cursor: pointer;
}
.button-primary { background: #c69a3a; color: #111; }
.button-secondary { background: #242424; color: #f7f7f4; border-color: #3b3b3b; }
.button-full { width: 100%; margin-top: 10px; }

.text-button { border: 0; background: transparent; color: #c69a3a; font: inherit; font-weight: 700; }

.notification-list { display: grid; gap: 10px; }
.notification-item {
    min-height: 72px; display: flex; gap: 12px; align-items: center; padding: 14px 16px;
    border-radius: 16px; background: #1b1b1b; border: 1px solid #2d2d2d;
}
.notification-item span:last-child { display: grid; gap: 4px; }
.notification-item small { color: #939393; }
.notification-dot { width: 9px; height: 9px; border-radius: 50%; background: #555; flex: 0 0 auto; }
.notification-item.unread .notification-dot { background: #c69a3a; }

.prototype-note { margin-top: 20px; font-size: 12px; line-height: 1.5; color: #757575; }

.bottom-nav {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    min-height: 70px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: rgba(20,20,20,.96); border-top: 1px solid #2b2b2b; backdrop-filter: blur(16px);
}
.bottom-nav a { display: grid; place-items: center; align-content: center; gap: 2px; color: #777; border-radius: 12px; }
.bottom-nav a span { font-size: 21px; line-height: 1; }
.bottom-nav a small { font-size: 10px; font-weight: 700; }
.bottom-nav a.active { color: #c69a3a; background: #202020; }

.boot-screen { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 12px; background: #171717; }
.boot-mark { width: 76px; height: 76px; border-radius: 20px; }
.boot-mark span { font-size: 38px; font-weight: 900; }
.boot-mark b { font-size: 44px; }
.boot-screen p { color: #eee; font-weight: 800; }
#blazor-error-ui { display: none; }

.empty-state { text-align: center; padding: 50px 10px; }

@media (min-width: 720px) {
    .app-main { padding: 34px 28px 48px; }
    .quick-launch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .quick-launch-tile { min-height: 160px; }
}

@media (min-width: 980px) {
    .quick-launch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 350px) {
    .quick-launch-grid, .two-action-grid { grid-template-columns: 1fr; }
    .brand-name { display: none; }
}

/* ---------- Login ---------- */

.login-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding:
        calc(28px + env(safe-area-inset-top))
        20px
        calc(28px + env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 50% 0%, rgba(198, 154, 58, .10), transparent 30rem),
        #111;
}

.login-page {
    width: min(100%, 430px);
}

.login-brand {
    text-align: center;
    margin-bottom: 34px;
}

.login-logo-wrap {
    min-height: 94px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}

.login-logo {
    display: block;
    max-width: 190px;
    max-height: 88px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.login-logo-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    align-items: center;
    justify-content: center;
    background: #202020;
    border: 1px solid #343434;
}

.login-logo-placeholder span {
    color: #fff;
    font-size: 40px;
    font-weight: 900;
}

.login-logo-placeholder b {
    color: #c69a3a;
    font-size: 48px;
    line-height: 1;
    margin-left: -3px;
}

.login-brand h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

.login-brand p {
    margin: 0;
}

.login-form {
    padding: 22px;
    border-radius: 18px;
    border: 1px solid #303030;
    background: #1a1a1a;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .24);
}

.form-field {
    display: grid;
    gap: 8px;
    margin-bottom: 17px;
}

.form-field label {
    color: #e6e6e2;
    font-size: 13px;
    font-weight: 800;
}

.form-input {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 11px;
    border: 1px solid #3a3a3a;
    outline: none;
    background: #121212;
    color: #fff;
    font: inherit;
}

.form-input::placeholder {
    color: #707070;
}

.form-input:focus {
    border-color: #c69a3a;
    box-shadow: 0 0 0 3px rgba(198, 154, 58, .12);
}

.login-primary {
    margin-top: 6px;
}

.login-secondary {
    margin-top: 22px;
}

.login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.login-divider span {
    height: 1px;
    background: #2f2f2f;
}

.login-divider small {
    color: #777;
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.button-windows {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #222;
    color: #f5f5f2;
    border-color: #3c3c3c;
}

.windows-mark {
    font-size: 21px;
    color: #c69a3a;
}

.login-preview-note {
    margin: 18px auto 0;
    max-width: 340px;
    text-align: center;
    font-size: 11px;
    line-height: 1.45;
    color: #656565;
}

@media (max-width: 390px) {
    .login-shell {
        align-items: start;
        padding-top: calc(20px + env(safe-area-inset-top));
    }

    .login-brand {
        margin-bottom: 24px;
    }

    .login-form {
        padding: 18px;
    }
}

/* ---------- Mobile preview alignment pass ---------- */

h1:focus {
    outline: none;
}

.header-brand-logo {
    width: 38px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.header-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.quick-launch-icon-image {
    position: absolute;
    top: 17px;
    left: 18px;
    width: 31px;
    height: 31px;
    object-fit: contain;
}

.bottom-nav a img {
    width: 21px;
    height: 21px;
    object-fit: contain;
}

.mobile-card-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.job-card,
.schedule-card {
    display: block;
    border: 1px solid #303030;
    border-radius: 16px;
    background: linear-gradient(145deg, #222, #191919);
    padding: 17px;
}

.job-card-top,
.job-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.job-card h2 {
    margin: 18px 0 4px;
    font-size: 18px;
}

.job-card p,
.schedule-card p {
    margin: 4px 0 15px;
}

.job-meta {
    padding-top: 12px;
    border-top: 1px solid #2d2d2d;
    font-size: 12px;
}

.job-meta span {
    color: #888;
}

.status-pill {
    border: 1px solid rgba(208,160,58,.42);
    background: rgba(208,160,58,.10);
    color: #D0A03A;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 800;
}

.status-pill.muted {
    color: #aaa;
    border-color: #3b3b3b;
    background: #252525;
}

.schedule-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 14px;
    align-items: center;
}

.schedule-date {
    min-height: 58px;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 12px;
    border: 1px solid #393939;
    background: #151515;
}

.schedule-date strong {
    color: #D0A03A;
    font-size: 23px;
    line-height: 1;
}

.schedule-date span {
    margin-top: 3px;
    color: #888;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
}

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

.qr-scan-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qr-scan-button img {
    width: 24px;
    height: 24px;
    filter: brightness(0);
}

.preview-cabinet-link {
    display: block;
    margin: 16px auto 0;
}

.cabinet-context {
    display: grid;
    gap: 4px;
    margin: 12px 0 18px;
    color: #999;
}

.cabinet-context strong {
    color: #eee;
    font-size: 17px;
}

.cabinet-info-card {
    margin-top: 0;
}

.detail-row.first {
    border-top: 0;
}

@media (max-width: 420px) {
    .brand-name {
        font-size: 14px;
    }

    .quick-launch-tile {
        min-height: 128px;
        padding: 15px;
    }

    .quick-launch-icon-image {
        width: 28px;
        height: 28px;
        top: 15px;
        left: 15px;
    }

    .quick-launch-title {
        font-size: 15px;
    }
}

/* PWA signed-in theme system */
:root,
:root[data-theme="light"] {
  --page:#F7F7F5; --surface:#FFF; --text:#232323; --muted:#75787B;
  --line:#E0E0DC; --gold:#CAA674; --gold-soft:rgba(202,166,116,.12); --danger:#A7473D;
}
:root[data-theme="dark"] {
  --page:#111315; --surface:#1A1C1F; --text:#F4F4F1; --muted:#A3A6A9;
  --line:#34383D; --gold:#CAA674; --gold-soft:rgba(202,166,116,.12); --danger:#E47D70;
}

body { background:var(--page); color:var(--text); }
.app-main { color:var(--text); }
.app-main p { color:var(--muted); }
.brand-name { display:none; }
.header-brand-logo { width:46px; height:34px; }

.dashboard-greeting { margin-bottom:24px; }
.dashboard-greeting h1 { color:var(--text); font-size:clamp(25px,6.4vw,34px); font-weight:600; }
.dashboard-greeting h1 strong { color:var(--gold); font-weight:600; }

.quick-launch-tile {
  min-height:122px; background:var(--surface); border:1px solid var(--gold);
  border-radius:12px; box-shadow:none; padding:15px;
}
.quick-launch-title { color:var(--gold); font-size:15px; font-weight:700; }
.quick-launch-icon-image { width:29px; height:29px; top:16px; left:16px; }

.bottom-nav { background:var(--surface); border-top-color:var(--line); }
.bottom-nav a { color:var(--muted); }
.bottom-nav a.active { color:var(--gold); background:var(--gold-soft); }

.profile-heading { display:flex; align-items:center; gap:14px; margin-bottom:26px; }
.profile-heading h1 { margin:0 0 3px; font-size:25px; }
.profile-heading p { margin:0; }
.profile-avatar {
  width:54px; height:54px; display:grid; place-items:center; border-radius:50%;
  border:2px solid var(--gold); color:var(--gold); background:var(--surface); font-weight:800;
}

.settings-section { margin-top:26px; }
.settings-section h2 {
  margin:0 0 8px 3px; color:var(--muted); font-size:12px; letter-spacing:.08em;
  text-transform:uppercase;
}
.settings-card { border:1px solid var(--line); border-radius:12px; background:var(--surface); overflow:hidden; }
.settings-pad { padding:15px; }
.settings-pad small { display:block; margin-top:4px; color:var(--muted); }
.settings-label { font-weight:700; }

.settings-row {
  min-height:64px; display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding:14px 15px; border-top:1px solid var(--line);
}
.settings-row:first-child { border-top:0; }
.settings-row > div { display:grid; gap:4px; }
.settings-row small { color:var(--muted); }
.settings-row strong { font-size:13px; text-align:right; }

.theme-choice-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:14px; }
.theme-choice {
  min-height:42px; border:1px solid var(--line); border-radius:8px;
  background:var(--surface); color:var(--text); font:inherit; font-weight:700;
}
.theme-choice.selected { border-color:var(--gold); color:var(--gold); background:var(--gold-soft); }

.switch {
  position:relative; width:48px; height:28px; border:0; border-radius:999px;
  background:#B9BCBF; padding:0; flex:0 0 auto;
}
.switch span {
  position:absolute; width:22px; height:22px; top:3px; left:3px; border-radius:50%;
  background:white; transition:left .15s ease;
}
.switch.on { background:var(--gold); }
.switch.on span { left:23px; }

.security-detail { padding:0 15px 15px; border-top:1px solid var(--line); }
.security-status, .policy-row {
  display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 0;
}
.security-status > div { display:grid; gap:4px; }
.security-status small { color:var(--muted); }
.outline-action {
  border:1px solid var(--gold); background:transparent; color:var(--gold);
  border-radius:8px; min-height:38px; padding:0 12px; font-weight:700;
}
.pin-editor {
  display:grid; gap:10px; padding:13px; background:var(--page);
  border:1px solid var(--line); border-radius:10px;
}
.pin-input {
  min-height:50px; border:1px solid var(--line); border-radius:8px;
  background:var(--surface); color:var(--text); text-align:center;
  font-size:22px; letter-spacing:.35em;
}
.pin-editor small { color:var(--muted); }
.policy-row { border-bottom:1px solid var(--line); }
.policy-row span { color:var(--muted); }

.text-action { border:0; background:transparent; padding:13px 0 0; font-weight:700; }
.danger-text, .sign-out-button { color:var(--danger); }
.sign-out-button {
  width:100%; min-height:50px; margin-top:26px; border:1px solid var(--danger);
  border-radius:10px; background:transparent; font-weight:800;
}
.windows-logo { width:20px; height:20px; }

/* Login always stays dark */
.login-shell { background:#111 !important; color:#F7F7F4; }
.login-shell .login-form { background:#1A1A1A; border-color:#303030; }
.login-shell .form-input { background:#121212; color:white; border-color:#3A3A3A; }
.login-shell .button-windows { background:#222; color:#F5F5F2; border-color:#3C3C3C; }

/* Secondary page theme alignment + Job Details + Calendar creation */

.page-title-block {
    margin-bottom: 18px;
}

.page-title-block.compact {
    margin-top: 12px;
}

.page-title-block h1 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 25px;
    font-weight: 700;
}

.page-title-block p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.themed-card {
    background: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
    box-shadow: none !important;
}

.job-card {
    border: 1px solid var(--line);
    color: var(--text);
}

.job-card h2,
.job-card strong,
.schedule-card strong {
    color: var(--text);
}

.job-card p,
.schedule-card p,
.job-meta span {
    color: var(--muted);
}

.job-meta {
    border-color: var(--line);
}

.status-pill {
    color: var(--gold);
    border-color: rgba(202,166,116,.45);
    background: var(--gold-soft);
}

.schedule-card {
    position: relative;
    grid-template-columns: 58px 1fr 8px;
    border: 1px solid var(--line);
}

.schedule-date {
    border-color: var(--line);
    background: var(--page);
}

.schedule-date strong {
    color: var(--gold);
}

.schedule-date span {
    color: var(--muted);
}

.event-colour {
    width: 5px;
    min-height: 42px;
    align-self: stretch;
    border-radius: 999px;
}

.colour-Gold { background: #CAA674; }
.colour-Blue { background: #397FC2; }
.colour-Green { background: #3E8D58; }
.colour-Red { background: #B84B43; }

.back-link {
    display: inline-flex;
    margin-bottom: 5px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
}

.details-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.detail-row {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 15px;
    border-top: 1px solid var(--line);
}

.detail-row.first {
    border-top: 0;
}

.detail-row span {
    color: var(--muted);
}

.detail-row strong {
    max-width: 62%;
    color: var(--text);
    text-align: right;
}

.content-section {
    margin-top: 24px;
}

.content-section > h2 {
    margin: 0 0 9px 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.simple-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.simple-list-row {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-top: 1px solid var(--line);
}

.simple-list-row:first-child {
    border-top: 0;
}

.chevron {
    color: var(--gold);
    font-size: 22px;
    line-height: 1;
}

.notes-card {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    line-height: 1.5;
}

.job-actions {
    margin-top: 24px;
}

.button-outline-gold {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--gold);
    text-decoration: none;
    font-weight: 800;
}

.context-chip {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 6px 10px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    color: var(--gold);
    background: var(--gold-soft);
    font-size: 12px;
    font-weight: 800;
}

.role-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-size: 12px;
}

.role-preview > span {
    margin-right: auto;
}

.role-preview-button {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
}

.role-preview-button.selected {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--gold-soft);
}

.document-list {
    display: grid;
    gap: 10px;
}

.document-card {
    width: 100%;
    min-height: 68px;
    display: grid;
    grid-template-columns: 34px 1fr 18px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    text-align: left;
}

.document-card img {
    width: 27px;
    height: 27px;
}

.document-card span:nth-child(2) {
    display: grid;
    gap: 3px;
}

.document-card strong {
    color: var(--text);
}

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

.empty-state {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--muted);
}

.preview-note {
    margin-top: 18px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.page-heading-with-action {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.icon-action-button {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid var(--gold);
    border-radius: 10px;
    background: var(--gold);
    color: #111;
    font-size: 27px;
    line-height: 1;
    font-weight: 500;
}

.form-card {
    margin: 4px 0 22px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.form-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.form-card-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}

.close-button {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 26px;
}

.field-label {
    display: block;
    margin: 13px 0 6px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.themed-input {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--page);
    color: var(--text);
    font: inherit;
}

.themed-textarea {
    min-height: 82px;
    resize: vertical;
}

.form-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.colour-choice-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}

.colour-choice {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text);
    font-size: 11px;
}

.colour-choice.selected {
    border-color: var(--gold);
    background: var(--gold-soft);
}

.colour-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.audience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.audience-option {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--page);
    font-size: 12px;
}

.user-search-result {
    margin-top: 5px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted) !important;
    font-size: 12px;
}

.validation-message {
    margin-top: 10px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 360px) {
    .form-two-column,
    .audience-grid {
        grid-template-columns: 1fr;
    }

    .colour-choice-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Live API/auth states */
.page-loading,
.page-error {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
}

.page-error,
.login-error {
    color: var(--danger);
}

.login-error {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
}

.login-preview-note {
    margin-top: 14px;
    color: #787878;
    font-size: 11px;
    text-align: center;
}
