:root {
    --ink: #17383b;
    --muted: #6b7e80;
    --line: #dce5e4;
    --surface: #ffffff;
    --canvas: #f3f7f6;
    --teal-950: #082f33;
    --teal-900: #0d4549;
    --teal-800: #14575b;
    --teal-100: #dff0ed;
    --teal-50: #edf7f5;
    --orange: #ef9224;
    --orange-100: #fff1dc;
    --green: #4d7d39;
    --green-100: #e8f4e2;
    --red: #a83d3d;
    --red-100: #fbe7e7;
    --yellow: #8a670e;
    --yellow-100: #fff5d7;
    --blue: #25658a;
    --blue-100: #e4f1fa;
    --shadow-sm: 0 8px 24px rgba(13, 69, 73, .07);
    --shadow-lg: 0 28px 70px rgba(4, 36, 39, .17);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 26px;
    --sidebar-width: 270px;
    color-scheme: light;
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow-x: hidden;
    background: var(--canvas);
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--canvas);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #fff;
    background: var(--teal-900);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--orange);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff;
    background: var(--teal-900);
    box-shadow: 0 8px 18px rgba(13, 69, 73, .16);
}

.button-primary:hover {
    background: var(--teal-800);
}

.button-secondary {
    border-color: var(--line);
    color: var(--ink);
    background: #fff;
}

.button-danger {
    border-color: #f0caca;
    color: var(--red);
    background: #fff;
}

.button-small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
}

.button-block {
    width: 100%;
}

