:root {
    color-scheme: light;
    --ink: #1d2733;
    --muted: #6d7884;
    --line: #e4e8ec;
    --surface: #ffffff;
    --canvas: #f5f7f8;
    --navy: #34444b;
    --blue: #606870;
    --teal: #6b848d;
    --shadow: 0 8px 28px rgba(27, 44, 60, .045);
    --button-muted: #eef3f4;
    --button-muted-hover: #e3ebed;
    --button-border: #d5e0e4;
    --button-text: #425762;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; flex: 0 0 248px; padding: 24px 15px 18px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; min-height: 47px; padding: 0 10px; color: var(--navy); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 0; color: #fff; background: transparent; font-weight: 700; font-size: 19px; }
.brand-symbol { width: 100%; height: 100%; padding: 3px; object-fit: contain; }
.brand-name { font-size: 12px; font-weight: 700; line-height: 1.25; letter-spacing: -.15px; white-space: nowrap; }
.brand-name small { display: block; margin-top: 3px; color: #85909a; font-size: 7px; font-weight: 650; letter-spacing: .3px; line-height: 1.35; text-transform: uppercase; white-space: nowrap; }
.nav-caption { margin: 36px 12px 11px; color: #98a1a9; font-size: 10px; font-weight: 700; letter-spacing: 1.05px; text-transform: uppercase; }
.primary-nav { display: grid; gap: 4px; }
.nav-link { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 8px; color: #64717c; font-size: 13px; font-weight: 550; transition: background .15s ease, color .15s ease; }
.nav-link:hover { background: #f4f7f8; color: var(--navy); }
.nav-link.is-active { background: #edf1f2; color: #526a74; font-weight: 650; }
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; color: #7d8a95; }
.nav-icon svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-link.is-active .nav-icon { color: #607780; }
.sidebar-bottom { display: flex; align-items: center; gap: 9px; margin: auto 8px 0; padding: 15px 9px 2px; border-top: 1px solid #edf0f2; color: #818d97; font-size: 11px; }
.preview-dot, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #c29b50; }
.main-column { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.8); }
.topbar-label { color: #7c8791; font-size: 12px; font-weight: 550; }
.topbar-label span { padding: 0 8px; color: #bdc4ca; }
.topbar-status { display: flex; align-items: center; gap: 8px; color: #79858e; font-size: 11px; }
.status-dot { width: 6px; height: 6px; background: var(--teal); }
.page-content { width: min(100%, 1500px); margin: 0 auto; padding: 35px 32px 48px; flex: 1; }
.page-footer { padding: 14px 42px 20px; color: #9aa3aa; font-size: 10px; }
.page-footer span { padding: 0 5px; }
.welcome-card { min-height: 235px; position: relative; overflow: hidden; display: flex; align-items: center; padding: 38px 42px; border: 1px solid #dbe4e9; border-radius: 12px; background: linear-gradient(112deg, #fdfefe 0%, #f1f6f7 100%); box-shadow: var(--shadow); }
.welcome-copy { z-index: 1; max-width: 575px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 10px; font-weight: 750; letter-spacing: 1.05px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; color: #20354c; font-size: clamp(25px, 3vw, 34px); line-height: 1.18; letter-spacing: -1.05px; }
.welcome-description { max-width: 470px; margin-bottom: 22px; color: #687681; font-size: 14px; }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 15px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 650; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
.button-primary { color: #fff; background: #606870; box-shadow: 0 3px 8px rgba(52,68,75,.12); }
.button-primary:hover { background: #4f5960; }
.button-secondary { border-color: var(--button-border); color: var(--button-text); background: var(--button-muted); }
.button-secondary:hover { border-color: #c6d4d9; background: var(--button-muted-hover); }
.welcome-art { width: 300px; height: 220px; position: absolute; right: 56px; top: 7px; opacity: .85; }
.art-square { position: absolute; width: 126px; height: 126px; border: 1px solid rgba(82,106,116,.17); border-radius: 18px; transform: rotate(24deg); }
.art-square-back { top: 38px; right: 62px; background: rgba(107,132,141,.1); }
.art-square-front { top: 55px; right: 103px; display: grid; align-content: center; gap: 10px; padding: 21px; background: rgba(255,255,255,.84); box-shadow: 0 16px 32px rgba(40,80,99,.09); }
.art-square-front span { width: 63px; height: 7px; border-radius: 8px; background: #8fa2a8; }
.art-square-front span:nth-child(2) { width: 48px; background: #b7c3c7; }
.art-square-front span:nth-child(3) { width: 55px; background: #d5dcde; }
.art-line { position: absolute; height: 1px; width: 112px; background: rgba(82,106,116,.22); transform: rotate(-36deg); }
.art-line-one { top: 50px; right: 0; }
.art-line-two { bottom: 38px; right: 6px; width: 78px; transform: rotate(29deg); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 33px 0 15px; }
.section-heading h2, .panel-heading h2 { margin: 0; color: #263746; font-size: 17px; letter-spacing: -.25px; }
.muted-label { padding-bottom: 2px; color: #9aa3aa; font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.overview-card, .panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.overview-card { padding: 18px 20px 17px; }
.card-topline { display: flex; align-items: center; justify-content: space-between; }
.card-icon, .shortcut-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; font-size: 12px; font-weight: 700; }
.icon-blue { color: #607780; background: #edf1f2; }
.icon-amber { color: #a47c36; background: #faf2df; }
.icon-green { color: #498475; background: #e7f3ee; }
.card-trend { color: #9aa3aa; font-size: 10px; }
.card-label { margin: 14px 0 0; color: #53616d; font-size: 12px; font-weight: 600; }
.card-value { margin: 1px 0 0; color: #263c50; font-size: 25px; font-weight: 650; letter-spacing: -.8px; }
.card-note { margin: 2px 0 0; color: #9aa3aa; font-size: 10px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 14px; margin-top: 15px; }
.project-content-grid + .panel { margin-top: 16px; }
.panel { min-width: 0; padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.text-link { color: #607780; font-size: 11px; font-weight: 650; }
.text-link span { padding-left: 4px; }
.empty-state { min-height: 198px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 12px; text-align: center; }
.empty-illustration { width: 54px; height: 43px; position: relative; margin-bottom: 15px; }
.empty-illustration span { position: absolute; width: 32px; height: 27px; border: 1px solid #cad7dc; border-radius: 5px; background: #f5f8f9; transform: skewY(-12deg); }
.empty-illustration span:nth-child(1) { left: 3px; top: 9px; }
.empty-illustration span:nth-child(2) { left: 11px; top: 5px; background: #eaf1f3; }
.empty-illustration span:nth-child(3) { left: 19px; top: 1px; background: #fff; }
.empty-state h3, .empty-state h2 { margin: 0 0 6px; color: #344858; font-size: 13px; font-weight: 650; }
.empty-state p { max-width: 390px; margin: 0; color: #8b969e; font-size: 11px; }
.quick-panel { padding-bottom: 9px; }
.quick-panel .panel-heading { margin-bottom: 8px; }
.shortcut-row { min-height: 57px; display: flex; align-items: center; gap: 11px; border-top: 1px solid #eef1f3; }
.shortcut-icon { width: 29px; height: 29px; flex: 0 0 29px; color: #647d8f; background: #f0f4f6; font-size: 10px; }
.shortcut-row strong, .shortcut-row small { display: block; }
.shortcut-row strong { color: #465966; font-size: 11px; font-weight: 650; }
.shortcut-row small { margin-top: 1px; color: #99a2a9; font-size: 9px; }
.row-arrow { margin-left: auto; color: #a1abb2; font-size: 14px; }
.shortcut-row:hover strong, .shortcut-row:hover .row-arrow { color: #526a74; }
.section-hero { min-height: 135px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 25px 30px; border: 1px solid #dfe7eb; border-radius: 11px; background: linear-gradient(112deg, #fff, #f1f6f7); }
.section-hero h1 { margin-bottom: 7px; font-size: 27px; }
.section-hero p:last-child { margin: 0; color: #6f7d87; font-size: 12px; }
.section-count { max-width: 100%; padding: 9px 13px; border: 1px solid #e3e9ec; border-radius: 20px; color: #526571; background: rgba(255,255,255,.75); font-size: 12px; font-weight: 600; line-height: 1.35; text-align: center; white-space: normal; }
.section-panel { min-height: 350px; display: grid; place-items: center; }
.compact-empty { min-height: 290px; }
.compact-empty h2 { font-size: 15px; }
.compact-empty .button { margin-top: 19px; }
@media (max-width: 1000px) {
    .sidebar { width: 220px; flex-basis: 220px; }
    .topbar { padding: 0 28px; }
    .page-content { padding: 28px 28px 38px; }
    .welcome-art { right: 10px; opacity: .55; }
    .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .app-shell { display: block; }
    .sidebar { width: 100%; padding: 12px 14px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
    .brand { min-height: 39px; }
    .brand-mark { width: 30px; height: 30px; }
    .nav-caption, .sidebar-bottom { display: none; }
    .primary-nav { display: flex; gap: 3px; margin-top: 13px; overflow-x: auto; padding-bottom: 2px; }
    .nav-link { min-width: max-content; min-height: 34px; gap: 7px; padding: 0 9px; font-size: 11px; }
    .nav-icon { width: 16px; height: 16px; }
    .nav-icon svg { width: 15px; height: 15px; }
    .topbar { height: 48px; padding: 0 18px; }
    .topbar-status { font-size: 10px; }
    .page-content { padding: 19px 16px 28px; }
    .page-footer { padding: 10px 18px 16px; }
    .welcome-card { min-height: 219px; padding: 25px 23px; }
    .welcome-copy { max-width: 100%; }
    .welcome-description { max-width: 330px; font-size: 12px; }
    .welcome-art { right: -95px; opacity: .22; }
    .section-heading { align-items: start; flex-direction: column; gap: 5px; margin-top: 25px; }
    .overview-grid { grid-template-columns: 1fr; gap: 9px; }
    .overview-card { padding: 14px 16px; }
    .card-label { margin-top: 9px; }
    .card-value { font-size: 21px; }
    .panel { padding: 16px; }
    .section-hero { align-items: start; flex-direction: column; padding: 21px; }
    .section-count { display: none; }
}.account-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f3f6f7; }
.account-card { width: min(100%, 410px); padding: 34px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.account-brand { margin-bottom: 32px; }
.account-card h1 { margin: 0; color: #263c50; font-size: 25px; letter-spacing: -.5px; }
.account-intro, .account-message p { margin: 7px 0 24px; color: #75828b; font-size: 13px; }
.form-field { display: grid; gap: 7px; margin: 16px 0; }
.form-field label { color: #465966; font-size: 12px; font-weight: 600; }
.form-field input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #dce4e8; border-radius: 7px; color: #344858; background: #fff; font: inherit; }
.form-field input:focus { outline: 2px solid #ccd9de; border-color: #80939b; }
.remember-option { display: flex; align-items: center; gap: 8px; margin: 15px 0 20px; color: #64737c; font-size: 12px; }
.account-submit { width: 100%; min-height: 42px; border: 0; border-radius: 7px; color: #fff; background: #5d6b72; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.account-submit:hover { background: #4d5b62; }
.validation-summary, .field-error { color: #a33d3d; font-size: 12px; }
.validation-summary ul { margin: 0 0 14px; padding-left: 18px; }
.account-message { text-align: center; }
.account-message .brand-mark { margin: 0 auto 18px; }
.account-message p { line-height: 1.6; }
.account-button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.topbar-account { display: flex; align-items: center; gap: 15px; }
.signed-in-name { max-width: 250px; overflow: hidden; color: #79858e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-account form { margin: 0; }
.sign-out-button { padding: 6px 10px; border: 1px solid var(--button-border); border-radius: 6px; color: var(--button-text); background: var(--button-muted); font: inherit; font-size: 11px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.sign-out-button:hover { border-color: #c6d4d9; background: var(--button-muted-hover); }
.nav-admin-caption { margin-top: 24px; }
.setup-link { display: inline-flex; margin-left: 14px; }
.table-panel { margin-bottom: 16px; }
.form-panel { margin-top: 16px; }
.user-list-panel { margin-top: 16px; }
.table-wrap { width: 100%; overflow-x: auto; margin-top: 16px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid #e9edef; color: #8a969e; font-size: 10px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid #eff2f3; color: #5d6d77; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td strong, .data-table td small { display: block; }
.data-table td strong { color: #354a59; font-weight: 650; }
.data-table td small { margin-top: 2px; color: #8d989f; font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin-top: 15px; }
.form-stack { display: grid; gap: 3px; margin-top: 14px; }
.form-field select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #dce4e8; border-radius: 7px; color: #344858; background: #fff; font: inherit; }
.form-field select:focus { outline: 2px solid #ccd9de; border-color: #80939b; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; grid-column: 1 / -1; margin-top: 8px; }
.small-note { color: #87939a; font-size: 10px; }
.notice { margin: 0 0 14px; padding: 11px 14px; border: 1px solid; border-radius: 8px; font-size: 12px; }
.notice ul { margin: 0; padding-left: 17px; }
.notice-success { border-color: #d3e9df; color: #39715e; background: #f2faf6; }
.notice-error { border-color: #f0d9d6; color: #974b43; background: #fff7f6; }
.status-pill { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 20px; color: #63717a; background: #eef2f3; font-size: 10px; font-weight: 650; white-space: nowrap; }
.status-active, .status-completed { color: #39715e; background: #eaf5ef; }
.status-onhold, .status-dead { color: #966d32; background: #faf2e0; }
.status-inactive { color: #934b44; background: #fbefed; }
.row-actions, .row-actions form { display: flex; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.row-actions { min-height: 30px; }
.company-view-tabs { align-self: flex-start; margin-top: 11px; }
.row-actions select { max-width: 140px; min-height: 30px; padding: 0 6px; border: 1px solid #dfe6e9; border-radius: 5px; color: #52636e; background: #fff; font: inherit; font-size: 10px; }
.mini-button { min-height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--button-border); border-radius: 6px; color: var(--button-text); background: var(--button-muted); font: inherit; font-size: 10px; font-weight: 600; line-height: 1; vertical-align: middle; cursor: pointer; white-space: nowrap; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.mini-button:hover { border-color: #c6d4d9; background: var(--button-muted-hover); }
.mini-button.is-selected { border-color: #bccdd2; color: #354d59; background: #e3ecee; box-shadow: inset 0 0 0 1px rgba(92, 120, 130, .06); }
.company-view-tabs .company-filter-active { border-color: #c8dfcd; color: #436c50; background: #edf6ef; }
.company-view-tabs .company-filter-active:hover { border-color: #b4d2bc; background: #e4f1e7; }
.company-view-tabs .company-filter-active.is-selected { border-color: #a8cbb0; color: #315e3e; background: #dceee0; box-shadow: inset 0 0 0 1px rgba(62, 112, 76, .08); }
.company-view-tabs .company-filter-archive { border-color: #ecd5b5; color: #8a6337; background: #fff5e9; }
.company-view-tabs .company-filter-archive:hover { border-color: #e2c69e; background: #fdf0de; }
.company-view-tabs .company-filter-archive.is-selected { border-color: #daba8e; color: #795327; background: #f8e8d0; box-shadow: inset 0 0 0 1px rgba(146, 101, 46, .08); }
.button:focus-visible, .mini-button:focus-visible, .sign-out-button:focus-visible, .sortable-header-button:focus-visible { outline: 2px solid #9bb2bb; outline-offset: 2px; }
.project-facts { margin-bottom: 16px; }
.card-date { font-size: 18px; letter-spacing: -.3px; }
.project-content-grid { align-items: start; }
.panel-divider { height: 1px; margin: 22px 0; border: 0; background: #edf0f2; }
.subheading { margin: 0; color: #344858; font-size: 13px; }
.simple-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.simple-list li { padding: 12px; border: 1px solid #edf0f2; border-radius: 7px; color: #4d606d; font-weight: 600; }
.covenant-swal-confirm, .covenant-swal-cancel { min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.covenant-swal-confirm { margin-left: 8px; color: #fff; background: #606870; }
.covenant-swal-confirm:hover { background: #4f5960; }
.covenant-swal-cancel { color: var(--button-text); background: var(--button-muted); border-color: var(--button-border); }
.covenant-swal-cancel:hover { background: var(--button-muted-hover); }
@media (max-width: 700px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-actions { align-items: flex-start; flex-direction: column; }
    .data-table { min-width: 640px; }
    .row-actions { align-items: flex-start; flex-direction: column; }
    .nav-admin-caption { display: none; }
}






.sortable-header-button { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.sortable-header-button::after { content: " ↕"; color: #aeb8bd; font-size: 10px; }
th[aria-sort="ascending"] .sortable-header-button::after { content: " ↑"; color: #536671; }
th[aria-sort="descending"] .sortable-header-button::after { content: " ↓"; color: #536671; }
.form-field-wide { grid-column: 1 / -1; }
.form-field select[multiple] { height: auto; padding: 8px; }
.form-field textarea { width: 100%; min-height: 74px; padding: 10px 11px; border: 1px solid #dce4e8; border-radius: 7px; color: #344858; background: #fff; font: inherit; resize: vertical; }
.form-field textarea:focus { outline: 2px solid #ccd9de; border-color: #80939b; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline-form label { color: #52636e; font-size: 12px; font-weight: 600; }
.inline-form select { min-height: 38px; padding: 0 10px; border: 1px solid #dce4e8; border-radius: 7px; color: #344858; background: #fff; font: inherit; }
.status-update-panel { margin-bottom: 16px; }
.future-count { color: #88959c; font-size: 10px; font-style: italic; white-space: nowrap; }
.table-note { margin: 10px 2px 0; }
.multi-select-dropdown { position: relative; }
.form-field-label { color: #465966; font-size: 12px; font-weight: 600; }
.multi-select-dropdown > summary { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; border: 1px solid #d7e0e5; border-radius: 7px; color: #405665; background: #fff; cursor: pointer; list-style: none; }
.multi-select-dropdown > summary::-webkit-details-marker { display: none; }
.multi-select-dropdown > summary::after { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-right: 1.5px solid #637783; border-bottom: 1.5px solid #637783; transform: rotate(45deg) translateY(-2px); }
.multi-select-dropdown[open] > summary { border-color: #aebfc7; border-radius: 7px 7px 0 0; }
.multi-select-count { margin-left: auto; color: #7a8992; font-size: 11px; }
.multi-select-options { position: absolute; z-index: 20; top: calc(100% - 1px); right: 0; left: 0; max-height: 230px; overflow-y: auto; padding: 5px; border: 1px solid #aebfc7; border-radius: 0 0 7px 7px; background: #fff; box-shadow: 0 8px 18px rgba(38, 55, 70, .12); }
.multi-select-options .small-note { margin: 9px; }
.multi-select-option { display: flex; align-items: center; gap: 10px; min-height: 37px; padding: 7px 9px; border-radius: 5px; color: #405665; cursor: pointer; }
.multi-select-option:hover { background: #f3f6f7; }
.form-field .multi-select-option input { width: 16px; min-height: 16px; height: 16px; flex: 0 0 16px; margin: 0; padding: 0; accent-color: #607780; }
.multi-select-option small { color: #87939b; }
