@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@400;500;600;650;700;750;800&display=swap');

:root {
    font-family: 'DM Sans', 'Segoe UI', sans-serif;
    color: #253b36;
    background: #f6f8f7;
    font-synthesis: none;
    --green: #176b54;
    --green-dark: #10553f;
    --muted: #7a8984;
    --line: #e7ede9;
    --red: #c64c45;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #81bda6; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Manrope', 'Segoe UI', sans-serif; }
h1 { color: #193c30; font-size: clamp(27px, 2.5vw, 35px); font-weight: 750; letter-spacing: -1.3px; line-height: 1.2; margin: 7px 0 10px; }
h2 { font-size: 17px; letter-spacing: -.4px; font-weight: 750; margin-bottom: 5px; }
h3 { font-size: 14px; margin-bottom: 12px; }
p { margin-bottom: 16px; }
small { font-size: 12px; }
fieldset { padding: 0; border: 0; margin: 0; min-width: 0; }
code { background: #e9efec; border-radius: 4px; padding: 2px 5px; overflow-wrap: anywhere; }
.app-shell { display: grid; grid-template-columns: 245px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); padding: 34px 20px 18px; display: flex; flex-direction: column; }
.brand { display: flex; gap: 11px; align-items: center; color: #183b30; font: 800 25px/1.1 'Manrope', sans-serif; letter-spacing: -.9px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: var(--green); color: #fff; font-size: 30px; letter-spacing: -3px; padding-right: 3px; }
.brand-dot { color: #3d9e78; }
.brand small { display: block; font: 600 8px/2.4 'DM Sans', sans-serif; color: #8a9c92; letter-spacing: 2.5px; }
.nav-label { font-size: 9px; color: #96a39c; font-weight: 700; letter-spacing: 1.6px; margin: 38px 15px 11px; }
nav > .nav-label { margin-top: 28px; }
nav > a { display: flex; gap: 13px; align-items: center; min-height: 43px; padding: 10px 14px; margin: 4px 0; border-radius: 7px; color: #738079; font-size: 12px; font-weight: 550; }
nav > a:hover { background: #f4f8f5; }
nav > a.active { background: #eaf4ee; color: var(--green); font-weight: 700; }
.nav-icon { display: inline-block; width: 18px; font-size: 19px; text-align: center; line-height: 1; }
.sidebar-note { margin-top: auto; padding: 35px 13px 20px; font-size: 10px; color: #5b7468; }
.sidebar-note p { font-size: 10px; margin: 7px 0 0 12px; color: #9ba79f; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #53a47a; margin-right: 5px; vertical-align: middle; }
.avatar { display: grid; place-items: center; width: 33px; height: 33px; background: #ece9df; border-radius: 50%; color: #817654; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.icon-button { border: 0; background: transparent; font-size: 19px; color: #7b8981; padding: 5px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 76px; padding: 0 40px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #96a098; font-size: 11px; background: #fff; }
.topbar strong { font-weight: 500; color: #57675e; }
.breadcrumb-separator { padding: 0 12px; color: #bdc7bf; }
.account-menu { position: relative; margin-left: auto; }
.account-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; border-radius: 7px; padding: 4px 7px; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary::after { content: ""; width: 6px; height: 6px; border: solid #57675e; border-width: 0 1px 1px 0; transform: rotate(45deg); }
.account-menu summary strong { max-width: min(185px, 36vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.account-menu-items { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; min-width: 162px; background: #fff; padding: 5px; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 20px #0001; }
.account-menu-items a, .account-menu-items button { display: block; width: 100%; padding: 9px 10px; color: #426249; background: transparent; border: 0; border-radius: 5px; text-align: left; font-size: 12px; }
.account-menu-items a:hover, .account-menu-items button:hover { background: #f0f5f0; }
.page-body { width: 100%; max-width: 1600px; margin: 0 auto; padding: 38px 40px 22px; flex: 1; }
.page-heading { display: flex; gap: 20px; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.page-heading p { color: var(--muted); font-size: 12px; margin: 0; }
.eyebrow { color: #7b9183; font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.heading-dot { color: #3e9472; }
.dot-separator { margin: 0 7px; color: #b7c5bb; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 600; border: 1px solid #dce5df; background: #fff; color: #4f6659; min-height: 39px; padding: 9px 15px; border-radius: 7px; line-height: 1.4; transition: background .15s; white-space: nowrap; }
.button:hover { background: #eef4ef; }
.button.primary { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 3px 5px #176b5410; }
.button.primary:hover { background: var(--green-dark); }
.button.small { min-height: 31px; font-size: 11px; padding: 6px 10px; }
.button.danger { color: #b64e43; border-color: #e9ccc6; }
.button.wide { width: 100%; justify-content: space-between; min-height: 45px; }
.text-link, .ref-link { font-size: 11px; font-weight: 700; }
.ref-link { font-variant-numeric: tabular-nums; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 25px; }
.metric { padding: 21px 22px; border: 1px solid var(--line); background: #fff; border-radius: 10px; }
.metric-label { display: flex; align-items: center; justify-content: space-between; font-size: 9px; font-weight: 650; letter-spacing: .9px; color: #84948a; }
.metric-label > span { font-size: 17px; line-height: 1; color: #86a592; }
.metric > strong { display: block; font: 750 35px/1.6 'Manrope', sans-serif; letter-spacing: -1px; color: #203f30; }
.metric > small { color: #97a297; font-size: 10px; }
.metric.alert { background: #fffaf7; border-color: #f0e3da; }
.metric.alert > strong, .metric.alert .metric-label > span { color: #c26c4b; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 24px; min-width: 0; overflow: hidden; }
.panel-heading { padding: 23px 24px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-heading p { color: #95a096; font-size: 11px; margin: 4px 0 0; }
.panel-heading h2 { margin-bottom: 0; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(245px, 1fr); gap: 23px; }
.workload { padding: 12px 24px 17px; }
.workload-label { display: flex; justify-content: space-between; font-size: 12px; }
.workload-label strong { font-weight: 550; }
.workload-label > span { color: #345746; font-weight: 700; }
.workload-label small { font-weight: 400; color: #8b9e90; font-size: 10px; }
.progress-track { width: 100%; height: 6px; background: #eff3ef; border-radius: 10px; overflow: hidden; margin: 10px 0 8px; }
.progress-track > span { background: #62a384; display: block; height: 100%; border-radius: 10px; min-width: 0; }
.workload-detail { display: flex; justify-content: space-between; font-size: 9px; color: #99a499; }
.attention-panel { padding: 27px; background: #eef4ed; border-color: #e1eade; position: relative; }
.attention-panel h2 { font-size: 24px; line-height: 1.4; margin-top: 15px; color: #335740; letter-spacing: -.8px; }
.attention-number { display: flex; align-items: baseline; gap: 12px; font: 750 40px 'Manrope', sans-serif; color: #477453; margin: 12px 0; }
.attention-number > span { font: 500 12px 'DM Sans', sans-serif; color: #809780; }
.attention-panel > p { color: #7f917d; max-width: 280px; font-size: 11px; line-height: 1.8; }
.attention-panel .button { background: transparent; border-color: #cbdac9; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 11px; text-align: left; }
th { background: #f8faf8; color: #8a9a8d; font-weight: 500; font-size: 10px; padding: 12px 18px; white-space: nowrap; border-block: 1px solid #edf0ed; }
td { border-bottom: 1px solid #eff2ef; padding: 16px 18px; color: #65786b; vertical-align: middle; }
tr:last-child > td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 24px; }
tbody tr:hover { background: #fbfdfb; }
tfoot td { border-top: 1px solid var(--line); font-weight: 700; background: #f7faf7; }
.subject-cell { min-width: 180px; max-width: 350px; }
.subject-cell > a { color: #3b5243; font-size: 11px; font-weight: 550; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject-cell > small { color: #9aa69c; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; border-radius: 5px; padding: 4px 8px; font-size: 9px; font-weight: 550; line-height: 1.4; white-space: nowrap; }
.badge.green { background: #edf6ee; color: #548461; }
.badge.red { background: #fdf0eb; color: #c3775c; }
.badge.amber { background: #fbf5e5; color: #b39443; }
.badge.blue { background: #edf2f9; color: #6c8bad; }
.badge.neutral { background: #f1f4f1; color: #829480; }
.badge.muted { background: #f0f1f0; color: #9a9f99; }
.badge + .badge { margin-left: 5px; }
.block { display: block; }
.strong { font-weight: 600; color: #3f5847; }
.subtle { color: var(--muted); }
.nowrap { white-space: nowrap; }
.text-red { color: var(--red); }
.junk-row { color: #a0a79f; background: #f6f6f5; }
.junk-row .subject-cell > a { text-decoration: line-through; color: #9ba399; }
.page-note { color: #96a294; font-size: 10px; margin: 21px 0; }
.footer { padding: 20px 40px; display: flex; align-items: center; justify-content: space-between; color: #a4b0a4; font-size: 8px; letter-spacing: 1.5px; border-top: 1px solid var(--line); }
.footer > span { font-size: 9px; letter-spacing: 0; }
.notice { border: 1px solid #dbe9db; background: #f1f8f0; color: #477b52; padding: 13px 16px; border-radius: 7px; margin-bottom: 20px; font-size: 12px; }
.notice.error { border-color: #eedbd3; background: #fff5f0; color: #b2664c; }
.notice.info { border-color: #d8e2ed; background: #f1f6fc; color: #56738e; }
.loading, .empty { padding: 45px 25px; text-align: center; color: #92a08f; }
.empty h2, .empty h3 { color: #5e7862; margin: 12px 0 8px; }
.empty p { max-width: 450px; margin: 0 auto 10px; font-size: 12px; }
.empty small { font-size: 11px; }
.empty-icon { font-size: 29px; display: inline-flex; justify-content: center; align-items: center; width: 62px; height: 62px; background: #edf5ee; border-radius: 50%; color: #77a37e; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding: 22px 24px; }
.filters > label { font-size: 10px; flex: 1 1 150px; }
.filters > .search-label { flex-basis: 240px; }
.filters .checkbox-label { flex: 0 0 auto; min-height: 38px; }
.table-toolbar, .pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; color: #92a18e; font-size: 10px; border-top: 1px solid var(--line); gap: 12px; }
.pagination > div { display: flex; gap: 7px; }
label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 550; color: #536e59; }
input, select, textarea { min-width: 0; width: 100%; background: #fff; border: 1px solid #dce5dc; border-radius: 6px; min-height: 39px; padding: 9px 11px; color: #426249; font-size: 12px; }
input::placeholder, textarea::placeholder { color: #a3afa0; font-size: 11px; }
textarea { resize: vertical; }
label small { font-size: 10px; color: #94a28f; font-weight: 400; line-height: 1.6; }
input[type=checkbox] { width: 14px; min-height: 14px; height: 14px; padding: 0; accent-color: var(--green); flex-shrink: 0; }
input:disabled, textarea:disabled, select:disabled { background: #f5f8f4; color: #80917b; }
.checkbox-label { flex-direction: row; align-items: center; gap: 8px; font-size: 12px; font-weight: 400; margin-bottom: 8px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.department-color-legend { padding: 0; margin-bottom: 7px; color: #536e59; font-size: 12px; font-weight: 550; }
.department-color-palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; }
.department-color-option { flex-direction: row; align-items: center; padding: 7px 8px; border: 1px solid #dce5dc; border-radius: 6px; cursor: pointer; }
.department-color-option input { width: 14px; height: 14px; min-height: 0; margin: 0; padding: 0; flex-shrink: 0; accent-color: var(--green); }
.department-color-option:has(input:checked) { border-color: var(--green); }
.department-color-preview { display: inline-flex; gap: 7px; align-items: center; }
.department-color-chip { width: 14px; height: 14px; border-radius: 3px; border: 1px solid #b5c3b9; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 23px; padding: 0 24px 24px; }
.form-grid .span-two { grid-column: 1 / -1; }
.assignment-cell { min-width: 154px; }
.mail-assignment fieldset { display: grid; gap: 10px; }
.assignment-cell .mail-assignment fieldset { gap: 4px; }
.assignment-cell .mail-assignment select { min-height: 28px; padding: 3px 4px; font-size: 11px; }
.mail-assignment button { justify-self: start; }
.mail-assignment .validation-errors { margin: 8px 0 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mail-detail-data { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 18px; }
.mail-detail-data dd { margin-top: 5px; text-align: start; overflow-wrap: anywhere; }
.mail-detail-remarks { grid-column: 1 / -1; white-space: pre-wrap; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--line); }
.form-panel { max-width: 540px; padding: 28px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.management-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.compact-panel { padding: 24px; }
.compact-panel > h2 { margin-bottom: 15px; }
.compact-panel > p { font-size: 11px; color: #8b9c85; line-height: 1.8; }
.helper { margin: 18px 0 0; color: #97a28f; font-size: 11px; line-height: 1.8; }
.back-link { font-size: 11px; display: block; margin-bottom: 12px; }
dl { display: grid; grid-template-columns: auto 1fr; font-size: 11px; gap: 13px; margin: 23px 0; }
dt { color: #8a9a83; } dd { margin: 0; text-align: right; }
.activity { padding: 17px 0; border-bottom: 1px solid var(--line); }
.activity > strong { display: block; font-size: 11px; color: #50794f; }
.activity > small { display: block; font-size: 9px; color: #9aab92; margin-top: 4px; }
.activity > p { margin: 10px 0 0; font-size: 10px; color: #899b80; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.report-notes p { margin: 0; }
.connection-info { display: flex; align-items: center; gap: 18px; border: 1px dashed #d3e3d4; padding: 20px 24px; border-radius: 9px; margin-bottom: 24px; background: #f2f7f1; }
.connection-info > div { flex: 1; }
.connection-info p { font-size: 11px; color: #89a080; margin: 5px 0 0; }
.connection-info strong { font-size: 12px; }
.connection-icon { font: 700 24px 'Manrope', sans-serif; background: #fff; border: 1px solid #e2e8df; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; color: #6d9365; flex-shrink: 0; }
.mailbox-title { display: flex; align-items: center; gap: 15px; }
.mailbox-title h2 { overflow-wrap: anywhere; }
.mailbox-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #edf5ed; font-size: 22px; color: #739c6c; }
.mailbox-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; padding: 4px 24px 24px; }
.mailbox-stats small { color: #96a48e; font-size: 9px; letter-spacing: .5px; display: block; }
.mailbox-stats strong { font-size: 12px; font-weight: 550; display: block; margin-top: 7px; }
.mailbox-card > .notice { margin: 0 24px 20px; }
.confirm-box { padding: 20px 24px; background: #fff9f3; border-top: 1px solid #eee1d6; margin-bottom: 24px; }
.confirm-box p { font-size: 12px; color: #9c7d65; }
.confirm-box .button { margin-right: 10px; }
.audit-detail { white-space: pre-wrap; min-width: 220px; max-width: 500px; overflow-wrap: anywhere; font-size: 10px; }
.validation-errors { color: #ba6b56; background: #fff5ee; font-size: 12px; padding: 15px 30px; margin: 0 24px 24px; border-radius: 6px; }
.validation-message { color: #bd6a56; font-size: 11px; }
.invalid { border-color: #d7947c; }
.account-screen { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; background: #fcfdfa; }
.account-intro { min-height: 100vh; background: #eaf2e8; display: flex; flex-direction: column; justify-content: center; padding: 70px max(45px, 11%); }
.account-intro .brand { margin-bottom: 80px; }
.account-intro h2 { font-size: clamp(35px, 4vw, 56px); line-height: 1.2; letter-spacing: -2px; color: #315d39; margin: 22px 0; }
.account-intro > p { color: #869d7e; max-width: 360px; font-size: 14px; line-height: 1.9; }
.account-steps { display: flex; gap: 28px; margin-top: 50px; font-size: 10px; color: #99ad91; }
.account-steps strong { display: block; color: #6b8961; font-size: 12px; margin-top: 8px; }
.account-card { width: 100%; max-width: 480px; padding: 50px 45px; margin: auto; }
.account-card h1 { font-size: 29px; margin-top: 15px; }
.account-card > p { font-size: 12px; margin-bottom: 30px; }
.account-card form { margin-top: 30px; }
.account-link { text-align: center; margin: 25px 0 0; font-size: 11px; color: #9ba791; }
.account-link a { margin-left: 5px; font-weight: 650; }
#blazor-error-ui { background: #fff3e4; color: #9e644b; bottom: 0; box-shadow: 0 -2px 10px #3331; display: none; left: 0; padding: 15px 25px; position: fixed; width: 100%; z-index: 1000; font-size: 12px; }

@media (min-width: 1600px) { .page-body { padding-top: 48px; } .metrics { gap: 24px; } }
@media (max-width: 1150px) {
    .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
    .sidebar { padding-inline: 14px; }
    .page-body { padding: 30px 25px; }
    .topbar { padding-inline: 25px; }
    .metric { padding: 18px 16px; }
    .overview-grid { grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr); }
    .detail-grid, .management-grid { grid-template-columns: 1fr; }
    .detail-grid > aside { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
}
@media (max-width: 800px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; padding: 18px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar > .brand { font-size: 22px; }
    .sidebar .brand small, .sidebar-note, .sidebar > .nav-label { display: none; }
    nav { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 15px; }
    nav > .nav-label { display: none; }
    nav > a { font-size: 10px; min-height: 30px; padding: 7px 9px; gap: 6px; margin: 0; }
    .nav-icon { font-size: 15px; width: 14px; }
    .topbar { height: 50px; padding-inline: 22px; }
    .metrics { grid-template-columns: repeat(2, 1fr); }
    .overview-grid, .report-notes, .detail-grid > aside { grid-template-columns: 1fr; }
    .attention-panel { padding: 24px; }
    .attention-panel h2 br { display: none; }
    .attention-panel > p { max-width: none; }
    .mailbox-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .connection-info > .badge { display: none; }
    .account-screen { grid-template-columns: 1fr; }
    .account-intro { min-height: 0; padding: 30px; }
    .account-intro .brand { margin-bottom: 25px; }
    .account-intro h2 { font-size: 32px; margin: 13px 0; }
    .account-intro h2 br { display: none; }
    .account-intro > p, .account-steps, .account-intro > .eyebrow { display: none; }
    .account-card { padding: 35px 30px; }
}
@media (max-width: 480px) {
    .page-body { padding: 25px 16px; }
    .page-heading { align-items: start; flex-direction: column; gap: 17px; }
    .page-heading h1 { font-size: 29px; }
    .form-grid { grid-template-columns: 1fr; padding-inline: 18px; }
    .form-grid .span-two { grid-column: auto; }
    .panel-heading, .compact-panel { padding: 20px 18px; }
    .metrics { gap: 12px; }
    .metric { padding: 17px 14px; }
    .metric > strong { font-size: 30px; }
    .metric > small { font-size: 9px; }
    .metric-label { font-size: 8px; }
    .pagination { flex-direction: column; align-items: start; }
    .footer { padding-inline: 20px; }
    .connection-info { padding: 17px; }
}