.text-button {
    padding: 5px 0;
    border: 0;
    color: var(--muted);
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.text-button:hover {
    color: var(--teal-900);
}

.alert {
    margin-bottom: 18px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 12px;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.alert-success {
    border-color: #bdddb0;
    color: #355d27;
    background: var(--green-100);
}

.alert-danger {
    border-color: #efc3c3;
    color: #823131;
    background: var(--red-100);
}

.alert-warning {
    border-color: #ead799;
    color: var(--yellow);
    background: var(--yellow-100);
}

.alert-info {
    border-color: #bdd9ea;
    color: var(--blue);
    background: var(--blue-100);
}

.stack {
    display: grid;
    gap: 16px;
}

.stack-lg {
    display: grid;
    gap: 24px;
}

.app-shell {
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 24px 16px 18px;
    overflow-y: auto;
    color: #fff;
    background:
        radial-gradient(circle at 10% 5%, rgba(239, 146, 36, .13), transparent 28%),
        linear-gradient(165deg, var(--teal-800), var(--teal-950) 70%);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 23px;
    border-bottom: 1px solid rgba(255, 255, 255, .11);
    color: inherit;
    text-decoration: none;
}

.sidebar-brand img {
    width: 46px;
    height: 46px;
    padding: 4px;
    border-radius: 13px;
    object-fit: contain;
    background: rgba(255, 255, 255, .94);
}

.sidebar-brand div {
    display: grid;
    gap: 1px;
}

.sidebar-brand strong {
    font-size: 20px;
    letter-spacing: .08em;
}

.sidebar-brand span {
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    padding-top: 22px;
}

.nav-section-label {
    padding: 0 12px 8px;
    color: rgba(255, 255, 255, .46);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 47px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

.nav-link.is-active {
    border-color: rgba(255, 255, 255, .1);
    color: #fff;
    background: rgba(255, 255, 255, .11);
}

.nav-icon {
    display: inline-grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 9px;
    color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .08);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .03em;
}

.nav-link.is-active .nav-icon {
    color: #39240b;
    background: var(--orange);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
}

.nav-system-label {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-storage-card {
    display: grid;
    gap: 9px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 14px;
    background: rgba(255, 255, 255, .075);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .1);
}

.sidebar-storage-heading,
.sidebar-storage-copy {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-storage-heading span {
    color: rgba(255, 255, 255, .72);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.sidebar-storage-heading strong {
    color: #fff;
    font-size: 13px;
}

.sidebar-storage-progress {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.sidebar-storage-progress::-webkit-progress-bar {
    border-radius: inherit;
    background: rgba(255, 255, 255, .12);
}

.sidebar-storage-progress::-webkit-progress-value {
    border-radius: inherit;
    background: linear-gradient(90deg, #62b98a, #9bd374);
}

.sidebar-storage-progress::-moz-progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, #62b98a, #9bd374);
}

.storage-warning .sidebar-storage-progress::-webkit-progress-value {
    background: linear-gradient(90deg, #ef9224, #f5bd58);
}

.storage-warning .sidebar-storage-progress::-moz-progress-bar {
    background: linear-gradient(90deg, #ef9224, #f5bd58);
}

.storage-critical .sidebar-storage-progress::-webkit-progress-value {
    background: linear-gradient(90deg, #c84444, #ee6c62);
}

.storage-critical .sidebar-storage-progress::-moz-progress-bar {
    background: linear-gradient(90deg, #c84444, #ee6c62);
}

.sidebar-storage-copy {
    justify-content: flex-start;
    font-size: 11px;
}

.sidebar-storage-copy strong {
    color: #fff;
}

.sidebar-storage-copy span,
.sidebar-storage-card small {
    color: rgba(255, 255, 255, .57);
}

.sidebar-storage-card small {
    font-size: 9px;
    line-height: 1.4;
}

.sidebar-archive-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border-radius: 9px;
    color: #342207;
    background: linear-gradient(135deg, #f5a133, #ef9224);
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(239, 146, 36, .2);
}

.sidebar-archive-button span {
    font-size: 17px;
    line-height: 1;
}

.secure-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
}

.secure-dot {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: #8ac96c;
    box-shadow: 0 0 0 4px rgba(138, 201, 108, .13);
}

.secure-note div {
    display: grid;
}

.secure-note strong {
    font-size: 12px;
}

.secure-note span {
    color: rgba(255, 255, 255, .58);
    font-size: 10px;
}

.app-main {
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 13px clamp(20px, 3vw, 42px);
    border-bottom: 1px solid rgba(220, 229, 228, .86);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
}

.topbar-context {
    display: grid;
}

.topbar-context .eyebrow {
    margin-bottom: 1px;
}

.topbar-context strong {
    font-size: 16px;
}

.account-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.account-identity:hover .account-copy strong {
    color: var(--teal-800);
}

.avatar {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--teal-900);
    font-size: 12px;
    font-weight: 800;
}

.account-copy {
    display: grid;
    min-width: 150px;
}

.account-copy strong {
    font-size: 13px;
}

.account-copy span {
    color: var(--muted);
    font-size: 11px;
}

.content {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: clamp(22px, 3vw, 42px);
}

.mobile-menu-button,
.sidebar-backdrop {
    display: none;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
    font-size: clamp(25px, 3vw, 36px);
    letter-spacing: -.04em;
}

.page-header p {
    max-width: 700px;
    margin: 7px 0 0;
    color: var(--muted);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.card {
    border: 1px solid rgba(220, 229, 228, .92);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 19px 21px;
    border-bottom: 1px solid var(--line);
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 16px;
}

.card-body {
    padding: 21px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.metric-card {
    position: relative;
    min-height: 148px;
    padding: 21px;
    overflow: hidden;
}

.metric-card::after {
    position: absolute;
    right: -34px;
    bottom: -44px;
    width: 115px;
    height: 115px;
    border-radius: 50%;
    background: var(--teal-50);
    content: "";
}

.metric-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.metric-value {
    display: block;
    margin: 13px 0 4px;
    color: var(--teal-900);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.metric-note {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr);
    gap: 20px;
}

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

.quick-action {
    display: block;
    min-height: 114px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 13px;
    text-decoration: none;
    transition: border-color .16s ease, transform .16s ease, background-color .16s ease;
}

.quick-action:hover {
    border-color: #a8c8c5;
    background: var(--teal-50);
    transform: translateY(-2px);
}

.quick-action strong {
    display: block;
    margin-bottom: 5px;
}

.quick-action span {
    color: var(--muted);
    font-size: 12px;
}

.timeline {
    display: grid;
    gap: 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 13px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
    border-bottom: 0;
}

.timeline-dot {
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--orange);
}

.timeline-item strong {
    display: block;
    font-size: 13px;
}

.timeline-item span {
    color: var(--muted);
    font-size: 11px;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 15px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    background: #f9fbfa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.data-table td {
    font-size: 13px;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.cell-title {
    display: grid;
    gap: 2px;
}

.cell-title strong {
    color: var(--ink);
}

.cell-title span {
    color: var(--muted);
    font-size: 11px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.badge {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--teal-900);
    background: var(--teal-100);
    font-size: 10px;
    font-weight: 800;
}

.badge-green {
    color: #355d27;
    background: var(--green-100);
}

.badge-red {
    color: var(--red);
    background: var(--red-100);
}

.badge-orange {
    color: #8b5414;
    background: var(--orange-100);
}

.badge-gray {
    color: #566668;
    background: #edf1f0;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.filters input,
.filters select {
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

legend {
    width: 100%;
    margin-bottom: 14px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.form-card {
    max-width: 980px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.field > span {
    color: #334f51;
    font-size: 12px;
    font-weight: 750;
}

.field small,
.help-text {
    color: var(--muted);
    font-size: 11px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #ccd9d7;
    border-radius: 10px;
    outline: none;
    color: var(--ink);
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field select[multiple] {
    min-height: 138px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--teal-800);
    box-shadow: 0 0 0 3px rgba(20, 87, 91, .1);
}

.field-span-2 {
    grid-column: span 2;
}

.field-span-3,
.form-full {
    grid-column: 1 / -1;
}

.checkbox-card,
.consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fbfcfc;
}

.checkbox-card input,
.consent input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--teal-900);
}

.checkbox-card strong,
.checkbox-card span {
    display: block;
}

.checkbox-card span,
.consent span {
    color: var(--muted);
    font-size: 12px;
}

.conditional-panel {
    padding: 16px;
    border: 1px dashed #b8cbc8;
    border-radius: 12px;
    background: var(--teal-50);
}

.file-picker {
    position: relative;
    display: grid;
    min-height: 110px;
    place-items: center;
    padding: 20px;
    border: 1px dashed #9fb9b6;
    border-radius: 13px;
    background: #fbfdfc;
    text-align: center;
    cursor: pointer;
}

.file-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.file-picker strong {
    display: block;
    color: var(--teal-900);
}

.file-picker span {
    color: var(--muted);
    font-size: 11px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, .7fr);
    gap: 20px;
}

.definition-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 11px 16px;
    margin: 0;
}

.definition-list dt {
    color: var(--muted);
    font-size: 12px;
}

.definition-list dd {
    margin: 0;
    font-weight: 650;
}

.empty-state {
    padding: 48px 24px;
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 5px;
    font-size: 17px;
}

.empty-state p {
    max-width: 500px;
    margin: 0 auto 18px;
    color: var(--muted);
}

.guest-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(120deg, rgba(8, 47, 51, .96), rgba(13, 69, 73, .88)),
        radial-gradient(circle at 15% 20%, rgba(239, 146, 36, .5), transparent 27%);
}

.guest-flash {
    position: fixed;
    z-index: 10;
    top: 20px;
    left: 50%;
    width: min(520px, calc(100% - 36px));
    transform: translateX(-50%);
    box-shadow: var(--shadow-lg);
}

.login-shell {
    display: grid;
    width: min(1040px, 100%);
    min-height: 650px;
    grid-template-columns: 1.1fr .9fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 30px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(30px, 5vw, 60px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 75% 15%, rgba(239, 146, 36, .22), transparent 28%),
        linear-gradient(145deg, var(--teal-800), var(--teal-950));
}

.login-brand::after {
    position: absolute;
    right: -150px;
    bottom: -180px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 50%;
    box-shadow:
        0 0 0 45px rgba(255, 255, 255, .025),
        0 0 0 90px rgba(255, 255, 255, .02);
    content: "";
}

.login-logo {
    position: relative;
    z-index: 1;
    width: 110px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .95);
}

.login-message {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.login-message h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -.05em;
}

.login-message p {
    max-width: 420px;
    color: rgba(255, 255, 255, .68);
    font-size: 16px;
}

.login-meta {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, .56);
    font-size: 11px;
}

.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 5vw, 62px);
}

.login-form-panel h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -.04em;
}

.login-form-panel > p {
    margin: 8px 0 28px;
    color: var(--muted);
}

.password-field {
    position: relative;
}

.password-control {
    position: relative;
    display: block;
}

.password-control input {
    padding-right: 70px;
}

.password-field input {
    padding-right: 70px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border: 0;
    color: var(--teal-900);
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.password-control .password-toggle {
    bottom: 9px;
}

.login-help {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.install-page {
    padding: clamp(18px, 4vw, 48px);
    background:
        radial-gradient(circle at 10% 10%, rgba(239, 146, 36, .12), transparent 24%),
        var(--canvas);
}

.install-shell {
    display: grid;
    width: min(1180px, 100%);
    min-height: calc(100vh - 96px);
    grid-template-columns: .72fr 1.28fr;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.install-brand {
    padding: clamp(28px, 5vw, 56px);
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(239, 146, 36, .2), transparent 27%),
        linear-gradient(160deg, var(--teal-800), var(--teal-950));
}

.install-brand img {
    width: 130px;
    margin-bottom: 64px;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
}

.install-brand h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 45px);
    line-height: 1.08;
    letter-spacing: -.05em;
}

.install-brand p {
    color: rgba(255, 255, 255, .68);
}

.install-points {
    display: grid;
    gap: 12px;
    margin: 35px 0 0;
    padding: 0;
    list-style: none;
}

.install-points li {
    position: relative;
    padding-left: 25px;
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
}

.install-points li::before {
    position: absolute;
    top: 3px;
    left: 0;
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 50%;
    color: var(--teal-950);
    background: var(--orange);
    content: "✓";
    font-size: 10px;
    font-weight: 900;
}

.install-card {
    padding: clamp(28px, 5vw, 58px);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-size: 27px;
    letter-spacing: -.04em;
}

.step-pill {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--teal-900);
    background: var(--teal-100);
    font-size: 11px;
    font-weight: 800;
}

.success-state {
    display: grid;
    min-height: 100%;
    align-content: center;
    justify-items: start;
}

.success-state h2 {
    margin: 0;
    font-size: 34px;
}

.success-state p {
    max-width: 470px;
    color: var(--muted);
}

.success-mark {
    display: grid;
    width: 62px;
    height: 62px;
    margin-bottom: 24px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: var(--green);
    font-size: 28px;
}

.error-state {
    display: grid;
    min-height: 70vh;
    place-content: center;
    justify-items: center;
    padding: 30px;
    text-align: center;
}

.error-code {
    color: var(--orange);
    font-size: 72px;
    font-weight: 850;
    letter-spacing: -.06em;
}

.error-state h1 {
    max-width: 560px;
    margin: 0;
}

.error-state p {
    margin: 10px 0 24px;
    color: var(--muted);
}

.update-shell {
    width: min(620px, 100%);
}

.update-shell h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: -.04em;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

.checkbox-card-accent {
    border-color: #b8d1ce;
    background: var(--teal-50);
}

.section-heading-inline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.section-heading-inline h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.03em;
}

