:root {
  --ink: #151515;
  --muted: #77736c;
  --paper: #f7f5ef;
  --white: #ffffff;
  --line: #e3dfd6;
  --dark: #111110;
  --gold: #b68b4e;
  --gold-soft: #f2e4cf;
  --green: #2d8b5a;
  --shadow: 0 22px 60px rgba(31, 27, 20, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.portal-shell { min-height: 100vh; display: grid; grid-template-columns: 255px 1fr; }
.portal-sidebar { min-height: 100vh; padding: 32px 22px 24px; position: sticky; top: 0; display: flex; flex-direction: column; color: #f7f6f1; background: var(--dark); }
.portal-brand { display: inline-flex; align-items: center; gap: 10px; font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; font-weight: 700; letter-spacing: -.05em; }
.gold { color: var(--gold); }
.portal-logo { width: 35px; height: 35px; display: block; overflow: hidden; border: 1px solid #514b40; border-radius: 9px; background: #050505; }
.portal-logo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.sidebar-label { margin-top: 68px; color: #807c72; font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.client-mini-card { margin-top: 13px; padding: 11px 10px; display: flex; align-items: center; gap: 10px; border: 1px solid #32312c; border-radius: 13px; background: #1b1b19; }
.client-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--dark); background: var(--gold-soft); font-size: .68rem; font-weight: 700; }
.client-mini-card strong, .client-mini-card small { display: block; }.client-mini-card strong { font-size: .78rem; }.client-mini-card small { margin-top: 2px; color: #87847b; font-size: .67rem; }
.portal-nav { margin-top: 33px; display: grid; gap: 7px; }
.portal-nav-button { width: 100%; padding: 12px 13px; display: flex; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 11px; color: #8f8b83; background: transparent; text-align: left; cursor: pointer; transition: .2s ease; }
.portal-nav-button span { color: var(--gold); }.portal-nav-button:hover, .portal-nav-button.is-active { color: #fff; border-color: #393832; background: #22221f; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 14px; color: #9b968c; font-size: .76rem; }.sidebar-bottom a:hover { color: #fff; }.sidebar-bottom small { color: #625f58; font-size: .65rem; }
.portal-main { width: min(1180px, calc(100% - 80px)); margin: 0 auto; padding: 28px 0 70px; }
.demo-notice { margin-bottom: 23px; padding: 11px 14px; border: 1px solid #eadcc7; border-radius: 12px; color: #756550; background: #fbf2e4; font-size: .76rem; }.demo-notice span { margin-right: 9px; color: #916f3e; font-weight: 700; }
.portal-topbar, .project-heading, .progress-card-top, .progress-meta, .card-heading, .admin-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.portal-topbar { margin: 34px 0 64px; }.portal-kicker { margin: 0 0 9px; color: var(--gold); font-size: .67rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }.portal-topbar h1, .project-heading h2, .card-heading h3 { margin: 0; font-family: "Space Grotesk", sans-serif; letter-spacing: -.055em; }.portal-topbar h1 { font-size: clamp(2.5rem, 5vw, 4.3rem); line-height: .95; }.project-heading h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; }.muted { max-width: 620px; margin: 14px 0 0; color: var(--muted); font-size: .94rem; }
.portal-contact { padding: 12px 17px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--white); font-size: .78rem; font-weight: 700; transition: .2s ease; }.portal-contact:hover { border-color: var(--gold); transform: translateY(-2px); }.portal-contact span { margin-left: 8px; color: var(--gold); font-size: 1rem; }
.status-chip, .admin-badge { padding: 9px 13px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; color: #4c765c; background: #e6f2e9; font-size: .7rem; font-weight: 700; white-space: nowrap; }.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4da76e; }.admin-badge { color: #725937; background: var(--gold-soft); }
.progress-card { margin-top: 35px; padding: 23px 25px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }.progress-card-top { color: #7b776f; font-size: .75rem; }.progress-card-top strong { color: var(--ink); font-family: "Space Grotesk", sans-serif; font-size: 1.6rem; }.progress-track { height: 8px; margin-top: 15px; overflow: hidden; border-radius: 99px; background: #ece9e2; }.progress-track span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #a77c42, #d2ad73); transition: width .3s ease; }.progress-meta { margin-top: 10px; color: #9a958b; font-size: .67rem; }
.portal-stats { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }.stat-card { min-height: 116px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.62); }.stat-label { display: block; margin-bottom: 15px; color: #a09b91; font-size: .67rem; text-transform: uppercase; letter-spacing: .1em; }.stat-card strong, .stat-card small { display: block; }.stat-card strong { font-family: "Space Grotesk", sans-serif; font-size: 1.08rem; }.stat-card small { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.portal-grid { margin-top: 16px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }.portal-column { display: grid; gap: 16px; }.portal-card { padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }.card-heading { align-items: flex-start; }.card-heading h3 { font-size: 1.32rem; }.card-count { color: #9a958c; font-size: .67rem; letter-spacing: .08em; text-transform: uppercase; }.timeline { margin-top: 25px; }.timeline-item { min-height: 72px; padding: 0 0 17px; display: flex; gap: 13px; position: relative; }.timeline-item:not(:last-child):after { content: ""; width: 1px; position: absolute; top: 31px; bottom: 0; left: 14px; background: #e2ddd4; }.timeline-marker { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; position: relative; z-index: 1; border: 1px solid var(--line); border-radius: 50%; color: #aaa49a; background: var(--white); font-size: .64rem; font-weight: 700; }.timeline-item.is-done .timeline-marker { border-color: #c9e0cd; color: var(--green); background: #eef7ef; }.timeline-item.is-current .timeline-marker { border-color: var(--gold); color: #fff; background: var(--gold); }.timeline-item strong, .timeline-item small { display: block; }.timeline-item strong { margin-top: 3px; font-size: .84rem; }.timeline-item small { margin-top: 4px; color: var(--muted); font-size: .72rem; }
.action-card { background: #191918; color: #f6f4ed; }.action-card .portal-kicker { color: #d6ae72; }.action-card p:not(.portal-kicker):not(.inline-feedback) { max-width: 350px; margin: 22px 0; color: #b4b0a5; font-size: .83rem; }.action-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #4b463c; border-radius: 50%; color: var(--gold); }.outline-button, .solid-button { padding: 11px 15px; border: 1px solid #5c5548; border-radius: 999px; color: #fff; background: transparent; font-size: .76rem; font-weight: 700; cursor: pointer; transition: .2s ease; }.outline-button:hover { border-color: var(--gold); color: var(--dark); background: var(--gold-soft); }.inline-feedback { min-height: 18px; margin: 12px 0 0; color: #c7e3cc; font-size: .72rem; }
.links-card .card-heading { margin-bottom: 10px; }.resource-link { padding: 13px 0; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #eeeae3; }.resource-link:last-child { border-bottom: 0; }.resource-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: #866437; background: var(--gold-soft); font-size: .8rem; }.resource-link strong, .resource-link small { display: block; }.resource-link strong { font-size: .78rem; }.resource-link small { margin-top: 2px; color: var(--muted); font-size: .67rem; }.resource-link b { margin-left: auto; color: #aaa49a; font-weight: 400; }.resource-link:hover b { color: var(--gold); }
.activity-card { margin-top: 16px; }.activity-list { margin-top: 20px; }.activity-item { padding: 13px 0; display: flex; align-items: flex-start; gap: 11px; border-bottom: 1px solid #eeeae3; }.activity-item:last-child { border-bottom: 0; }.activity-dot { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 6px; border-radius: 50%; background: var(--gold); }.activity-item strong, .activity-item small { display: block; }.activity-item strong { font-size: .78rem; }.activity-item small { margin-top: 3px; color: var(--muted); font-size: .69rem; }.activity-item time { margin-left: auto; color: #aaa49a; font-size: .67rem; white-space: nowrap; }
.portal-view { display: none; }.portal-view.is-visible { display: block; }.admin-grid { margin-top: 35px; display: grid; grid-template-columns: .95fr 1.05fr; gap: 16px; }.admin-form-card label { margin: 19px 0 7px; display: flex; justify-content: space-between; color: #6f6b64; font-size: .73rem; font-weight: 700; }.admin-form-card label:first-of-type { margin-top: 27px; }.admin-form-card select, .admin-form-card input[type="text"], .admin-form-card textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfaf7; outline: 0; }.admin-form-card select:focus, .admin-form-card input:focus, .admin-form-card textarea:focus { border-color: var(--gold); }.admin-form-card input[type="range"] { width: 100%; accent-color: var(--gold); }.admin-form-card textarea { resize: vertical; }.admin-actions { margin-top: 22px; justify-content: flex-start; flex-wrap: wrap; }.solid-button { border-color: var(--dark); color: #fff; background: var(--dark); }.solid-button:hover { background: var(--gold); border-color: var(--gold); }.text-button { border: 0; color: #827d73; background: transparent; font-size: .74rem; cursor: pointer; }.text-button:hover { color: var(--ink); }.preview-mini { margin: 26px 0 30px; padding: 20px; border-radius: 14px; background: #f7f3ea; }.mini-status { display: inline-block; padding: 6px 9px; border-radius: 999px; color: #725937; background: var(--gold-soft); font-size: .65rem; font-weight: 700; }.preview-mini strong { display: block; margin-top: 17px; font-family: "Space Grotesk", sans-serif; font-size: 2.5rem; }.preview-mini .progress-track { margin-top: 10px; }.preview-mini p { margin: 14px 0 0; color: var(--muted); font-size: .77rem; }.admin-principle { padding: 15px 0; display: flex; gap: 16px; border-top: 1px solid #eeeae3; }.admin-principle span { color: var(--gold); font-family: "Space Grotesk", sans-serif; font-size: .72rem; }.admin-principle p { margin: 0; color: #6f6b64; font-size: .78rem; }

@media (max-width: 1000px) { .portal-shell { grid-template-columns: 205px 1fr; }.portal-main { width: min(100% - 44px, 880px); }.portal-grid, .admin-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .portal-shell { display: block; }.portal-sidebar { min-height: 0; padding: 18px 17px; position: static; }.sidebar-label, .client-mini-card { display: none; }.portal-nav { margin-top: 18px; display: flex; gap: 7px; }.portal-nav-button { justify-content: center; padding: 10px 8px; font-size: .73rem; }.sidebar-bottom { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; }.portal-main { width: min(100% - 30px, 620px); padding-top: 15px; }.demo-notice { font-size: .7rem; }.portal-topbar { margin: 27px 0 45px; align-items: flex-start; flex-direction: column; gap: 17px; }.portal-topbar h1 { font-size: 2.8rem; }.project-heading { align-items: flex-start; flex-direction: column; gap: 17px; }.project-heading h2 { font-size: 2.55rem; }.portal-stats { grid-template-columns: 1fr; }.portal-card { padding: 21px; }.progress-meta { align-items: flex-start; flex-direction: column; gap: 3px; }.portal-grid { margin-top: 13px; }.activity-card { margin-top: 13px; } }

/* Authenticated portal */
.is-hidden { display: none !important; }
.portal-auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: radial-gradient(circle at top right, #f4eadb 0, transparent 35%), var(--paper); }
.auth-card { width: min(100%, 470px); padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.92); box-shadow: 0 28px 80px rgba(31, 27, 20, .12); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; font-weight: 700; letter-spacing: -.05em; }
.auth-intro { margin: 64px 0 30px; }.auth-intro h1 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(2.1rem, 6vw, 3.3rem); line-height: .98; letter-spacing: -.06em; }.auth-intro p:last-child { margin: 16px 0 0; color: var(--muted); font-size: .9rem; }
.auth-form, .stack-form { display: grid; gap: 9px; }.auth-form label, .stack-form label { margin-top: 10px; color: #6f6b64; font-size: .73rem; font-weight: 700; }.auth-form input, .stack-form input, .stack-form select, .stack-form textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fbfaf7; outline: 0; }.auth-form input:focus, .stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(182,139,78,.12); }.stack-form textarea { resize: vertical; }.stack-form label span { color: #aaa49a; font-size: .66rem; font-weight: 400; }
.auth-submit { margin-top: 18px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--dark); border-radius: 999px; color: #fff; background: var(--dark); font-weight: 700; cursor: pointer; transition: .2s ease; }.auth-submit:hover { border-color: var(--gold); background: var(--gold); }.auth-submit span { color: var(--gold-soft); font-size: 1.1rem; }.form-feedback { min-height: 19px; margin: 8px 0 0; color: #447454; font-size: .74rem; }.form-feedback.is-error { color: #ad4f40; }.secure-notice { margin: 27px 0 0; color: #9a958b; font-size: .69rem; text-align: center; }.secure-notice a { color: #866437; text-decoration: underline; text-underline-offset: 3px; }
.secure-banner { margin-bottom: 23px; padding: 11px 14px; border: 1px solid #d5e6d7; border-radius: 12px; color: #55735d; background: #f0f8f1; font-size: .76rem; }.secure-banner span { margin-right: 9px; color: var(--green); font-weight: 700; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }.section-heading h2 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.055em; }.section-heading .muted { margin-bottom: 0; }
.logout-button { padding: 0; border: 0; color: #9b968c; background: transparent; font-size: .76rem; text-align: left; cursor: pointer; }.logout-button:hover { color: #fff; }
.projects-stack { margin-top: 34px; display: grid; gap: 16px; }.project-client-card { padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--shadow); }.project-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }.project-card-header h3 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -.05em; }.project-card-header .muted { margin-top: 8px; font-size: .8rem; }.project-progress { margin-top: 24px; padding: 17px; border-radius: 13px; background: #f7f3ea; }.project-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; color: #827b6e; font-size: .74rem; }.project-progress strong { color: var(--ink); font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; }.project-progress .progress-track { margin-top: 10px; }.project-card-footer { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #77736c; font-size: .76rem; }.project-card-footer strong { color: var(--ink); }.empty-state { margin-top: 34px; padding: 55px 25px; border: 1px dashed #d7d0c4; border-radius: 18px; text-align: center; background: rgba(255,255,255,.55); }.empty-icon { width: 38px; height: 38px; margin: 0 auto 17px; display: grid; place-items: center; border-radius: 12px; color: #866437; background: var(--gold-soft); }.empty-state h3 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; }.empty-state p { margin: 9px 0 0; color: var(--muted); font-size: .82rem; }
.project-detail { margin-top: 22px; padding-top: 22px; border-top: 1px solid #eeeae3; }.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }.milestone-list, .update-list { margin: 13px 0 0; padding: 0; list-style: none; }.milestone-row { padding: 11px 0; display: flex; gap: 10px; border-bottom: 1px solid #eeeae3; }.milestone-row > span { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: #aaa49a; font-size: .68rem; }.milestone-row.done > span { color: var(--green); border-color: #c9e0cd; background: #eef7ef; }.milestone-row.current > span { color: #fff; border-color: var(--gold); background: var(--gold); }.milestone-row strong, .milestone-row small { display: block; }.milestone-row strong { font-size: .77rem; }.milestone-row small { margin-top: 2px; color: var(--muted); font-size: .68rem; }.detail-links { margin-top: 12px; }.detail-links .resource-link, .detail-links .file-row { padding: 10px 0; }.file-row { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #eeeae3; font-size: .74rem; }.file-row > span { color: var(--gold); }.file-row small { margin-left: auto; color: #aaa49a; }.updates-section { margin-top: 23px; padding-top: 20px; border-top: 1px solid #eeeae3; }.update-row { padding: 10px 0; display: flex; align-items: flex-start; gap: 10px; border-bottom: 1px solid #eeeae3; }.update-row strong, .update-row p, .update-row small { display: block; }.update-row strong { font-size: .75rem; }.update-row p { margin: 3px 0; font-size: .76rem; }.update-row small { color: #aaa49a; font-size: .66rem; }.client-actions { margin-top: 23px; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 17px; }.comment-form { display: grid; gap: 8px; }.comment-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf7; resize: vertical; }.comment-form .solid-button { justify-self: start; }.client-actions > div:last-child { text-align: right; }.outline-button { border-color: var(--line); color: var(--ink); background: var(--white); }.outline-button:hover { color: #725937; border-color: var(--gold); background: var(--gold-soft); }
.admin-layout { margin-top: 34px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: start; gap: 16px; }.admin-column { display: grid; gap: 16px; }.admin-form-card h3, .admin-projects-card h3, .admin-editor h3 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; letter-spacing: -.04em; }.form-help { margin: 16px 0 0; color: var(--muted); font-size: .76rem; }.admin-form-card .solid-button, .admin-editor .solid-button { margin-top: 12px; justify-self: start; }.admin-project-list { margin-top: 18px; }.admin-project-row { padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #eeeae3; }.admin-project-row:last-child { border-bottom: 0; }.admin-project-row strong, .admin-project-row small { display: block; }.admin-project-row strong { font-size: .8rem; }.admin-project-row small { margin-top: 3px; color: var(--muted); font-size: .68rem; }.editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.editor-grid label { display: flex; justify-content: space-between; }.editor-grid output { color: var(--gold); }.upload-row { margin-top: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }.upload-row input { display: none; }.upload-button { margin: 0 !important; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: #725937 !important; background: var(--gold-soft); cursor: pointer; }.upload-row small { color: #aaa49a; font-size: .67rem; }
@media (max-width: 780px) { .auth-card { padding: 28px 22px; }.detail-grid, .admin-layout { grid-template-columns: 1fr; }.project-card-header, .project-card-footer, .client-actions { align-items: flex-start; flex-direction: column; }.client-actions > div:last-child { text-align: left; }.editor-grid { grid-template-columns: 1fr; } }
.admin-row-actions { display: flex; align-items: center; gap: 8px; }.admin-row-actions button:disabled { color: #c5c0b6; cursor: not-allowed; }
