:root {
  --ink: #16242e;
  --ink-2: #263743;
  --muted: #6f7b82;
  --paper: #f5f3ed;
  --card: #fff;
  --line: #e4e2db;
  --orange: #ef7622;
  --orange-dark: #c8540d;
  --orange-soft: #fff1e6;
  --green: #2e826f;
  --green-soft: #eaf5f1;
  --blue: #3277a8;
  --blue-soft: #e9f2f8;
  --violet: #73579b;
  --danger: #b53c3c;
  --shadow: 0 18px 50px rgba(19, 34, 44, .08);
  --radius: 18px;
  --sidebar: 264px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
body.modal-open { overflow: hidden; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; color: var(--ink); background: #fff; font-weight: 750; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--orange); box-shadow: 0 8px 20px rgba(239,118,34,.2); }
.button-primary:hover { background: var(--orange-dark); }
.button-primary:disabled { cursor: not-allowed; opacity: .48; transform: none; }
.button-soft { border-color: var(--line); background: #fff; }
.button-soft:hover { background: #f7f6f2; }
.button-danger { color: var(--danger); border-color: #f0cccc; background: #fff6f6; }
.button-large { min-height: 52px; padding: 13px 21px; }
.full-width { width: 100%; }
.icon-button, .circle-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.circle-button { color: var(--orange); }
.eyebrow { display: block; color: var(--orange); font-size: 11px; font-weight: 850; letter-spacing: .14em; }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px 12px 12px 4px; color: #fff; background: var(--orange); font: 800 27px/1 Georgia, serif; }
.brand-words { display: flex; flex-direction: column; line-height: 1.1; }
.brand-words strong { font-size: 17px; letter-spacing: -.02em; }
.brand-words small { color: #aab3b9; font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); display: flex; flex-direction: column; padding: 27px 20px 20px; color: #eef3f4; background: #17242d; }
.side-brand { padding: 0 9px 24px; }
.workspace-box { padding: 14px; margin-bottom: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.045); }
.workspace-box small { display: block; color: #8ea0aa; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.workspace-box strong { display: block; margin-top: 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-box select { width: 100%; margin-top: 10px; padding: 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; color: #fff; background: #21323d; }
.side-nav { display: grid; gap: 4px; }
.side-nav a { min-height: 44px; display: flex; align-items: center; gap: 13px; padding: 10px 13px; border-radius: 10px; color: #aebac0; font-size: 13px; font-weight: 650; }
.side-nav a:hover, .side-nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.side-nav a.active { box-shadow: inset 3px 0 var(--orange); }
.side-nav a b { min-width: 20px; margin-left: auto; padding: 2px 6px; border-radius: 99px; color: #fff; background: var(--orange); font-size: 10px; text-align: center; }
.side-bottom { margin-top: auto; }
.support-card { padding: 15px; margin-bottom: 13px; border-radius: 13px; background: rgba(255,255,255,.06); }
.support-card > svg { color: var(--orange); margin-bottom: 8px; }
.support-card strong, .support-card p, .support-card a { display: block; }
.support-card strong { font-size: 13px; }
.support-card p { margin: 4px 0 9px; color: #9babb4; font-size: 11px; }
.support-card a { color: #fff; font-size: 11px; font-weight: 750; }
.profile-card { display: flex; align-items: center; gap: 9px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.profile-card > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--green); font-size: 11px; font-weight: 800; }
.profile-card div { min-width: 0; margin-right: auto; }
.profile-card strong, .profile-card small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-card strong { font-size: 12px; }
.profile-card small { color: #8fa0a9; font-size: 10px; }

.main-shell { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 38px; border-bottom: 1px solid rgba(22,36,46,.08); background: rgba(245,243,237,.94); backdrop-filter: blur(12px); }
.top-context small, .top-context strong { display: block; }
.top-context small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.top-context strong { font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.mobile-brand { display: none; border: 0; background: none; color: var(--ink); }
.mobile-nav { display: none; }
.content-area { width: min(1260px, 100%); margin: 0 auto; padding: 42px 44px 70px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.page-heading h1 { margin: 6px 0 7px; font-family: Georgia, Cambria, serif; font-size: clamp(30px, 3vw, 46px); line-height: 1.08; letter-spacing: -.035em; }
.page-heading p { max-width: 690px; margin: 0; color: var(--muted); }
.heading-action { flex: none; }

.panel, .progress-panel, .stat-grid > article, .stat-grid > a, .project-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 8px 30px rgba(18,35,46,.035); }
.panel { padding: 24px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading > div, .settings-heading { display: flex; align-items: center; gap: 12px; }
.panel-heading small { display: block; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.panel-heading h2, .settings-heading h2 { margin: 2px 0 0; font-family: Georgia, Cambria, serif; font-size: 20px; }
.panel-heading > a { display: flex; align-items: center; gap: 5px; color: var(--orange); font-size: 12px; font-weight: 750; }
.panel-icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 12px; }
.panel-icon.orange { color: var(--orange); background: var(--orange-soft); }
.panel-icon.green { color: var(--green); background: var(--green-soft); }
.panel-icon.blue { color: var(--blue); background: var(--blue-soft); }
.panel-icon.violet { color: var(--violet); background: #f1ecf7; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }
.stat-grid > article, .stat-grid > a { display: flex; align-items: center; gap: 13px; padding: 20px; }
.stat-grid strong, .stat-grid small { display: block; }
.stat-grid strong { font-size: 24px; line-height: 1; }
.stat-grid small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.dashboard-grid, .admin-grid, .settings-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr); gap: 20px; margin-bottom: 20px; }
.admin-grid { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); }
.settings-grid { grid-template-columns: 1fr 1fr; }
.settings-grid .span-2 { grid-column: span 2; }

.progress-panel { display: grid; grid-template-columns: 1fr 1.25fr; gap: 30px; align-items: center; padding: 25px 28px; margin-bottom: 20px; }
.progress-summary { display: flex; align-items: center; gap: 17px; }
.progress-summary > div > small { color: var(--orange); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.progress-summary h2 { margin: 2px 0; font-family: Georgia, Cambria, serif; font-size: 22px; }
.progress-summary p { margin: 0; color: var(--muted); font-size: 12px; }
.progress-ring { --progress: 10; position: relative; width: 88px; aspect-ratio: 1; display: grid; flex: none; place-items: center; border-radius: 50%; background: conic-gradient(var(--orange) calc(var(--progress) * 1%), #ece9e2 0); }
.progress-ring::after { position: absolute; inset: 7px; content: ""; border-radius: inherit; background: #fff; }
.progress-ring b, .progress-ring small { position: relative; z-index: 1; display: block; text-align: center; }
.progress-ring b { font-size: 18px; }
.progress-ring small { color: var(--muted); font-size: 9px; }
.milestones { display: grid; grid-template-columns: repeat(5, 1fr); }
.milestones span { position: relative; color: #9aa3a8; text-align: center; }
.milestones span::before { position: absolute; top: 15px; left: 0; right: 0; z-index: 0; height: 2px; content: ""; background: #ece9e2; }
.milestones span:first-child::before { left: 50%; }
.milestones span:last-child::before { right: 50%; }
.milestones i { position: relative; z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; margin: 0 auto 7px; border: 2px solid #e6e3dc; border-radius: 50%; background: #fff; font-style: normal; font-size: 10px; }
.milestones b { display: block; font-size: 10px; }
.milestones .done, .milestones .current { color: var(--orange); }
.milestones .done i, .milestones .current i { border-color: var(--orange); }
.milestones .done i { color: #fff; background: var(--orange); }

.request-row { display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.request-row:first-of-type { border-top: 0; padding-top: 2px; }
.request-number { color: #b7bdc0; font-family: Georgia, serif; font-size: 21px; }
.request-row h3 { margin: 2px 0 3px; font-size: 14px; }
.request-row p { margin: 0; color: var(--muted); font-size: 12px; }
.request-meta { display: flex; gap: 8px; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.request-meta b { padding: 2px 6px; border-radius: 4px; color: var(--orange-dark); background: var(--orange-soft); }
.timeline article { position: relative; display: flex; gap: 12px; padding: 0 0 18px 3px; }
.timeline article:not(:last-child)::after { position: absolute; top: 28px; bottom: 2px; left: 14px; width: 1px; content: ""; background: var(--line); }
.timeline article > i { z-index: 1; width: 24px; height: 24px; display: grid; place-items: center; flex: none; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.timeline strong { font-size: 12px; }
.timeline p { margin: 2px 0; color: var(--muted); font-size: 11px; }
.timeline small { color: #9aa4aa; font-size: 9px; }
.files-panel { margin-top: 20px; }

.project-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.project-card { padding: 22px; }
.project-card:hover { border-color: #efb387; box-shadow: var(--shadow); transform: translateY(-2px); }
.project-card.archived { opacity: .6; }
.project-card-top { display: flex; align-items: center; justify-content: space-between; }
.project-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 11px; color: #fff; background: var(--green); font-size: 11px; font-weight: 850; }
.project-avatar.large { width: 48px; height: 48px; font-size: 13px; }
.project-card h2 { margin: 20px 0 3px; font: 700 22px/1.2 Georgia, serif; }
.project-card p, .project-card > small { color: var(--muted); font-size: 11px; }
.project-card-progress { margin: 19px 0 14px; }
.project-card-progress span, .mini-progress span { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.project-card-progress span b, .mini-progress span b { color: var(--ink); }
.project-card-progress i, .mini-progress i { display: block; height: 5px; margin-top: 7px; overflow: hidden; border-radius: 9px; background: #ece9e2; }
.project-card-progress i b, .mini-progress i b { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.project-list > a { display: grid; grid-template-columns: auto 1fr 130px 70px auto; align-items: center; gap: 13px; padding: 15px 0; border-top: 1px solid var(--line); }
.project-list > a:first-child { border-top: 0; padding-top: 0; }
.project-list strong, .project-list small { display: block; }
.project-list strong { font-size: 13px; }
.project-list small, .project-list em { color: var(--muted); font-size: 10px; font-style: normal; }

.request-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.request-card { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.request-card-top { display: flex; align-items: center; justify-content: space-between; }
.request-category { display: block; margin-top: 17px; color: var(--green); font-size: 9px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.request-card h2 { margin: 5px 0 7px; font: 700 22px/1.2 Georgia, serif; }
.request-card > p { min-height: 44px; margin: 0; color: var(--muted); font-size: 12px; }
.request-actions, .admin-inline, .account-controls, .filter-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.admin-inline { align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.admin-inline select { min-height: 42px; flex: 1; }
.inline-text-form { padding-top: 18px; }

.file-table { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.file-row { display: grid; grid-template-columns: 48px minmax(160px, 1fr) 110px 100px 42px; gap: 13px; align-items: center; min-height: 70px; padding: 10px 14px; border-top: 1px solid var(--line); background: #fff; }
.file-row:first-child { border-top: 0; }
.file-type { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 9px; font-weight: 850; }
.file-name strong, .file-name small { display: block; }
.file-name strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.file-name small, .file-date { color: var(--muted); font-size: 10px; }
.file-admin-list { margin-top: 18px; }
.file-admin-list form { display: grid; grid-template-columns: minmax(0,1fr) 180px auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.file-admin-list strong, .file-admin-list small { display: block; }
.file-admin-list small { color: var(--muted); font-size: 10px; }
.filter-row { margin: 0 0 15px; }
.filter-row button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 750; cursor: pointer; }
.filter-row button.active { color: #fff; border-color: var(--ink); background: var(--ink); }
.filter-row button b { margin-left: 3px; }

.status { display: inline-flex; width: max-content; align-items: center; justify-content: center; padding: 5px 9px; border-radius: 99px; color: #6f7477; background: #eeece7; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.status-new, .status-needed, .status-sent, .status-content { color: var(--orange-dark); background: var(--orange-soft); }
.status-approved, .status-complete, .status-in-use, .status-received { color: var(--green); background: var(--green-soft); }
.status-review, .status-reviewed, .status-build { color: var(--blue); background: var(--blue-soft); }
.status-failed, .status-changes-requested { color: var(--danger); background: #fff0f0; }
.status-skipped, .status-not-needed, .status-archived { color: #777; background: #efefed; }

.activity-feed > a, .activity-list article { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.activity-feed > a:first-child, .activity-list article:first-child { border-top: 0; padding-top: 0; }
.activity-feed div, .activity-list div { min-width: 0; flex: 1; }
.activity-feed strong, .activity-feed p, .activity-feed small, .activity-list strong, .activity-list p, .activity-list small { display: block; }
.activity-feed strong, .activity-list strong { font-size: 12px; }
.activity-feed p, .activity-list p { margin: 2px 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.activity-feed small, .activity-list small { color: #9aa4aa; font-size: 9px; }
.activity-list .unread { margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-left: 3px solid var(--orange); background: #fffaf6; }
.panel-footer-link { display: flex; justify-content: center; gap: 6px; align-items: center; margin: 10px -24px -24px; padding: 14px; border-top: 1px solid var(--line); color: var(--orange); font-size: 11px; font-weight: 750; }
.email-strip { display: flex; align-items: center; gap: 15px; padding: 18px 22px; border: 1px solid #dce7e2; border-radius: var(--radius); color: var(--ink); background: var(--green-soft); }
.email-strip > span { color: var(--green); }
.email-strip div { flex: 1; }
.email-strip strong { font-size: 13px; }
.email-strip p { margin: 2px 0 0; color: #54756b; font-size: 11px; }

.message-panel { padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.message-header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.message-header > div { display: flex; align-items: center; gap: 11px; flex: 1; }
.message-header > div > div { flex: 1; }
.message-header strong, .message-header small { display: block; }
.message-header small { color: var(--muted); font-size: 10px; }
.online { color: var(--green); font-size: 10px; font-weight: 750; }
.message-thread { max-height: 540px; min-height: 280px; overflow-y: auto; padding: 24px; background: #faf9f6; }
.message { max-width: 72%; margin-bottom: 16px; }
.message > div { padding: 11px 14px; border: 1px solid var(--line); border-radius: 5px 15px 15px 15px; background: #fff; }
.message p { margin: 0; white-space: pre-wrap; }
.message small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.message.outgoing { margin-left: auto; text-align: right; }
.message.outgoing > p { padding: 11px 14px; border-radius: 15px 5px 15px 15px; color: #fff; background: var(--green); text-align: left; }
.message.outgoing small { color: #79958c; }
.message.incoming > p { padding: 11px 14px; border: 1px solid var(--line); border-radius: 5px 15px 15px 15px; background: #fff; }
.message-compose { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--line); background: #fff; }
.message-compose .field { flex: 1; }
.message-compose textarea { min-height: 48px; max-height: 130px; resize: vertical; flex: 1; }

.create-panel { margin-top: 20px; }
.panel-form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.span-2 { grid-column: span 2; }
.field { display: grid; gap: 7px; color: var(--ink); font-size: 11px; font-weight: 750; }
.field span em { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea, .admin-inline select, .message-compose textarea { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid #d9d9d3; border-radius: 9px; color: var(--ink); outline: none; background: #fff; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .message-compose textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,118,34,.12); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 58px; }
.password-wrap button { position: absolute; top: 50%; right: 8px; border: 0; color: var(--orange-dark); background: transparent; font-size: 10px; font-weight: 800; transform: translateY(-50%); cursor: pointer; }
.check-field { display: flex; align-items: start; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f6; cursor: pointer; }
.check-field input { width: 18px; height: 18px; accent-color: var(--orange); }
.check-field span { flex: 1; }
.check-field strong, .check-field small { display: block; }
.check-field strong { font-size: 12px; }
.check-field small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.settings-panel form { display: grid; gap: 15px; margin-top: 21px; }
.settings-heading p { margin: 1px 0 0; color: var(--muted); font-size: 11px; }
.security-list { display: grid; gap: 13px; margin-top: 22px; }
.security-list > div { display: flex; gap: 10px; }
.security-list svg { color: var(--green); }
.security-list strong, .security-list small { display: block; }
.security-list strong { font-size: 12px; }
.security-list small { color: var(--muted); font-size: 10px; }
.test-email-form { padding-top: 15px; border-top: 1px solid var(--line); }
.email-log > div { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.email-log > div:first-child { border-top: 0; }
.email-log small { grid-column: 2; color: var(--muted); font-size: 10px; }

.account-table { padding: 0 20px; overflow-x: auto; }
.account-row { min-width: 760px; display: grid; grid-template-columns: 1.2fr 1fr 90px 1fr; gap: 18px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); }
.account-row:first-child { border-top: 0; }
.account-header { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.account-person { display: flex; align-items: center; gap: 11px; }
.account-person > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--green); font-size: 10px; font-weight: 800; }
.account-person strong, .account-person small, .account-row > div > strong, .account-row > div > small { display: block; }
.account-person small, .account-row > div > small { color: var(--muted); font-size: 10px; }
.account-controls { margin: 0; }

.alert { padding: 13px 16px; margin: 0 0 18px; border: 1px solid #d7e5df; border-radius: 11px; color: #235f52; background: var(--green-soft); font-size: 12px; }
.alert-error { color: #853333; border-color: #efd0d0; background: #fff2f2; }
.empty-state { margin: 30px 0; color: var(--muted); text-align: center; font-size: 12px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(10,22,29,.72); backdrop-filter: blur(6px); }
.upload-modal, .small-modal { position: relative; width: min(690px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 31px; border-radius: 20px; background: #fff; box-shadow: 0 35px 100px rgba(0,0,0,.3); }
.small-modal { width: min(480px, 100%); }
.modal-close { position: absolute; top: 15px; right: 15px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--muted); background: #f2f1ed; font-size: 24px; cursor: pointer; }
.modal-icon, .login-lock { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 17px; border-radius: 14px; color: var(--orange); background: var(--orange-soft); }
.upload-modal h2, .small-modal h2 { margin: 6px 0 5px; font: 700 27px/1.2 Georgia, serif; }
.upload-modal > p { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.mobile-upload-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload-choice { min-height: 112px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 16px; border: 2px dashed #d9d7d0; border-radius: 13px; color: var(--ink); background: #faf9f6; text-align: center; cursor: pointer; }
.upload-choice.primary { border-color: #f2b98f; color: var(--orange-dark); background: var(--orange-soft); }
.upload-choice strong { margin-top: 8px; font-size: 13px; }
.upload-choice small { color: var(--muted); font-size: 10px; }
.upload-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.selected-files { margin: 12px 0 17px; }
.selected-files > p { margin: 0; color: var(--muted); font-size: 10px; text-align: center; }
.selected-files > div { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.selected-files > div span { width: 39px; height: 34px; display: grid; place-items: center; border-radius: 7px; color: var(--blue); background: var(--blue-soft); font-size: 8px; font-weight: 850; }
.selected-files strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.selected-files small { color: var(--muted); font-size: 9px; }
.upload-info { display: flex; gap: 9px; padding: 11px; margin-top: 16px; border-radius: 10px; color: var(--green); background: var(--green-soft); }
.upload-info strong, .upload-info small { display: block; }
.upload-info strong { font-size: 11px; }
.upload-info small { font-size: 9px; }
.modal-actions { display: flex; justify-content: end; gap: 10px; margin-top: 20px; }
.upload-progress { margin-top: 15px; }
.upload-progress > span { display: block; height: 8px; overflow: hidden; border-radius: 9px; background: #ece9e2; }
.upload-progress i { display: block; width: 0; height: 100%; background: var(--orange); transition: width .2s; }
.upload-progress strong { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.upload-errors p { padding: 9px; margin: 10px 0 0; border-radius: 8px; color: var(--danger); background: #fff0f0; font-size: 10px; }
.upload-complete { padding: 28px 10px; text-align: center; }
.upload-complete > span { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 50%; color: #fff; background: var(--green); }
.text-preview > div { max-height: 50vh; overflow-y: auto; padding: 15px; margin-top: 15px; border-radius: 10px; background: #f7f6f2; font-size: 13px; }

.login-page, .installer-page { min-height: 100vh; background: #17242d; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); align-items: center; gap: 9vw; width: min(1180px, calc(100% - 48px)); margin: auto; padding: 60px 0; }
.login-message { color: #fff; }
.login-brand { display: inline-block; margin-bottom: 80px; }
.login-message h1 { max-width: 650px; margin: 13px 0 20px; font: 700 clamp(42px, 6vw, 76px)/.98 Georgia, serif; letter-spacing: -.045em; }
.login-message > p { max-width: 590px; color: #b6c1c6; font-size: 17px; }
.login-benefits { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 35px; color: #d4dddf; font-size: 12px; }
.login-benefits span { display: flex; gap: 7px; align-items: center; }
.login-benefits svg { color: var(--orange); }
.login-card { padding: 40px; border-radius: 23px; background: #fff; box-shadow: 0 35px 100px rgba(0,0,0,.25); }
.login-card h2 { margin: 7px 0 4px; font: 700 32px/1.2 Georgia, serif; }
.login-card > p { margin: 0 0 23px; color: var(--muted); font-size: 12px; }
.login-card form { display: grid; gap: 15px; }
.login-help { display: block; margin-top: 18px; color: var(--muted); text-align: center; }

.installer-shell { width: min(880px, calc(100% - 32px)); margin: auto; padding: 38px 0 80px; }
.installer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 55px; color: #fff; }
.installer-brand > span { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 12px 12px 12px 4px; background: var(--orange); font: 800 28px Georgia, serif; }
.installer-brand strong, .installer-brand small { display: block; }
.installer-brand small { color: #91a2ab; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.installer-intro { color: #fff; }
.installer-intro h1 { margin: 9px 0; font: 700 clamp(36px, 6vw, 57px)/1.03 Georgia, serif; letter-spacing: -.04em; }
.installer-intro p { max-width: 690px; color: #b6c1c6; }
.requirements { display: flex; flex-wrap: wrap; gap: 7px; margin: 25px 0; }
.requirements span { padding: 6px 9px; border-radius: 7px; color: #b9d9d0; background: rgba(46,130,111,.2); font-size: 10px; font-weight: 700; }
.requirements .failed { color: #ffc6c6; background: rgba(181,60,60,.22); }
.install-form { display: grid; gap: 18px; }
.install-card { padding: 28px; border-radius: 19px; background: #fff; }
.install-card.compact { max-width: 600px; margin: 12vh auto 0; text-align: center; }
.install-step { display: flex; gap: 14px; align-items: start; margin-bottom: 23px; }
.install-step > span { width: 37px; height: 37px; display: grid; place-items: center; flex: none; border-radius: 11px; color: #fff; background: var(--orange); font-weight: 850; }
.install-step h2 { margin: 0; font: 700 23px Georgia, serif; }
.install-step p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.install-submit { padding: 12px 0; color: #fff; text-align: right; }
.install-submit p { color: #aebac0; font-size: 11px; }
.success-icon { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; color: #fff; background: var(--green); font-size: 31px; }

@media (max-width: 1060px) {
  .project-cards { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .progress-panel { grid-template-columns: 1fr; }
  .admin-grid, .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  input, select, textarea { font-size: 16px !important; }
  .sidebar { width: min(310px, 86vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 15px 0 45px rgba(0,0,0,.2); }
  .menu-open .sidebar { transform: translateX(0); }
  .menu-open::after { position: fixed; inset: 0; z-index: 25; content: ""; background: rgba(9,20,27,.52); }
  .main-shell { margin-left: 0; }
  .topbar { height: 66px; padding: 0 15px; }
  .mobile-brand { display: block; padding: 0; cursor: pointer; }
  .mobile-brand .brand-words { display: none; }
  .mobile-brand .brand-mark { width: 36px; height: 36px; }
  .top-context { display: none; }
  .top-actions .button span { display: none; }
  .top-actions .button { width: 44px; padding: 0; border-radius: 50%; }
  .content-area { padding: 27px 15px 30px; }
  .page-heading { display: block; margin-bottom: 22px; }
  .page-heading h1 { font-size: 33px; }
  .page-heading p { font-size: 13px; }
  .heading-action { width: 100%; margin-top: 17px; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 40; height: calc(64px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px 4px env(safe-area-inset-bottom); border-top: 1px solid #dcdad3; background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #7b858b; font-size: 9px; font-weight: 700; }
  .mobile-nav a.active { color: var(--orange); }
  .panel { padding: 19px 16px; }
  .panel-heading { align-items: start; }
  .panel-heading > a { text-align: right; }
  .progress-panel { padding: 20px 15px; gap: 23px; }
  .progress-summary { align-items: start; }
  .progress-ring { width: 76px; }
  .milestones b { font-size: 8px; }
  .milestones i { width: 28px; height: 28px; }
  .stat-grid { gap: 10px; }
  .stat-grid > article, .stat-grid > a { padding: 14px; }
  .stat-grid strong { font-size: 20px; }
  .settings-grid, .request-board, .project-cards { grid-template-columns: 1fr; }
  .settings-grid .span-2 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .project-list > a { grid-template-columns: auto 1fr auto; }
  .project-list .mini-progress, .project-list em { display: none; }
  .request-card > p { min-height: 0; }
  .file-table { border: 0; overflow: visible; }
  .file-row { grid-template-columns: 45px minmax(0, 1fr) auto; gap: 10px; margin-bottom: 9px; padding: 12px; border: 1px solid var(--line) !important; border-radius: 12px; }
  .file-date { display: none; }
  .file-row .status { grid-column: 2; }
  .file-row .icon-button { grid-column: 3; grid-row: 1 / span 2; }
  .file-admin-list form { grid-template-columns: minmax(0,1fr) auto; }
  .file-admin-list form .button { grid-column: 2; }
  .activity-list article { align-items: start; }
  .activity-list .button { padding: 8px 10px; font-size: 10px; }
  .email-strip { align-items: start; flex-wrap: wrap; }
  .email-strip .button { width: 100%; }
  .message { max-width: 88%; }
  .message-compose { align-items: end; }
  .message-compose .button { min-width: 72px; }
  .account-table { padding: 0 13px; }
  .upload-modal { align-self: end; width: calc(100% + 36px); max-height: calc(94vh - env(safe-area-inset-bottom)); margin: -18px; padding: 25px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .small-modal { padding: 25px 19px; }
  .mobile-upload-choices { gap: 9px; }
  .upload-choice { min-height: 120px; padding: 12px 7px; }
  .modal-actions .button { min-height: 50px; flex: 1; }
  .login-shell { grid-template-columns: 1fr; width: min(100% - 30px, 500px); padding: 28px 0; }
  .login-message { padding: 8px 7px 0; }
  .login-brand { margin-bottom: 40px; }
  .login-message h1 { font-size: 43px; }
  .login-message > p { font-size: 14px; }
  .login-benefits { margin: 24px 0 8px; }
  .login-card { padding: 27px 20px; border-radius: 19px; }
  .installer-shell { width: min(100% - 24px, 880px); padding-top: 22px; }
  .installer-brand { margin-bottom: 36px; }
  .install-card { padding: 22px 16px; }
  .install-submit .button { width: 100%; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid .panel-icon { width: 35px; height: 35px; }
  .stat-grid > article, .stat-grid > a { gap: 8px; }
  .request-actions .button { flex: 1; }
  .milestones b { max-width: 55px; margin: auto; overflow: hidden; text-overflow: ellipsis; }
  .login-message h1 { font-size: 39px; }
  .login-benefits { display: grid; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