.specialty-folder-section,
.work-section {
    margin-bottom: 26px;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.folder-card {
    position: relative;
    display: grid;
    min-height: 150px;
    grid-template-rows: 1fr auto;
    padding: 21px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px 17px 17px 17px;
    color: var(--ink);
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.folder-card:hover,
.folder-card.is-active {
    border-color: #9abdb9;
    box-shadow: 0 15px 34px rgba(13, 69, 73, .12);
    transform: translateY(-3px);
}

.folder-tab {
    position: absolute;
    top: 0;
    left: 0;
    width: 42%;
    height: 8px;
    border-radius: 0 0 8px 0;
    background: var(--orange);
}

.folder-copy {
    display: grid;
    align-content: start;
    gap: 7px;
    padding-top: 7px;
}

.folder-copy strong {
    font-size: 15px;
}

.folder-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.folder-count {
    display: flex;
    align-items: baseline;
    gap: 5px;
    color: var(--teal-900);
}

.folder-count strong {
    font-size: 28px;
    letter-spacing: -.04em;
}

.folder-count small {
    color: var(--muted);
}

.daily-note-card {
    margin-bottom: 28px;
}

.privacy-pill,
.privacy-lock {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: #6c4c0d;
    background: var(--yellow-100);
    font-size: 10px;
    font-weight: 800;
}

.work-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.work-card {
    display: grid;
    min-height: 190px;
    align-content: space-between;
    gap: 18px;
    padding: 20px;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.work-card:hover {
    border-color: #9abdb9;
    box-shadow: 0 16px 38px rgba(13, 69, 73, .12);
    transform: translateY(-3px);
}

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

.work-card-title {
    font-size: 17px;
    line-height: 1.35;
}

.work-card-meta {
    color: var(--muted);
    font-size: 10px;
}

progress {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background: #e5eceb;
}

progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e5eceb;
}

progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--teal-800), #6b9b47);
}

progress::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--teal-800), #6b9b47);
}

.progress-large {
    height: 13px;
}

.shared-work-board {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.shared-work-row {
    display: grid;
    grid-template-columns: 170px minmax(280px, 1fr) 90px auto;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.shared-work-row:last-child {
    border-bottom: 0;
}

.shared-work-owner,
.shared-work-progress {
    display: grid;
}

.shared-work-owner strong,
.shared-work-summary strong {
    font-size: 13px;
}

.shared-work-owner span,
.shared-work-progress span {
    color: var(--muted);
    font-size: 10px;
}

.shared-work-summary p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.shared-work-progress {
    justify-items: end;
}

.shared-work-progress strong {
    color: var(--teal-900);
    font-size: 20px;
}

.private-detail {
    padding: 16px;
    border: 1px solid #d7e5e3;
    border-radius: 12px;
    background: var(--teal-50);
}

.field input[type="range"] {
    min-height: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
    accent-color: var(--teal-900);
}

.dashboard-work-timeline {
    margin-bottom: 20px;
}

.dashboard-timeline-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr);
}

.work-timeline-list {
    padding: 10px 20px;
    border-right: 1px solid var(--line);
}

.work-timeline-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 120px;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
}

.work-timeline-row:last-child {
    border-bottom: 0;
}

.timeline-date-box {
    display: grid;
    justify-items: center;
    padding: 7px;
    border-radius: 10px;
    color: var(--teal-900);
    background: var(--teal-50);
}

.timeline-date-box strong {
    font-size: 18px;
}

.timeline-date-box small,
.work-timeline-copy small {
    color: var(--muted);
    font-size: 9px;
}

.work-timeline-copy {
    display: grid;
}

.latest-note-list {
    padding: 20px;
}

.subsection-label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.latest-note {
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.latest-note:last-child {
    border-bottom: 0;
}

.latest-note strong {
    display: block;
    font-size: 12px;
}

.latest-note p {
    display: -webkit-box;
    margin: 3px 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.latest-note span {
    color: var(--muted);
    font-size: 9px;
}

.report-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 13px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.report-month-nav a {
    color: var(--teal-900);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.monthly-report {
    overflow: hidden;
}

.report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 30px;
    color: #fff;
    background: linear-gradient(145deg, var(--teal-800), var(--teal-950));
}

.report-header h1 {
    margin: 0;
    font-size: 28px;
}

.report-header p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .66);
}

.report-total {
    display: grid;
    min-width: 130px;
    justify-items: end;
}

.report-total strong {
    font-size: 34px;
}

.report-total span,
.report-total small {
    color: rgba(255, 255, 255, .66);
}

.report-days {
    padding: 12px 30px 30px;
}

.report-day {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    break-inside: avoid;
}

.report-day:last-child {
    border-bottom: 0;
}

.report-day.is-empty {
    opacity: .48;
}

.report-date {
    display: grid;
    align-content: start;
    justify-items: center;
    padding: 8px;
    border-radius: 10px;
    background: var(--teal-50);
}

.report-date strong {
    font-size: 20px;
}

.report-date span {
    color: var(--muted);
    font-size: 10px;
}

.report-day-content > span {
    color: var(--muted);
    font-size: 12px;
}

.report-note + .report-note {
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px dashed var(--line);
}

.report-note strong {
    font-size: 13px;
}

.report-note p {
    margin: 4px 0;
    font-size: 12px;
}

.report-note small {
    color: var(--muted);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dashboard-folder-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.dashboard-folder-card {
    --folder-accent: var(--teal-900);
    --folder-soft: var(--teal-50);
    position: relative;
    display: grid;
    min-height: 185px;
    align-content: center;
    justify-items: center;
    gap: 14px;
    padding: 23px 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-align: center;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.dashboard-folder-card::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 5px;
    content: "";
    background: var(--folder-accent);
}

.dashboard-folder-card:hover {
    box-shadow: 0 18px 42px rgba(13, 69, 73, .13);
    transform: translateY(-3px);
}

.folder-theme-blue {
    --folder-accent: #08617a;
    --folder-soft: #e8f5fa;
}

.folder-theme-teal {
    --folder-accent: #087b6f;
    --folder-soft: #e4f6f1;
}

.folder-theme-orange {
    --folder-accent: #f58b13;
    --folder-soft: #fff1df;
}

.folder-theme-brown {
    --folder-accent: #93451d;
    --folder-soft: #f8ede7;
}

.dashboard-folder-icon {
    display: grid;
    width: 70px;
    height: 70px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--folder-accent);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--folder-accent) 24%, transparent);
    font-size: 19px;
    font-weight: 850;
    letter-spacing: -.02em;
}

.dashboard-folder-copy {
    display: grid;
    gap: 6px;
}

.dashboard-folder-copy strong {
    font-size: 17px;
}

.dashboard-folder-copy span {
    color: var(--folder-accent);
    font-size: 15px;
}

.dashboard-folder-copy b {
    font-size: 23px;
}

.dashboard-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .85fr) minmax(330px, 1.05fr);
    gap: 16px;
    margin-bottom: 20px;
}

.analytics-card {
    min-width: 0;
    overflow: hidden;
}

.analytics-card .card-header {
    min-height: 78px;
}

.compact-select select {
    min-height: 36px;
    padding: 7px 31px 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
}

.chart-wrap {
    padding: 10px 16px 16px;
}

.monthly-bar-chart {
    display: block;
    width: 100%;
    min-height: 230px;
}

.chart-axis {
    stroke: #d8e3e2;
    stroke-width: 1;
}

.chart-bar-group rect {
    fill: #0b6976;
}

.chart-value {
    fill: var(--ink);
    font-size: 11px;
    font-weight: 750;
}

.chart-label {
    fill: var(--muted);
    font-size: 10px;
}

.work-status-body {
    display: grid;
    grid-template-columns: minmax(135px, .85fr) minmax(155px, 1fr);
    align-items: center;
    gap: 18px;
    padding: 24px;
}

.donut-chart {
    position: relative;
    display: grid;
    place-items: center;
}

.donut-chart svg {
    width: 155px;
    transform: rotate(-90deg);
}

.donut-base,
.donut-segment {
    fill: none;
    stroke-width: 7;
}

.donut-base {
    stroke: #edf2f1;
}

.donut-segment {
    transform-origin: center;
}

.donut-chart > span {
    position: absolute;
    display: grid;
    justify-items: center;
}

.donut-chart > span strong {
    color: var(--teal-950);
    font-size: 30px;
}

.donut-chart > span small {
    color: var(--muted);
}

.status-legend {
    display: grid;
    gap: 12px;
}

.status-legend > div {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.status-legend strong {
    color: var(--ink);
}

.status-legend strong small {
    color: var(--muted);
    font-weight: 550;
}

.legend-dot,
.upcoming-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-planned {
    background: #f59b23;
}

.status-in_progress {
    background: #08758a;
}

.status-waiting {
    background: #9a5221;
}

.status-completed {
    background: #4a8b4d;
}

.upcoming-work-list {
    padding: 2px 20px 12px;
}

.upcoming-work-row {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.upcoming-work-row:last-child {
    border-bottom: 0;
}

.upcoming-work-row > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.upcoming-work-row a,
.upcoming-work-row strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    font-weight: 760;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upcoming-work-row small {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upcoming-work-row time {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.dashboard-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--teal-950), var(--teal-800));
    box-shadow: var(--shadow-sm);
}

.dashboard-summary-strip article {
    display: grid;
    gap: 4px;
    padding: 18px 22px;
    border-right: 1px solid rgba(255, 255, 255, .12);
}

.dashboard-summary-strip article:last-child {
    border-right: 0;
}

.dashboard-summary-strip strong {
    color: #fff;
    font-size: 24px;
}

.dashboard-summary-strip span {
    color: rgba(255, 255, 255, .68);
    font-size: 10px;
}

.work-filter-card,
.document-filter-card {
    margin-bottom: 20px;
    padding: 18px;
}

.work-board-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1.45fr) minmax(170px, .8fr) minmax(170px, .8fr) auto;
    align-items: end;
    gap: 12px;
}

.work-board-filters .field,
.document-library-filters .field {
    gap: 5px;
}

.filter-actions {
    display: flex;
    gap: 7px;
    padding-bottom: 1px;
}

.filter-result-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

.filter-result-note strong {
    color: var(--teal-900);
    font-size: 18px;
}

.filter-result-note .privacy-pill {
    margin-left: auto;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(245px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.kanban-column {
    --column-color: #0e5f7a;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #eef3f3;
}

.kanban-column.is-progress {
    --column-color: #ed8618;
}

.kanban-column.is-waiting {
    --column-color: #8e4a22;
}

.kanban-column.is-completed {
    --column-color: #4d884d;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    color: #fff;
    background: var(--column-color);
}

.kanban-column-header strong {
    font-size: 12px;
}

.kanban-column-header span {
    min-width: 25px;
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: 10px;
    text-align: center;
}

.kanban-column-body {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 360px;
    padding: 10px;
}

.kanban-empty {
    padding: 30px 12px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.kanban-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #d3dfde;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(13, 69, 73, .05);
}

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

.area-pill {
    display: inline-flex;
    max-width: 90%;
    padding: 4px 7px;
    overflow: hidden;
    border-radius: 999px;
    color: #0b5960;
    background: #e3f2f1;
    font-size: 8px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.area-blue {
    color: #185577;
    background: #e8f2f9;
}

.area-green {
    color: #3f6d35;
    background: #edf5e8;
}

.area-orange,
.area-amber {
    color: #8f5308;
    background: #fff1dd;
}

.area-red {
    color: #8d3b36;
    background: #fbe9e7;
}

.area-brown {
    color: #754421;
    background: #f4ebe5;
}

.priority-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #8aa09e;
}

.priority-low {
    background: #5b9b57;
}

.priority-normal {
    background: #e69a2b;
}

.priority-high {
    background: #e36d25;
}

.priority-urgent {
    background: #bd3f37;
}

.kanban-card-title {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
}

.kanban-card-summary {
    display: -webkit-box;
    margin: -3px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.kanban-assignees {
    display: grid;
    gap: 6px;
}

.kanban-assignees > span {
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-stack {
    display: flex;
    padding-left: 5px;
}

.mini-avatar {
    display: inline-grid;
    width: 27px;
    height: 27px;
    flex: 0 0 auto;
    place-items: center;
    margin-left: -5px;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--teal-800);
    font-size: 8px;
    font-weight: 800;
}

.mini-avatar-more {
    color: var(--teal-900);
    background: #dcebea;
}

.kanban-card-meta {
    color: var(--muted);
    font-size: 9px;
}

.kanban-card-meta strong {
    color: var(--teal-900);
}

.quick-note-panel {
    margin-bottom: 20px;
}

.quick-note-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 20px;
    cursor: pointer;
    list-style: none;
}

.quick-note-panel > summary::-webkit-details-marker {
    display: none;
}

.quick-note-panel > summary > span:first-child {
    display: grid;
    gap: 3px;
}

.quick-note-panel > summary small {
    color: var(--muted);
}

.compact-note-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.compact-note {
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--teal-50);
}

.compact-note strong {
    font-size: 11px;
}

.compact-note p {
    display: -webkit-box;
    margin: 5px 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.compact-note span {
    color: var(--muted);
    font-size: 8px;
}

.assignee-grid {
    display: grid;
    max-height: 330px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 4px;
    overflow-y: auto;
}

.assignee-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.assignee-option:has(input:checked) {
    border-color: #8db7b2;
    background: var(--teal-50);
}

.assignee-option input {
    accent-color: var(--teal-900);
}

.assignee-option > span:last-child {
    display: grid;
    min-width: 0;
}

.assignee-option strong,
.assignee-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignee-option strong {
    font-size: 10px;
}

.assignee-option small {
    color: var(--muted);
    font-size: 8px;
}

.document-library-filters {
    display: grid;
    grid-template-columns: minmax(300px, 1.7fr) repeat(4, minmax(140px, .75fr)) auto;
    align-items: end;
    gap: 10px;
}

.document-folder-section {
    margin-bottom: 26px;
}

.library-folder-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.library-folder {
    position: relative;
    display: grid;
    min-height: 128px;
    grid-template-columns: 35px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 19px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: #fff;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease;
}

.library-folder:hover,
.library-folder.is-active {
    border-color: #8db5b1;
    transform: translateY(-2px);
}

.library-folder::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    content: "";
    background: var(--orange);
}

.library-folder-mark,
.document-group-folder {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 24px;
    margin-top: 4px;
    border-radius: 3px;
    background: #f5aa18;
}

.library-folder-mark::before,
.document-group-folder::before {
    position: absolute;
    top: -5px;
    left: 2px;
    width: 14px;
    height: 7px;
    border-radius: 3px 3px 0 0;
    content: "";
    background: #f5aa18;
}

.library-folder > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.library-folder strong {
    font-size: 12px;
}

.library-folder span small {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.library-folder > b {
    grid-column: 2;
    color: var(--teal-900);
    font-size: 18px;
}

.library-folder > b small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 550;
}

.document-results-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 13px;
}

.document-results-heading h2 {
    margin: 0;
    font-size: 20px;
}

.search-query-pill {
    max-width: 45%;
    padding: 5px 9px;
    overflow: hidden;
    border-radius: 999px;
    color: var(--teal-900);
    background: var(--teal-50);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-group-stack {
    display: grid;
    gap: 16px;
}

.document-group {
    overflow: hidden;
}

.document-group-header {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, #fff, var(--teal-50));
}

.document-group-header > div {
    display: grid;
    gap: 2px;
}

.document-group-header h2 {
    margin: 0;
    font-size: 16px;
}

.document-group-header span {
    color: var(--muted);
    font-size: 9px;
}

.document-name-cell {
    display: flex;
    min-width: 260px;
    align-items: center;
    gap: 10px;
}

.document-name-cell > span:last-child {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.document-name-cell strong,
.document-name-cell small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-name-cell small {
    color: var(--muted);
    font-size: 9px;
}

.file-type-icon {
    display: grid;
    width: 34px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 5px;
    color: #fff;
    background: #6e8583;
    font-size: 8px;
    font-weight: 850;
}

.file-type-icon.type-pdf {
    background: #dc4d43;
}

.file-type-icon.type-word {
    background: #3478b9;
}

.file-type-icon.type-excel {
    background: #2b9760;
}

.file-type-icon.type-image {
    background: #9a5fa7;
}

.leave-page-header {
    margin-bottom: 18px;
}

.leave-policy-strip {
    display: grid;
    grid-template-columns: minmax(260px, 1.25fr) repeat(3, minmax(125px, .55fr)) minmax(180px, .7fr);
    align-items: stretch;
    margin-bottom: 18px;
    overflow: hidden;
    border: 1px solid #bcd2cf;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0b3e43, #176269);
    box-shadow: var(--shadow-sm);
}

.leave-policy-heading,
.leave-policy-item,
.leave-policy-total {
    min-width: 0;
    padding: 18px 20px;
    border-right: 1px solid rgba(255, 255, 255, .13);
    color: #fff;
}

.leave-policy-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leave-policy-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    color: var(--teal-950);
    background: #fff;
    font-size: 11px;
    font-weight: 850;
}

.leave-policy-heading div,
.leave-policy-item {
    display: grid;
    gap: 2px;
}

.leave-policy-heading small,
.leave-policy-item span {
    color: rgba(255, 255, 255, .68);
    font-size: 10px;
}

.leave-policy-item strong {
    font-size: 25px;
    line-height: 1;
}

.leave-policy-item.policy-paid strong {
    color: #b8e7d1;
}

.leave-policy-item.policy-unpaid strong {
    color: #ffc0b7;
}

.leave-policy-total {
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 0;
    color: rgba(255, 255, 255, .75);
    font-size: 11px;
    text-align: center;
}

.leave-policy-total strong {
    margin-left: 4px;
    color: #fff;
}

.leave-filter-card {
    margin-bottom: 18px;
    padding: 17px 19px;
}

.leave-filter-bar {
    display: grid;
    grid-template-columns: minmax(145px, .35fr) minmax(280px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.leave-user-filter {
    max-width: 560px;
}

.leave-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.leave-stat-card {
    --leave-accent: var(--teal-900);
    position: relative;
    display: grid;
    min-height: 158px;
    align-content: space-between;
    gap: 14px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.leave-stat-card::after {
    position: absolute;
    right: -30px;
    bottom: -47px;
    width: 118px;
    height: 118px;
    border: 16px solid color-mix(in srgb, var(--leave-accent) 15%, transparent);
    border-radius: 50%;
    content: "";
}

.leave-stat-card > div {
    display: grid;
    gap: 2px;
}

.leave-stat-card > div > span {
    color: var(--leave-accent);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.leave-stat-card > div > small {
    color: var(--muted);
    font-size: 11px;
}

.leave-stat-card > strong {
    position: relative;
    z-index: 1;
    color: var(--leave-accent);
    font-size: 36px;
    line-height: 1;
    letter-spacing: -.04em;
}

.leave-stat-card > strong small {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0;
}

.leave-stat-foot {
    position: relative;
    z-index: 1;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.leave-stat-blue {
    --leave-accent: #176784;
}

.leave-stat-orange {
    --leave-accent: #d87612;
}

.leave-stat-green {
    --leave-accent: #4a7f41;
}

.leave-stat-brown {
    --leave-accent: #8b4b28;
}

.leave-stat-brown.is-danger {
    --leave-accent: #b13b36;
    border-color: #efc7c3;
    background: linear-gradient(145deg, #fff, #fff4f2);
}

.leave-person-overview,
.leave-team-card,
.leave-records-card {
    margin-bottom: 18px;
    overflow: hidden;
}

.leave-person-overview.has-medical-warning {
    border-color: #e6b4ad;
}

.leave-person-overview .card-header,
.leave-team-card .card-header,
.leave-records-card .card-header {
    min-height: 78px;
}

.leave-entitlement-overview {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(440px, 1.35fr);
}

.leave-entitlement-panel {
    display: grid;
    align-content: start;
    gap: 17px;
    padding: 23px;
}

.leave-entitlement-panel + .leave-entitlement-panel {
    border-left: 1px solid var(--line);
}

.leave-entitlement-title {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.leave-entitlement-title > div {
    display: grid;
    gap: 2px;
}

.leave-entitlement-title > div strong {
    font-size: 14px;
}

.leave-entitlement-title > div small,
.leave-entitlement-title > b {
    color: var(--muted);
    font-size: 10px;
}

.leave-entitlement-title > b {
    color: var(--teal-900);
}

.leave-entitlement-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: var(--teal-800);
    font-size: 10px;
    font-weight: 850;
}

.mark-annual {
    background: #176784;
}

.mark-medical {
    background: #4a7f41;
}

.leave-progress {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #e7eeed;
    appearance: none;
}

.leave-progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e7eeed;
}

.leave-progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--teal-800);
}

.leave-progress::-moz-progress-bar {
    border-radius: 999px;
    background: var(--teal-800);
}

.progress-annual::-webkit-progress-value {
    background: linear-gradient(90deg, #176784, #2292a3);
}

.progress-annual::-moz-progress-bar {
    background: linear-gradient(90deg, #176784, #2292a3);
}

.progress-medical-paid::-webkit-progress-value {
    background: linear-gradient(90deg, #4a7f41, #76aa63);
}

.progress-medical-paid::-moz-progress-bar {
    background: linear-gradient(90deg, #4a7f41, #76aa63);
}

.progress-medical-unpaid::-webkit-progress-value {
    background: linear-gradient(90deg, #b13b36, #dc6259);
}

.progress-medical-unpaid::-moz-progress-bar {
    background: linear-gradient(90deg, #b13b36, #dc6259);
}

.medical-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.medical-progress-grid > div {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfc;
}

.medical-progress-grid .is-active-unpaid {
    border-color: #e6b4ad;
    background: #fff3f1;
}

.progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 9px;
}

.progress-label strong {
    color: var(--ink);
}

.leave-threshold-alert {
    display: grid;
    gap: 3px;
    padding: 11px 13px;
    border: 1px solid #edbbb5;
    border-radius: 10px;
    color: #8f312d;
    background: #fff0ee;
}

.leave-threshold-alert strong {
    font-size: 11px;
}

.leave-threshold-alert span {
    font-size: 9px;
}

.leave-threshold-alert.is-exceeded {
    color: #fff;
    background: #a93431;
}

.leave-overage {
    color: var(--red);
    font-size: 10px;
    font-weight: 750;
}

.leave-team-table {
    min-width: 1120px;
}

.leave-records-table {
    min-width: 880px;
}

.leave-team-table .is-selected-row td {
    background: var(--teal-50);
}

.leave-team-table .cell-title {
    text-decoration: none;
}

.leave-table-progress {
    display: grid;
    min-width: 130px;
    gap: 6px;
    color: var(--muted);
    font-size: 10px;
}

.leave-table-progress .leave-progress {
    height: 6px;
}

.medical-phase-pill {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.phase-paid {
    color: #3f7136;
    background: var(--green-100);
}

.phase-unpaid,
.phase-exceeded {
    color: #953632;
    background: var(--red-100);
}

.phase-exceeded {
    color: #fff;
    background: var(--red);
}

.text-success {
    color: var(--green);
}

.text-danger {
    color: var(--red);
}

.leave-type-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 5px 9px;
    border-radius: 8px;
    color: #145a6f;
    background: #e6f2f7;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.leave-type-badge.type-medical {
    color: #9a3e3e;
    background: #fbe7e7;
}

.leave-type-badge.type-excuse,
.leave-type-badge.type-administrative {
    color: #8b5414;
    background: var(--orange-100);
}

.leave-type-badge.type-unpaid,
.leave-type-badge.type-other {
    color: #58696b;
    background: #edf1f0;
}

.leave-status-approved {
    color: #355d27;
    background: var(--green-100);
}

.leave-status-planned {
    color: #8b5414;
    background: var(--orange-100);
}

.leave-status-cancelled {
    color: #566668;
    background: #edf1f0;
}

.leave-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
    align-items: start;
    gap: 18px;
}

.leave-form-card {
    max-width: none;
    overflow: hidden;
}

.leave-form-section {
    display: grid;
    gap: 14px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.leave-form-section:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
}

.leave-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.leave-medical-policy-panel {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #badaca;
    border-radius: 12px;
    color: #355f45;
    background: #eef8f2;
}

.leave-medical-policy-panel[hidden] {
    display: none;
}

.leave-medical-policy-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: #4a7f41;
    font-size: 9px;
    font-weight: 850;
}

.leave-medical-policy-panel p {
    margin: 3px 0 0;
    font-size: 10px;
}

.leave-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 4px;
}

.leave-visibility-note {
    display: grid;
    max-width: 470px;
    gap: 2px;
}

.leave-visibility-note strong {
    font-size: 11px;
}

.leave-visibility-note span {
    color: var(--muted);
    font-size: 9px;
}

.leave-form-sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 14px;
}

.leave-usage-preview {
    overflow: hidden;
}

.leave-usage-preview.is-unpaid-phase,
.leave-usage-preview.is-exceeded-phase {
    border-color: #e5b7b1;
}

.leave-preview-person {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.leave-preview-person .mini-avatar {
    width: 38px;
    height: 38px;
    margin-left: 0;
}

.leave-preview-person > div {
    display: grid;
}

.leave-preview-person strong {
    font-size: 12px;
}

.leave-preview-person span {
    color: var(--muted);
    font-size: 8px;
}

.leave-preview-block {
    display: grid;
    gap: 7px;
    margin-bottom: 17px;
}

.leave-preview-block > small {
    color: var(--muted);
    font-size: 9px;
}

.leave-preview-unpaid {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfc;
}

.is-unpaid-phase .leave-preview-unpaid,
.is-exceeded-phase .leave-preview-unpaid {
    border-color: #e7b7b1;
    background: #fff1ef;
}

.leave-preview-status {
    display: grid;
    gap: 2px;
    padding: 11px;
    border-radius: 10px;
    color: #3b6a38;
    background: var(--green-100);
}

.is-unpaid-phase .leave-preview-status,
.is-exceeded-phase .leave-preview-status {
    color: #963632;
    background: var(--red-100);
}

.is-exceeded-phase .leave-preview-status {
    color: #fff;
    background: var(--red);
}

.leave-preview-status strong {
    font-size: 10px;
}

.leave-preview-status span {
    font-size: 8px;
}

.leave-policy-help ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.leave-policy-help li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
}

.leave-policy-help li:last-child {
    border-bottom: 0;
}

.leave-policy-help strong {
    color: var(--ink);
}

/* Archive and storage management */
.archive-page-header {
    align-items: flex-end;
}

.archive-create-button {
    min-width: 190px;
}

.archive-create-button span {
    font-size: 20px;
    line-height: 1;
}

.archive-overview-grid {
    display: grid;
    grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.archive-health-card,
.archive-metric-card {
    min-height: 138px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-sm);
}

.archive-health-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    color: #fff;
    border-color: transparent;
    background:
        radial-gradient(circle at 100% 0%, rgba(239, 146, 36, .18), transparent 36%),
        linear-gradient(145deg, var(--teal-800), var(--teal-950));
}

.archive-health-icon {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    border-radius: 16px;
    color: var(--teal-950);
    background: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
}

.archive-health-card div:last-child,
.archive-metric-card {
    display: grid;
    align-content: center;
    gap: 5px;
}

.archive-health-card span,
.archive-metric-card span {
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.archive-health-card span,
.archive-health-card small {
    color: rgba(255, 255, 255, .66);
}

.archive-health-card strong {
    font-size: 21px;
}

.archive-health-card small,
.archive-metric-card small {
    font-size: 10px;
}

.archive-metric-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.archive-metric-card::after {
    position: absolute;
    right: -28px;
    bottom: -46px;
    width: 112px;
    height: 112px;
    border: 16px solid rgba(11, 117, 128, .09);
    border-radius: 50%;
    content: "";
}

.archive-metric-card > * {
    position: relative;
    z-index: 1;
}

.archive-metric-card span {
    color: var(--muted);
}

.archive-metric-card strong {
    color: var(--teal-800);
    font-size: 31px;
    line-height: 1;
}

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

.archive-metric-card.metric-dedup strong {
    color: #3f8f50;
}

.archive-metric-card.metric-dedup::after {
    border-color: rgba(63, 143, 80, .1);
}

.archive-metric-card.metric-storage.is-warning strong,
.archive-metric-card.metric-storage.is-critical strong {
    color: #b93434;
}

.archive-metric-card.metric-storage.is-warning::after,
.archive-metric-card.metric-storage.is-critical::after {
    border-color: rgba(185, 52, 52, .1);
}

.archive-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.archive-history-card {
    min-width: 0;
}

.archive-table {
    min-width: 930px;
}

.archive-status,
.verified-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.archive-status.status-completed,
.verified-badge {
    color: #2e7139;
    background: #edf8e9;
}

.archive-status.status-completed_with_warnings {
    color: #8b5715;
    background: #fff3dc;
}

.archive-status.status-running {
    color: #0a6570;
    background: #e7f5f7;
}

.archive-status.status-failed {
    color: #a62f2f;
    background: #fdeaea;
}

.archive-warning-count {
    display: block;
    margin-top: 5px;
    color: #9a621b;
    font-size: 9px;
}

.archive-reuse-value strong {
    color: #2e7139;
}

.archive-reuse-value span {
    color: #3f8f50;
}

.archive-side-stack {
    display: grid;
    gap: 16px;
}

.archive-method-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0 20px 20px;
    list-style: none;
}

.archive-method-list li {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-soft);
}

.archive-method-list li:last-child {
    border-bottom: 0;
}

.archive-method-list li > span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    color: #7c4b10;
    background: var(--orange-soft);
    font-size: 10px;
    font-weight: 900;
}

.archive-method-list li div {
    display: grid;
    gap: 4px;
}

.archive-method-list strong {
    font-size: 12px;
}

.archive-method-list small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.archive-quota-form {
    display: grid;
    gap: 12px;
    padding: 0 20px 20px;
}

.archive-offsite-note {
    padding: 17px;
    border: 1px solid #f1d297;
    border-radius: 15px;
    color: #6f4818;
    background: #fff8e9;
}

.archive-offsite-note strong {
    font-size: 12px;
}

.archive-offsite-note p {
    margin: 6px 0 0;
    color: #8a672f;
    font-size: 10px;
    line-height: 1.6;
}

.archive-offsite-note form {
    margin-top: 12px;
}

@media (max-width: 1100px) {
    .archive-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .archive-content-grid {
        grid-template-columns: 1fr;
    }

    .archive-side-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .archive-offsite-note {
        grid-column: 1 / -1;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid,
    .detail-grid,
    .dashboard-timeline-grid {
        grid-template-columns: 1fr;
    }

    .folder-grid,
    .work-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-timeline-list {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .shared-work-row {
        grid-template-columns: 140px minmax(220px, 1fr) 80px auto;
    }

    .dashboard-folder-grid,
    .compact-note-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .upcoming-work-card {
        grid-column: 1 / -1;
    }

    .work-board-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .document-library-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .work-search-field,
    .document-search-field {
        grid-column: span 2;
    }

    .library-folder-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .assignee-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-policy-strip {
        grid-template-columns: minmax(260px, 1.2fr) repeat(3, minmax(115px, .55fr));
    }

    .leave-policy-total {
        grid-column: 1 / -1;
        border-top: 1px solid rgba(255, 255, 255, .13);
    }

    .leave-form-layout {
        grid-template-columns: 1fr;
    }

    .leave-form-sidebar {
        position: static;
        grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
    }
}

@media (max-width: 860px) {
    .sidebar {
        transform: translateX(-105%);
        transition: transform .2s ease;
    }

    .app-main {
        margin-left: 0;
    }

    .menu-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 35;
        inset: 0;
        border: 0;
        background: rgba(3, 30, 33, .52);
    }

    .menu-open .sidebar-backdrop {
        display: block;
    }

    .mobile-menu-button {
        display: grid;
        width: 42px;
        height: 42px;
        place-content: center;
        gap: 4px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #fff;
    }

    .mobile-menu-button span {
        width: 18px;
        height: 2px;
        background: var(--teal-900);
    }

    .topbar-context {
        margin-right: auto;
    }

    .login-shell,
    .install-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        min-height: 350px;
    }

    .login-meta {
        display: none;
    }

    .install-brand {
        min-height: 430px;
    }

    .install-brand img {
        margin-bottom: 40px;
    }

    .shared-work-row {
        grid-template-columns: minmax(130px, .55fr) minmax(0, 1.45fr) auto;
    }

    .shared-work-progress {
        justify-items: start;
    }

    .shared-work-row > :last-child {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .dashboard-analytics-grid {
        grid-template-columns: 1fr;
    }

    .upcoming-work-card {
        grid-column: auto;
    }

    .dashboard-summary-strip,
    .dashboard-folder-grid,
    .library-folder-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .document-library-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-filter-bar {
        grid-template-columns: minmax(130px, .4fr) minmax(240px, 1fr) auto;
    }

    .leave-policy-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .leave-policy-heading {
        grid-column: 1 / -1;
        border-bottom: 1px solid rgba(255, 255, 255, .13);
    }

    .leave-policy-total {
        grid-column: 1 / -1;
    }

    .leave-entitlement-overview {
        grid-template-columns: 1fr;
    }

    .leave-entitlement-panel + .leave-entitlement-panel {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

@media (max-width: 620px) {
    .archive-overview-grid,
    .archive-side-stack {
        grid-template-columns: 1fr;
    }

    .archive-health-card,
    .archive-metric-card {
        min-height: 118px;
    }

    .archive-create-button {
        width: 100%;
    }

    .archive-offsite-note {
        grid-column: auto;
    }

    .content {
        padding: 20px 14px 34px;
    }

    .topbar {
        min-height: 66px;
        padding: 10px 14px;
    }

    .topbar-context .eyebrow,
    .account-copy {
        display: none;
    }

    .topbar-context strong {
        font-size: 14px;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-actions .button {
        flex: 1;
    }

    .metrics-grid,
    .quick-actions,
    .form-grid,
    .folder-grid,
    .work-card-grid {
        grid-template-columns: 1fr;
    }

    .field-span-2,
    .field-span-3 {
        grid-column: 1;
    }

    .metric-card {
        min-height: 125px;
    }

    .definition-list {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .definition-list dd {
        margin-bottom: 10px;
    }

    .guest-page,
    .install-page {
        padding: 0;
    }

    .login-shell,
    .install-shell {
        min-height: 100vh;
        border-radius: 0;
    }

    .login-brand {
        min-height: 300px;
        padding: 30px;
    }

    .login-logo {
        width: 90px;
    }

    .login-form-panel,
    .install-card,
    .install-brand {
        padding: 30px 22px;
    }

    .install-brand {
        min-height: 380px;
    }

    .section-heading-inline,
    .report-header,
    .report-month-nav {
        align-items: stretch;
        flex-direction: column;
    }

    .shared-work-row {
        grid-template-columns: 1fr auto;
        gap: 10px 14px;
    }

    .shared-work-summary,
    .shared-work-row > :last-child {
        grid-column: 1 / -1;
    }

    .shared-work-progress {
        justify-items: end;
    }

    .work-timeline-row {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .work-timeline-row > progress {
        grid-column: 2;
    }

    .report-header,
    .report-days {
        padding-right: 20px;
        padding-left: 20px;
    }

    .report-total {
        justify-items: start;
    }

    .dashboard-folder-grid,
    .dashboard-summary-strip,
    .work-board-filters,
    .document-library-filters,
    .library-folder-grid,
    .assignee-grid,
    .compact-note-grid,
    .leave-summary-grid,
    .leave-filter-bar {
        grid-template-columns: 1fr;
    }

    .leave-user-filter {
        max-width: none;
    }

    .leave-filter-bar .button {
        width: 100%;
    }

    .leave-stat-card {
        min-height: 122px;
    }

    .leave-policy-strip,
    .leave-form-sidebar,
    .leave-entry-grid,
    .medical-progress-grid {
        grid-template-columns: 1fr;
    }

    .leave-policy-heading,
    .leave-policy-total {
        grid-column: auto;
    }

    .leave-policy-heading,
    .leave-policy-item,
    .leave-policy-total {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .13);
    }

    .leave-policy-total {
        justify-content: flex-start;
        text-align: left;
    }

    .leave-policy-total:last-child {
        border-bottom: 0;
    }

    .leave-entitlement-title {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .leave-entitlement-title > b {
        grid-column: 2;
    }

    .leave-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .leave-form-footer .button {
        width: 100%;
    }

    .work-search-field,
    .document-search-field {
        grid-column: auto;
    }

    .dashboard-summary-strip article {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }

    .dashboard-summary-strip article:last-child {
        border-bottom: 0;
    }

    .work-status-body {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-wrap: wrap;
    }

    .filter-actions .button {
        flex: 1;
    }

    .filter-result-note {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .filter-result-note .privacy-pill {
        margin-left: 0;
    }

    .kanban-board {
        grid-template-columns: repeat(4, minmax(82vw, 1fr));
    }

    .chart-wrap {
        overflow-x: auto;
    }

    .monthly-bar-chart {
        min-width: 620px;
    }

    .document-group-header {
        grid-template-columns: 35px minmax(0, 1fr);
    }

    .document-group-header .text-button {
        grid-column: 2;
        justify-self: start;
    }
}

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

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    body {
        color: #111;
        background: #fff;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .sidebar,
    .topbar,
    .sidebar-backdrop,
    .no-print {
        display: none !important;
    }

    .app-main {
        margin: 0;
    }

    .content {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .monthly-report {
        overflow: visible;
        border: 0;
        box-shadow: none;
    }

    .report-header {
        padding: 18px 20px;
    }

    .report-days {
        padding: 6px 20px 20px;
    }

    .report-day {
        padding: 10px 0;
    }
}

/* v1.6 · language, profile photo and administrator record controls */
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid #c8d9d5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(13, 69, 73, 0.1);
}

.language-switcher form {
    display: contents;
}

.language-button {
    min-width: 42px;
    min-height: 34px;
    padding: 6px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--teal-800);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.language-button:hover,
.language-button:focus-visible {
    color: var(--green);
    background: var(--green-100);
}

.language-button.is-active {
    color: #fff;
    background: var(--green);
    box-shadow: 0 6px 14px rgba(77, 125, 57, .28);
    transform: translateY(-1px);
}

.guest-language-switcher {
    position: fixed;
    top: 20px;
    right: 22px;
    z-index: 20;
}

.avatar.has-photo {
    overflow: hidden;
    padding: 0;
    background: var(--surface-soft);
}

.avatar.has-photo img,
.user-list-avatar.has-photo img,
.profile-photo-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.profile-photo-editor {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 18px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(13, 69, 73, 0.05), rgba(241, 151, 35, 0.06));
}

.profile-photo-preview {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 4px solid #fff;
    border-radius: 30px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 30px rgba(13, 69, 73, 0.18);
    font-size: 1.65rem;
    font-weight: 850;
}

.profile-photo-copy {
    min-width: 0;
}

.profile-photo-copy > strong {
    color: var(--ink);
    font-size: 1.04rem;
}

.profile-photo-copy > p {
    margin: 5px 0 12px;
    color: var(--muted);
    font-size: 0.84rem;
}

.profile-photo-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.profile-photo-file {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.profile-photo-file input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.profile-photo-filename {
    max-width: 220px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-details-form {
    padding-top: 2px;
}

.text-button-danger {
    margin-top: 9px;
    color: var(--danger);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 220px;
}

.user-list-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    flex: 0 0 42px;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    background: var(--surface-soft);
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 850;
}

.report-admin-card {
    margin-top: 20px;
}

.table-note-preview {
    display: block;
    min-width: 220px;
    max-width: 420px;
    color: var(--muted);
    line-height: 1.45;
}

@media (max-width: 760px) {
    .topbar-actions {
        gap: 8px;
    }

    .topbar .language-switcher {
        padding: 3px;
    }

    .topbar .language-button {
        min-width: 38px;
        min-height: 32px;
        padding: 5px 8px;
        font-size: 0.7rem;
    }

    .profile-photo-editor {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .profile-photo-actions {
        justify-content: center;
    }

    .guest-language-switcher {
        top: 12px;
        right: 12px;
    }
}
