:root {
    color-scheme: light;
    --ink: #242336;
    --muted: #8c8b9c;
    --muted-dark: #68677a;
    --paper: #fff;
    --canvas: #f5f6f8;
    --line: #ededf1;
    --violet: #8574e8;
    --violet-dark: #7161d4;
    --violet-soft: #f1efff;
    --green: #53a985;
    --red: #d66d79;
    --shadow: 0 18px 60px rgba(35, 32, 72, .08);
    --sidebar-surface: #ffffff;
    --sidebar-hover: #f7f6fb;
    --sidebar-active: #f0edff;
    --sidebar-active-ink: #6355b6;
    --sidebar-divider: #ececf0;
    font-family: "DM Sans", "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(133, 116, 232, .28); outline-offset: 3px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 800 25px/1 "Manrope", sans-serif; letter-spacing: -1.5px; text-decoration: none; }
.brand-period, .heading-period { color: var(--violet); }
.brand-mark { display: grid; grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 3px; transform: rotate(-9deg); }
.brand-mark span { display: block; border-radius: 3px; background: var(--violet); }
.brand-mark span:nth-child(2) { opacity: .63; }
.brand-mark span:nth-child(3) { opacity: .78; }
.brand-mark span:nth-child(4) { opacity: .38; }

/* Login */
.login-screen { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; padding: 36px 20px; background: #f4f3fb; }
.login-screen::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 18% 15%, rgba(222, 217, 255, .6), transparent 38%), radial-gradient(ellipse at 84% 88%, rgba(218, 236, 232, .58), transparent 38%); pointer-events: none; }
.login-decoration { position: absolute; border: 1px solid rgba(133, 116, 232, .12); border-radius: 50%; pointer-events: none; }
.decoration-one { width: 470px; height: 470px; top: -275px; right: -105px; box-shadow: 0 0 0 40px rgba(133, 116, 232, .025), 0 0 0 80px rgba(133, 116, 232, .02); }
.decoration-two { width: 280px; height: 280px; bottom: -195px; left: 6%; box-shadow: 0 0 0 35px rgba(133, 116, 232, .025); }
.login-card { width: min(100%, 460px); position: relative; z-index: 1; padding: 45px 48px 30px; background: rgba(255, 255, 255, .92); border: 1px solid rgba(255, 255, 255, .92); border-radius: 20px; box-shadow: 0 30px 100px rgba(55, 49, 103, .12); backdrop-filter: blur(14px); }
.login-brand { margin-bottom: 55px; }
.login-intro .eyebrow, .eyebrow { display: flex; align-items: center; gap: 8px; color: #9694a9; font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #edf7f1; }
.login-intro h1 { margin: 20px 0 10px; font: 700 38px/1.16 "Manrope", sans-serif; letter-spacing: -1.8px; }
.login-intro p { margin: 0 0 31px; color: var(--muted); font-size: 13px; }
.form-stack { display: flex; flex-direction: column; gap: 9px; }
.form-stack label, .modal-form > label, .form-row label { margin-top: 9px; color: #68677a; font-size: 11px; font-weight: 700; }
.form-stack .terms-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; color: #68677a; font-size: 11px; font-weight: 400; line-height: 1.5; }
.terms-consent input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--violet); }
.terms-consent a { color: var(--violet-dark); }
.creator-credit { margin: 9px 0 0; color: #aaa8b8; font-size: 10px; text-align: center; }
.input-wrap { height: 47px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid #e9e8ef; border-radius: 8px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.input-wrap:focus-within { border-color: #aa9eea; box-shadow: 0 0 0 3px rgba(133, 116, 232, .09); }
.input-icon { width: 16px; color: #a4a1b5; font-size: 17px; text-align: center; }
.input-wrap input { flex: 1; width: 0; height: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.input-wrap input::placeholder { color: #bab9c6; }
.password-toggle { border: 0; padding: 5px 0 5px 5px; color: #9694a9; background: transparent; font-size: 10px; cursor: pointer; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; padding: 0 18px; border: 0; border-radius: 7px; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--violet); box-shadow: 0 6px 16px rgba(113, 97, 212, .2); }
.button-primary:hover { background: var(--violet-dark); box-shadow: 0 8px 18px rgba(113, 97, 212, .25); }
.button-primary:disabled { opacity: .6; cursor: wait; transform: none; }
.login-submit { width: 100%; justify-content: space-between; margin-top: 15px; padding: 0 17px; }
.login-submit span:last-child { font-size: 15px; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 25px 0 0; color: #aaa8b8; font-size: 10px; }
.lock-icon { color: #9893d2; }
.form-error { margin: 3px 0 0; color: #bd5361; font-size: 11px; }
.form-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-stack > input { width: 100%; min-height: 42px; padding: 10px 11px; border: 1px solid #e9e8ef; border-radius: 7px; color: var(--ink); background: #fff; }
.login-switch { display: block; margin: 15px auto 0; padding: 6px 10px; border: 0; color: var(--violet-dark); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.login-switch:hover { text-decoration: underline; }

/* Application frame */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); background: var(--canvas); }
.sidebar { min-height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; padding: 23px 13px 13px; border-right: 1px solid var(--sidebar-divider); background: var(--sidebar-surface); }
.sidebar-brand { margin-bottom: 27px; padding: 0 8px; font-size: 22px; }
.sidebar-brand .brand-mark { transform: scale(.88) rotate(-9deg); transform-origin: left center; }
.workspace-label { height: 54px; display: flex; align-items: center; gap: 10px; margin: 33px 3px 31px; padding: 0 10px; border: 1px solid #efeff3; border-radius: 8px; background: #fdfdfe; }
.workspace-avatar, .profile-avatar, .browser-avatar { display: grid; place-items: center; flex: 0 0 auto; color: #6455ba; background: #efedff; font: 700 11px "Manrope", sans-serif; }
.workspace-avatar { width: 28px; height: 28px; border-radius: 8px; }
.workspace-label > span:nth-child(2), .sidebar-profile > span:nth-child(2), .account-card > span:first-child { display: grid; gap: 3px; }
.workspace-label strong, .sidebar-profile strong, .account-card strong { font-size: 10px; }
.workspace-label small, .sidebar-profile small, .account-card small { color: #a3a2b1; font-size: 9px; }
.sidebar-mode-navigation { display: grid; gap: 4px; margin: 0 0 22px; padding-bottom: 17px; border-bottom: 1px solid var(--sidebar-divider); }
.sidebar-mode-button { min-height: 40px; position: relative; display: flex; align-items: center; gap: 11px; padding: 0 11px; border: 0; border-radius: 8px; color: var(--muted-dark); background: transparent; font-size: 11px; text-align: left; cursor: pointer; transition: color .16s ease, background .16s ease; }
.sidebar-mode-button > span { width: 17px; color: #9895ab; font-size: 13px; text-align: center; }
.sidebar-mode-button:hover { color: var(--ink); background: var(--sidebar-hover); }
.sidebar-mode-button.is-active { color: var(--sidebar-active-ink); background: var(--sidebar-active); font-weight: 700; }
.sidebar-mode-button.is-active::before { width: 3px; height: 19px; position: absolute; left: 0; border-radius: 0 3px 3px 0; background: var(--violet); content: ""; }
.side-section-heading { min-height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; color: #9493a2; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.side-section-heading .count-pill { font-size: 9px; letter-spacing: 0; }
.icon-button { display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.tiny-add { width: 23px; height: 23px; border-radius: 5px; color: #8b80d2; font-size: 18px; }
.tiny-add:hover { background: var(--violet-soft); }
.list-navigation { display: grid; gap: 4px; margin-top: 7px; }
.document-navigation { gap: 3px; }
.document-navigation-item { min-width: 0; display: flex; align-items: center; gap: 3px; }
.side-list { min-width: 0; height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 9px; border: 0; border-radius: 8px; color: var(--muted-dark); background: transparent; text-align: left; cursor: pointer; transition: color .16s ease, background .16s ease; }
.side-list:hover { color: var(--ink); background: var(--sidebar-hover); }
.side-list.is-active { color: var(--sidebar-active-ink); background: var(--sidebar-active); }
.side-list-name { min-width: 0; flex: 1; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.side-list-count { color: #aaa8b7; font-size: 9px; }
.list-color-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--violet); }
.color-violet { background: #8a79e6; }.color-blue { background: #69a7de; }.color-green { background: #71b794; }.color-orange { background: #e49b69; }
.sidebar-add-list { display: flex; align-items: center; gap: 8px; margin: 12px 5px 0; padding: 8px; border: 0; color: #9997a7; background: transparent; font-size: 10px; text-align: left; cursor: pointer; }
.sidebar-add-list #sidebar-add-icon { font-size: 15px; }
.sidebar-add-list:hover { color: var(--violet-dark); }
.sidebar-bottom { display: grid; gap: 2px; margin-top: auto; }
.sidebar-contact, .sidebar-settings, .sidebar-logout { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 9px; border: 0; border-radius: 8px; color: var(--muted-dark); background: transparent; font-size: 11px; text-align: left; cursor: pointer; transition: color .16s ease, background .16s ease; }
.sidebar-contact:hover, .sidebar-settings:hover, .sidebar-logout:hover, .sidebar-contact.is-active { color: var(--sidebar-active-ink); background: var(--sidebar-hover); }
.settings-icon { width: 15px; color: #9895ab; font-size: 14px; text-align: center; }
.settings-arrow { margin-left: auto; color: #aeacba; }
.sidebar-logout { color: #9997a7; }
.sidebar-logout > span { width: 15px; font-size: 15px; text-align: center; }
.sidebar-contact > span:first-child { width: 15px; flex: 0 0 15px; text-align: center; }
.sidebar-profile { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 10px; margin-top: 9px; padding: 8px; border: 1px solid transparent; border-top-color: var(--sidebar-divider); border-radius: 9px; color: inherit; background: transparent; text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.sidebar-profile:hover { border-color: var(--sidebar-divider); background: var(--sidebar-hover); }
.sidebar-profile:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.profile-avatar { width: 34px; height: 34px; border-radius: 50%; }
.profile-settings-icon { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; margin-left: auto; border-radius: 7px; color: #9895ab; font-size: 13px; transition: color .16s ease, background .16s ease; }
.sidebar-profile:hover .profile-settings-icon { color: var(--sidebar-active-ink); background: var(--sidebar-active); }

.browser { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.browser-chrome { height: 48px; display: flex; align-items: center; gap: 18px; padding: 0 22px; border-bottom: 1px solid #e9e9ee; background: #fbfbfc; }
.browser-section-label { margin-left: auto; color: #aaa8b5; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.browser-avatar { width: 25px; height: 25px; border: 0; border-radius: 50%; cursor: pointer; }
.tab-strip { height: 43px; display: flex; align-items: flex-end; gap: 4px; padding: 0 22px; border-bottom: 1px solid #e9e9ee; background: #f9f9fb; }
.view-navigation, .task-tab-group { min-width: 0; height: 100%; display: flex; align-items: flex-end; gap: 5px; }
.view-tab { min-height: 33px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; color: #92909f; background: transparent; font-size: 11px; cursor: pointer; }
.view-tab:hover { background: #f3f2f8; }
.view-tab.is-active { border-color: #e9e9ee; color: #58566d; background: #fff; }
.nav-count { min-width: 17px; display: inline-grid; place-items: center; padding: 2px 5px; border-radius: 10px; color: #7869cb; background: #f0eeff; font-size: 9px; }
.list-tabs { min-width: 0; display: flex; align-self: stretch; align-items: flex-end; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.list-tabs::-webkit-scrollbar { display: none; }
.browser-tab { max-width: 185px; height: 33px; display: flex; flex: 0 1 158px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; color: #92909f; background: transparent; font-size: 9px; cursor: pointer; }
.browser-tab:hover { background: #f3f2f8; }
.browser-tab.is-active { border-color: #e9e9ee; color: #58566d; background: #fff; }
.browser-tab-name { min-width: 0; flex: 1; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.browser-tab-count { color: #aaa8b6; font-size: 8px; }
.tab-add-button { width: 24px; height: 25px; flex: 0 0 auto; margin-bottom: 4px; border: 0; border-radius: 5px; color: #9693a5; background: transparent; font-size: 16px; cursor: pointer; }
.tab-add-button:hover { color: var(--violet-dark); background: #eeecfa; }
.tab-strip-spacer { flex: 1; }
.browser-shortcut { display: flex; align-items: center; gap: 6px; align-self: center; color: #b4b2bf; font-size: 7px; font-weight: 700; letter-spacing: .7px; white-space: nowrap; }
.browser-shortcut kbd { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid #e8e7ed; border-radius: 4px; color: #9997a7; background: #fff; font: 8px "DM Sans", sans-serif; }
.workspace { width: min(100% - 88px, 1080px); flex: 1; margin: 0 auto; padding: 28px 0 18px; }
.documents-workspace, .admin-workspace { width: min(100% - 88px, 1080px); margin: 0 auto; padding: 36px 0; }
.app-version-footer { min-height: 42px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 24px; color: #a4a2b1; font-size: 10px; }
.app-version-footer span:last-child { color: #777587; font-weight: 700; }
.documents-heading, .admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.documents-heading h1, .admin-heading h1 { margin: 8px 0 0; font: 700 clamp(29px, 3vw, 39px)/1.15 "Manrope", sans-serif; letter-spacing: -1.8px; }
.documents-heading p, .admin-heading p { margin: 8px 0 0; color: #9a98a8; font-size: 14px; }
.documents-layout { min-height: 540px; display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border: 1px solid #ececf1; border-radius: 10px; background: #fff; box-shadow: 0 7px 24px rgba(36, 35, 54, .025); }
.documents-sidebar { display: none; padding: 16px 12px; border-right: 1px solid #f0eff3; background: #fcfbfe; }
.documents-sidebar-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 12px; font-size: 13px; }
.document-link { min-width: 0; min-height: 36px; flex: 1; overflow: hidden; padding: 8px 9px; border: 0; border-radius: 6px; color: #777587; background: transparent; font-size: 11px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.document-link:hover { background: #f5f3fb; }
.document-link.is-active { color: #6355b6; background: #f1efff; font-weight: 700; }
.document-navigation-delete { width: 25px; height: 27px; flex: 0 0 auto; border: 0; border-radius: 5px; color: #a4a1b2; background: transparent; font-size: 17px; cursor: pointer; }
.document-navigation-delete:hover { color: #bd5c68; background: #fff0f1; }
.document-navigation-item:hover .document-navigation-delete { color: #bd5c68; }
.document-editor-panel { min-width: 0; display: flex; flex-direction: column; }
.document-editor-heading { min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid #f0eff3; }
.document-editor-heading > input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font: 700 18px "Manrope", sans-serif; }
.document-editor-heading > input:disabled { display: none; }
.document-editor-heading > span { color: #9a98a8; font-size: 11px; }
.editor-toolbar { min-height: 43px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 6px 16px; border-bottom: 1px solid #f0eff3; }
.editor-toolbar button { min-height: 29px; padding: 0 8px; border: 0; border-radius: 5px; color: #69677d; background: transparent; font-size: 11px; cursor: pointer; }
.editor-toolbar button:hover { color: var(--violet-dark); background: var(--violet-soft); }
.editor-toolbar button.is-active { color: var(--violet-dark); background: var(--violet-soft); }
.toolbar-divider { height: 20px; margin: 0 4px; border-left: 1px solid #e9e8ef; }
.document-editor { min-height: 430px; flex: 1; padding: 24px 28px; outline: 0; color: var(--ink); font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.document-editor:empty::before { color: #aaa8b6; content: attr(data-placeholder); pointer-events: none; }
.document-editor h1, .document-editor h2, .document-editor h3 { font-family: "Manrope", sans-serif; line-height: 1.3; }
.document-editor h1 { font-size: 28px; }.document-editor h2 { font-size: 22px; }.document-editor h3 { font-size: 18px; }
.document-editor blockquote { margin: 14px 0; padding: 3px 0 3px 14px; border-left: 3px solid var(--violet); color: #777587; }
.document-editor a { color: var(--violet-dark); }
.document-empty-state { min-height: 430px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.document-empty-state strong { margin-top: 12px; font: 700 15px "Manrope", sans-serif; }
.document-empty-state p, .feedback-section > p { margin: 7px 0 0; color: #9a98a8; font-size: 12px; }
.summary-workspace { max-width: 900px; }
.summary-experiment-badge { display: inline-flex; align-items: center; margin-bottom: 8px; padding: 4px 10px; border: 1px solid rgba(194, 132, 46, .22); border-radius: 999px; color: #8b5b16; background: #fff3d9; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.summary-panel { padding: 24px; border: 1px solid #ececf1; border-radius: 10px; background: #fff; box-shadow: 0 7px 24px rgba(36, 35, 54, .025); }
.summary-form { display: grid; justify-items: start; gap: 15px; }
.summary-drop-zone { width: 100%; min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 26px; border: 1px dashed #c9c4e5; border-radius: 9px; color: #888598; background: #fbfaff; text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.summary-drop-zone:hover, .summary-drop-zone.is-dragging { border-color: var(--violet); background: #f5f3ff; }
.summary-drop-zone strong { color: var(--ink); font: 700 16px "Manrope", sans-serif; }
.summary-drop-zone > span:not(.summary-upload-icon) { font-size: 12px; }
.summary-upload-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--violet-dark); background: var(--violet-soft); font-size: 23px; }
.summary-drop-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.summary-drop-zone:focus-within { outline: 2px solid var(--violet); outline-offset: 3px; }
.summary-file-name { color: var(--ink); font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.summary-privacy-note { margin: 0; color: #8c899c; font-size: 11px; line-height: 1.6; }
.summary-status { margin-top: 20px; padding: 14px; border-radius: 7px; color: #5d5686; background: #f4f2ff; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.summary-result { margin-top: 26px; padding-top: 22px; border-top: 1px solid #efedf4; }
.summary-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.summary-result-heading h2 { margin: 6px 0 0; font: 700 22px "Manrope", sans-serif; }
.summary-downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.summary-preview { padding: 22px; border: 1px solid #efedf4; border-radius: 8px; color: var(--ink); background: #fff; line-height: 1.75; overflow-wrap: anywhere; }
.summary-preview h3 { margin: 20px 0 7px; color: #6355b6; font: 700 15px "Manrope", sans-serif; }
.summary-preview h3:first-child { margin-top: 0; }
.summary-preview p { margin: 5px 0; white-space: pre-wrap; }
.admin-heading { margin-bottom: 22px; }
.admin-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.summary-card { display: grid; gap: 10px; padding: 20px; border: 1px solid #ececf1; border-radius: 9px; background: #fff; box-shadow: 0 5px 18px rgba(36, 35, 54, .025); }
.summary-card span { color: #898799; font-size: 12px; }
.summary-card strong { color: #6155ae; font: 700 28px "Manrope", sans-serif; }
.admin-panel { overflow: hidden; border: 1px solid #ececf1; border-radius: 9px; background: #fff; }
.admin-panel-heading { min-height: 57px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid #f0eff3; }
.admin-panel-heading h2 { margin: 0; font: 700 15px "Manrope", sans-serif; }
.admin-panel-heading p { margin: 5px 0 0; color: #92909f; font-size: 11px; }
.admin-panel-heading h3 { margin: 0; font: 700 13px "Manrope", sans-serif; }
.admin-panel-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.admin-panel-heading > .button { margin-left: auto; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 13px 14px; border-bottom: 1px solid #f0eff3; font-size: 12px; white-space: nowrap; }
.admin-table th { color: #858395; background: #fcfbfe; font-size: 10px; letter-spacing: .3px; }
.admin-table td:first-child { font-weight: 700; }
.admin-row-actions { display: flex; align-items: center; gap: 10px; }
.admin-role-select { min-width: 120px; }
.admin-action { padding: 6px 8px; border: 0; border-radius: 5px; color: #7064bd; background: transparent; font-size: 11px; cursor: pointer; }
.admin-action:hover { background: #f3f1fc; }
.admin-action.danger { color: #bd5c68; }
.admin-empty { padding: 28px 18px; color: #858395; font-size: 13px; }
.admin-feedback-list { display: grid; gap: 12px; padding: 16px; }
.admin-feedback-chart { min-height: 150px; display: flex; align-items: center; gap: 30px; padding: 20px 22px; border-bottom: 1px solid #f0eff3; }
.feedback-donut { width: 112px; height: 112px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; }
.feedback-donut-center { width: 76px; height: 76px; display: grid; align-content: center; justify-items: center; border-radius: 50%; color: var(--ink); background: #fff; }
.feedback-donut-center strong { font: 700 22px "Manrope", sans-serif; }
.feedback-donut-center span { color: #92909f; font-size: 9px; }
.feedback-chart-legend { display: grid; gap: 11px; }
.feedback-chart-legend-item { min-width: 148px; display: flex; align-items: center; gap: 9px; color: #68677a; font-size: 11px; }
.feedback-chart-legend-item strong { margin-left: auto; color: var(--ink); font-size: 13px; }
.feedback-status-swatch { width: 9px; height: 9px; border-radius: 50%; }
.feedback-status-swatch-new { background: #e66e79; }
.feedback-status-swatch-read { background: #e9a343; }
.feedback-status-swatch-resolved { background: #58a77b; }
.developer-message-panel { margin-bottom: 18px; }
.developer-message-form { display: grid; gap: 10px; padding: 16px 18px 18px; }
.developer-message-form label { color: #68677a; font-size: 12px; font-weight: 700; }
.app-version-field { width: fit-content; min-width: 180px; display: flex; align-items: center; gap: 4px; padding: 0 12px; border: 1px solid #e9e8ef; border-radius: 7px; color: #92909f; background: #fff; font-size: 13px; }
.app-version-field:focus-within { border-color: #a99dea; box-shadow: 0 0 0 3px rgba(133, 116, 232, .08); }
.app-version-field input { width: 150px; min-height: 40px; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.developer-message-form textarea { width: 100%; min-height: 82px; padding: 10px 12px; border: 1px solid #e9e8ef; border-radius: 7px; outline: 0; color: var(--ink); background: #fff; font-size: 13px; line-height: 1.5; resize: vertical; }
.developer-message-form textarea:focus { border-color: #a99dea; box-shadow: 0 0 0 3px rgba(133, 116, 232, .08); }
.developer-message-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.developer-message-actions > span { color: #92909f; font-size: 11px; }
.developer-message-popup { position: fixed; z-index: 19; right: 22px; bottom: 22px; width: min(360px, calc(100vw - 32px)); padding: 15px 17px; border: 1px solid #e8e5f2; border-radius: 10px; color: var(--ink); background: #fff; box-shadow: 0 12px 38px rgba(35, 32, 72, .18); animation: toast-in .22s ease both; }
.developer-message-popup-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.developer-message-popup-heading strong { font: 700 13px "Manrope", sans-serif; }
.developer-message-popup-heading button { width: 25px; height: 25px; display: grid; flex: 0 0 auto; place-items: center; padding: 0; appearance: none; border: 0; border-radius: 5px; color: #777587; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; }
.developer-message-popup-heading button:hover { color: var(--ink); background: #f3f1fc; }
.developer-message-popup p { margin: 9px 22px 0 0; color: var(--muted-dark); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-card { padding: 16px; border: 1px solid #efedf5; border-radius: 8px; background: #fff; }
.feedback-card-heading, .feedback-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feedback-card-heading h3 { margin: 0; font: 700 14px "Manrope", sans-serif; }
.feedback-card-heading span, .feedback-card-footer time { color: #92909f; font-size: 11px; }
.feedback-card > p { margin: 13px 0; color: #68677a; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.feedback-status-select { font-weight: 700; }
.feedback-status-new { border-color: #f0c8cc; color: #b54855; background: #fff0f1; }
.feedback-status-read { border-color: #f1d8ab; color: #96610f; background: #fff6e5; }
.feedback-status-resolved { border-color: #c6e3d1; color: #347a51; background: #edf8f1; }
.admin-workgroup-members { max-height: 250px; display: grid; gap: 6px; overflow-y: auto; padding: 8px; border: 1px solid #ecebf0; border-radius: 7px; }
.admin-workgroup-member-option { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 5px; cursor: pointer; }
.admin-workgroup-member-option:hover { background: #f8f7fc; }
.admin-workgroup-member-option input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--violet); }
.admin-workgroup-member-option > span { display: grid; gap: 3px; }
.admin-workgroup-member-option strong { color: var(--ink); font-size: 12px; }
.admin-workgroup-member-option small { color: #92909f; font-size: 10px; }
.contact-workspace { max-width: 800px; }
.contact-panel { padding: 24px; border: 1px solid #ececf1; border-radius: 10px; background: #fff; box-shadow: 0 7px 24px rgba(36, 35, 54, .025); }
.contact-form { display: grid; gap: 10px; }
.contact-form label { margin-top: 7px; color: #68677a; font-size: 12px; font-weight: 700; }
.contact-form input, .contact-form textarea { width: 100%; min-height: 42px; padding: 11px 12px; border: 1px solid #e9e8ef; border-radius: 7px; outline: 0; color: var(--ink); background: #fff; font: inherit; font-size: 13px; }
.contact-form textarea { resize: vertical; line-height: 1.6; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #a99dea; box-shadow: 0 0 0 3px rgba(133, 116, 232, .08); }
.contact-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.contact-form-footer > span { color: #92909f; font-size: 11px; line-height: 1.5; }
.admin-monitor-panel { display: grid; gap: 0; margin-bottom: 20px; overflow: hidden; border: 1px solid #ececf1; border-radius: 9px; background: #fff; box-shadow: 0 5px 18px rgba(36, 35, 54, .025); }
.admin-monitor-panel > .admin-panel-heading { justify-content: space-between; }
.admin-monitor-panel .admin-panel-heading > .button { margin-left: 0; }
.admin-monitor-status { padding: 12px 18px; color: #5d5686; background: #f5f3ff; font-size: 11px; }
.admin-monitor-status.is-healthy { color: #347a51; background: #edf8f1; }
.admin-monitor-status.is-warning { color: #96610f; background: #fff6e5; }
.admin-monitor-status.is-error { color: #a44751; background: #fff0f1; }
.admin-host-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.admin-monitor-metric { min-width: 0; display: grid; gap: 12px; padding: 15px; border: 1px solid #efedf5; border-radius: 8px; background: #fcfbff; }
.admin-monitor-metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #777587; font-size: 11px; }
.admin-monitor-metric-heading strong { color: var(--ink); font: 700 18px "Manrope", sans-serif; }
.admin-monitor-track { height: 7px; overflow: hidden; border-radius: 8px; background: #eeedf3; }
.admin-monitor-track span { height: 100%; display: block; border-radius: inherit; transition: width .25s ease; }
.admin-monitor-track .is-healthy { background: #58a77b; }
.admin-monitor-track .is-warning { background: #e9a343; }
.admin-monitor-track .is-critical { background: #e66e79; }
.admin-monitor-metric p { margin: 0; color: #92909f; font-size: 10px; overflow-wrap: anywhere; }
.admin-containers-section > .admin-panel-heading { min-height: 48px; }
.admin-container-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; }
.admin-container-card { min-width: 0; display: grid; gap: 10px; padding: 13px; border: 1px solid #efedf5; border-radius: 8px; background: #fcfbff; }
.admin-container-heading, .admin-container-usage { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-container-heading strong { min-width: 0; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-container-state { flex: 0 0 auto; padding: 4px 7px; border-radius: 10px; color: #777587; background: #eeedf3; font-size: 9px; }
.admin-container-state.is-running { color: #347a51; background: #edf8f1; }
.admin-container-image { margin: 0; overflow: hidden; color: #92909f; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-container-usage { justify-content: flex-start; flex-wrap: wrap; color: #68677a; font-size: 10px; }
.admin-monitor-note { margin: 0; padding: 0 16px 14px; color: #92909f; font-size: 10px; line-height: 1.5; }
#admin-user-name-fields { display: grid; gap: 8px; }
#admin-user-role-fields { display: grid; gap: 8px; }
#admin-user-name-fields label, #admin-user-role-fields label { margin-top: 9px; color: #68677a; font-size: 11px; font-weight: 700; }
.feedback-section > p { margin-bottom: 10px; }
.workspace-topline { display: flex; align-items: center; justify-content: space-between; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: #aaa8b5; font-size: 8px; font-weight: 700; letter-spacing: .85px; }
.breadcrumbs strong { color: #737183; font-weight: 600; letter-spacing: 0; }
.breadcrumb-divider { color: #d2d0dc; }
.today-label { color: #a3a1af; font-size: 9px; text-transform: capitalize; }
.welcome-block { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; padding: 33px 0 27px; }
.welcome-copy .eyebrow { margin-bottom: 12px; }
.welcome-copy h1 { margin: 0; font: 700 clamp(29px, 3vw, 39px)/1.15 "Manrope", sans-serif; letter-spacing: -1.8px; }
.welcome-copy p { margin: 8px 0 0; color: #9a98a8; font-size: 11px; }
.progress-card { width: 225px; flex: 0 0 auto; padding: 14px 15px 12px; border: 1px solid #efedf6; border-radius: 9px; background: #fff; box-shadow: 0 5px 17px rgba(47, 40, 91, .025); }
.progress-copy { display: flex; align-items: center; justify-content: space-between; }
.progress-copy span { color: #aaa8b5; font-size: 7px; font-weight: 700; letter-spacing: 1px; }
.progress-copy strong { color: #6a60bd; font: 700 11px "Manrope", sans-serif; }
.progress-track { height: 4px; margin: 11px 0 8px; overflow: hidden; border-radius: 5px; background: #f0eff6; }
.progress-track span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #9889ed, #c0b4fa); transition: width .35s ease; }
.progress-caption { color: #aaa8b5; font-size: 8px; }

/* Tasks */
.task-panel { border: 1px solid #ececf1; border-radius: 10px; background: #fff; box-shadow: 0 7px 24px rgba(36, 35, 54, .025); }
.task-toolbar { min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 20px; border-bottom: 1px solid #f0eff3; }
.task-toolbar-title { display: flex; align-items: center; gap: 8px; }
.task-toolbar-title h2 { margin: 0; font: 700 12px "Manrope", sans-serif; letter-spacing: -.2px; }
.count-pill { min-width: 19px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 10px; color: #8b80d0; background: #f1efff; font-size: 8px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.search-box { width: 180px; height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #eeedf2; border-radius: 6px; color: #aaa8b7; }
.search-box > span { font-size: 16px; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 9px; }
.search-box input::placeholder { color: #b3b1be; }
.filter-select { height: 30px; padding: 0 8px; border: 1px solid #eeedf2; border-radius: 6px; color: #777587; background: #fff; font-size: 9px; cursor: pointer; }
.sort-button { height: 30px; display: flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid #eeedf2; border-radius: 6px; color: #777587; background: #fff; font-size: 12px; cursor: pointer; }
.sort-button span { font-size: 9px; }.sort-button.sort-reversed { color: var(--violet-dark); background: #f5f3ff; }
.quick-add { height: 56px; display: flex; align-items: center; gap: 11px; margin: 14px 19px 4px; padding: 0 12px; border: 1px dashed #dbd8ef; border-radius: 7px; background: #fdfdff; transition: border-color .2s, background .2s; }
.quick-add:focus-within { border-color: #a79be9; background: #faf9ff; }
.quick-add-plus { color: #8778dc; font-size: 17px; }
.quick-add input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 10px; }
.quick-add input::placeholder { color: #aaa8b6; }
.quick-add button { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; border-radius: 5px; color: #7768cf; background: #f1efff; font-size: 9px; font-weight: 700; cursor: pointer; }
.quick-add button:hover { background: #e9e5ff; }
.quick-add button span { font-size: 13px; }
.task-list { padding: 5px 19px 6px; }
.task-row { min-height: 65px; display: grid; grid-template-columns: 18px minmax(120px, 1fr) auto 52px; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid #f2f1f5; animation: task-appear .2s ease both; }
.task-row:last-child { border-bottom: 0; }
@keyframes task-appear { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.task-check { width: 17px; height: 17px; display: grid; place-items: center; padding: 0; border: 1.5px solid #d7d5e2; border-radius: 50%; color: #fff; background: #fff; font-size: 10px; cursor: pointer; transition: background .18s, border-color .18s, transform .18s; }
.task-check:hover { border-color: #9386df; transform: scale(1.08); }
.task-check.checked { border-color: #87bda2; background: #87bda2; }
.task-copy { min-width: 0; }
.task-title-button { max-width: 100%; overflow: hidden; padding: 0; border: 0; color: #48475b; background: transparent; font-size: 10px; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.task-title-button:hover { color: var(--violet-dark); }
.task-note { overflow: hidden; margin: 4px 0 0; color: #aaa8b7; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.is-completed .task-title-button { color: #aaa8b5; text-decoration: line-through; }
.is-completed .task-note { opacity: .7; }
.task-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.task-due { display: flex; align-items: center; gap: 4px; color: #9795a5; font-size: 8px; white-space: nowrap; }
.task-due.due-today { color: #bd8056; }.task-due.due-overdue { color: #ce6d79; }
.priority-badge { padding: 4px 7px; border-radius: 4px; color: #86849a; background: #f2f1f6; font-size: 7px; white-space: nowrap; }
.priority-low { color: #5f9a7b; background: #edf7f1; }.priority-high { color: #bd737d; background: #fbefef; }
.task-actions { display: flex; justify-content: flex-end; gap: 3px; opacity: .35; transition: opacity .18s; }
.task-row:hover .task-actions, .task-actions:focus-within { opacity: 1; }
.task-action { width: 23px; height: 23px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; color: #838195; background: transparent; font-size: 12px; cursor: pointer; }
.task-action:hover { color: var(--violet-dark); background: #f2f0fc; }
.task-action.task-delete:hover { color: #c65e6a; background: #fbefef; }
.task-action:not(.task-delete) { font-size: 16px; }
.empty-state { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.empty-illustration { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: #9384e7; background: #f1efff; font-size: 22px; }
.empty-state strong { margin-top: 12px; font: 700 12px "Manrope", sans-serif; }
.empty-state p { margin: 6px 0 13px; color: #a3a1b0; font-size: 9px; }
.empty-state button { padding: 8px 11px; border: 0; border-radius: 5px; color: #786bc9; background: #f2f0ff; font-size: 9px; cursor: pointer; }
.no-results { padding: 35px 20px; color: #a09eae; font-size: 10px; text-align: center; }
.task-panel-footer { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 20px; border-top: 1px solid #f0eff3; color: #aaa8b6; font-size: 8px; }
.list-footer-actions { display: flex; align-items: center; gap: 13px; }
.list-footer-actions button { padding: 5px 0; border: 0; color: #918eaa; background: transparent; font-size: 8px; cursor: pointer; }
.list-footer-actions button:hover { color: var(--violet-dark); }
.list-footer-actions button:last-child:hover { color: #c65e6a; }
.list-footer-actions button:disabled { opacity: .38; cursor: not-allowed; }
.workspace-footer { display: flex; justify-content: flex-end; padding: 18px 2px 0; color: #b5b3bf; font-size: 7px; font-weight: 700; letter-spacing: .9px; }
.workspace-footer > span:last-child { font-weight: 500; letter-spacing: 0; }

/* Dialogs */
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(32, 30, 54, .32); backdrop-filter: blur(3px); animation: fade-in .16s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: min(100%, 500px); position: relative; padding: 32px 34px 28px; border: 1px solid rgba(255,255,255,.8); border-radius: 13px; background: #fff; box-shadow: 0 24px 75px rgba(31, 28, 66, .2); animation: modal-up .2s ease both; }
@keyframes modal-up { from { opacity: .75; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.compact-modal { width: min(100%, 435px); }
.modal-close { width: 28px; height: 28px; position: absolute; top: 15px; right: 15px; display: grid; place-items: center; border: 0; border-radius: 6px; color: #a09eae; background: transparent; font-size: 20px; cursor: pointer; }
.modal-close:hover { color: var(--ink); background: #f4f3f8; }
.modal-kicker { color: #9a97ae; font-size: 8px; font-weight: 700; letter-spacing: 1.3px; }
.modal-card h2 { margin: 8px 0 22px; font: 700 25px "Manrope", sans-serif; letter-spacing: -1px; }
.modal-form { display: flex; flex-direction: column; gap: 8px; }
.modal-form input:not([type="radio"]), .modal-form textarea, .modal-form select { width: 100%; min-height: 40px; padding: 10px 11px; border: 1px solid #e9e8ef; border-radius: 6px; outline: 0; color: var(--ink); background: #fff; font-size: 10px; }
.modal-form textarea { min-height: 76px; resize: vertical; }
.modal-form input:focus, .modal-form textarea:focus, .modal-form select:focus { border-color: #a99dea; box-shadow: 0 0 0 3px rgba(133, 116, 232, .08); }
.optional-label { float: right; color: #b4b1c0; font-size: 7px; letter-spacing: .65px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-row > div { display: flex; flex-direction: column; gap: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; padding-top: 16px; border-top: 1px solid #f0eff3; }
.button-quiet { border: 1px solid #ecebf0; color: #858395; background: #fff; }
.button-quiet:hover { background: #f8f7fa; }
.color-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.color-choices label { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid #eeedf2; border-radius: 6px; color: #777587; font-size: 9px; cursor: pointer; }
.color-choices label:has(input:checked) { border-color: #beb5ef; background: #f8f7ff; color: #6d60be; }
.color-choices input { position: absolute; opacity: 0; pointer-events: none; }
.color-dot { width: 8px; height: 8px; border-radius: 50%; }.color-dot.violet { background: #8a79e6; }.color-dot.blue { background: #69a7de; }.color-dot.green { background: #71b794; }.color-dot.orange { background: #e49b69; }
.account-card { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; padding: 12px; border: 1px solid #efedf5; border-radius: 8px; background: #fcfbff; }
.account-card .profile-avatar { width: 36px; height: 36px; }
.account-badge { margin-left: auto; padding: 4px 7px; border-radius: 4px; color: #7869cb; background: #f0eeff; font-size: 7px; font-weight: 700; letter-spacing: .7px; }
.settings-logout-btn { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 20px; padding: 0 14px; border: 1px solid #fbd5d5; border-radius: 8px; color: #c53030; background: #fff5f5; font: 600 12px "Manrope", sans-serif; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.settings-logout-btn:hover { border-color: #f8b4b4; background: #fee2e2; }
.settings-logout-btn > span { font-size: 15px; }
.settings-form-title { margin: 0 0 4px; font: 700 11px "Manrope", sans-serif; }
.settings-preferences { display: grid; gap: 8px; margin-bottom: 18px; }
.setting-toggle { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; border: 1px solid #eeedf2; border-radius: 7px; color: #777587; background: #fff; font-size: 11px; text-align: left; cursor: pointer; }
.setting-toggle:hover { border-color: #c7c0ed; background: #faf9ff; }
.setting-toggle span:last-child { color: var(--violet-dark); font-weight: 700; }
.toast-region { position: fixed; z-index: 20; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { max-width: min(380px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #e8e5f2; border-radius: 8px; color: #55536c; background: #fff; box-shadow: 0 8px 30px rgba(35, 32, 72, .13); font-size: 10px; animation: toast-in .2s ease both; }
.toast::before { content: "✦"; margin-right: 9px; color: #8b7bdf; }
.toast-error { border-color: #f1dddf; color: #a4525d; }.toast-error::before { content: "!"; color: #c36772; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.group-tab-group { min-width: 0; height: 100%; display: flex; align-items: flex-end; gap: 5px; }
.feature-workspace { width: min(100%, 1080px); margin: 0 auto; padding: 36px 0; }
.feature-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.feature-heading h1 { margin: 8px 0 0; font: 700 clamp(29px, 3vw, 39px)/1.15 "Manrope", sans-serif; letter-spacing: -1.8px; }
.feature-heading p { margin: 8px 0 0; color: #9a98a8; font-size: 14px; }
.feature-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.group-credentials { margin-bottom: 16px; padding: 13px 16px; border: 1px solid #e9e5fb; border-radius: 8px; color: #696185; background: #f7f5ff; font-size: 12px; overflow-wrap: anywhere; }
.group-board-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 16px; }
.group-board-toolbar select { min-width: 180px; min-height: 40px; flex: 1; padding: 0 10px; border: 1px solid #eeedf2; border-radius: 7px; color: #777587; background: #fff; }
.kanban-columns { display: grid; grid-auto-columns: minmax(245px, 1fr); grid-auto-flow: column; gap: 14px; overflow-x: auto; align-items: start; padding: 2px 1px 12px; }
.kanban-column { min-height: 220px; padding: 12px; border: 1px solid #ececf1; border-radius: 9px; background: #eeedf3; }
.kanban-column-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.kanban-column-heading h2 { margin: 0; font: 700 13px "Manrope", sans-serif; }
.kanban-column-heading > div { display: flex; gap: 4px; }
.kanban-column-heading button { width: 26px; height: 26px; border: 0; border-radius: 5px; color: #89869a; background: transparent; cursor: pointer; }
.kanban-column-heading button:hover { color: var(--violet-dark); background: #fff; }
.kanban-card { margin: 8px 0; padding: 12px; border: 1px solid #eeedf2; border-radius: 7px; background: #fff; box-shadow: 0 3px 10px rgba(36, 35, 54, .035); cursor: grab; }
.kanban-card:active { cursor: grabbing; }
.kanban-card-heading { display: flex; align-items: flex-start; gap: 8px; }
.kanban-card-heading input { margin: 3px 0 0; accent-color: var(--green); }
.kanban-card-title { min-width: 0; flex: 1; padding: 0; border: 0; color: #48475b; background: transparent; font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; }
.kanban-card p { margin: 8px 0 0; color: #8e8c9b; font-size: 11px; white-space: pre-wrap; }
.kanban-card small { display: block; margin-top: 9px; color: #9694a4; }
.kanban-card.is-completed .kanban-card-title { color: #aaa8b5; text-decoration: line-through; }
.kanban-label { display: inline-block; margin-top: 8px; padding: 4px 7px; border-radius: 4px; color: #685cb0; background: #f1efff; font-size: 10px; }
.feature-empty { padding: 24px; color: #9997a7; text-align: center; }
.calendar-panel, .calendar-day-panel { margin-bottom: 17px; padding: 18px; border: 1px solid #ececf1; border-radius: 9px; background: #fff; }
.calendar-heading { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 15px; }
.calendar-heading h2 { min-width: 180px; margin: 0; font: 700 17px "Manrope", sans-serif; text-align: center; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-weekday { padding: 8px 3px; color: #9997a7; font-size: 10px; font-weight: 700; text-align: center; }
.calendar-day { min-height: 62px; position: relative; border: 1px solid #efedf4; border-radius: 6px; color: #55536b; background: #fff; font-size: 12px; text-align: left; vertical-align: top; cursor: pointer; }
.calendar-day:hover { border-color: #c9c1f0; background: #faf9ff; }
.calendar-day.is-outside { color: #c5c3ce; background: #faf9fb; }
.calendar-day.is-selected { border-color: #9385e2; color: #6759bc; background: #f5f3ff; box-shadow: inset 0 0 0 1px #9385e2; }
.calendar-task-count { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px; color: #fff; background: #8778dc; font-size: 9px; }
.calendar-day-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calendar-day-heading h2 { margin: 0; font: 700 15px "Manrope", sans-serif; text-transform: capitalize; }
.calendar-task { display: flex; align-items: center; gap: 12px; padding: 12px 3px; border-top: 1px solid #f0eff3; color: #666477; font-size: 12px; }
.calendar-task:first-child { margin-top: 14px; }
.calendar-task-title { flex: 1; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.calendar-task-title:hover { color: var(--violet-dark); }
.calendar-task > span { flex: 1; }
.trash-items { display: grid; gap: 9px; }
.trash-item { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px; border: 1px solid #ececf1; border-radius: 8px; background: #fff; }
.trash-item > div { min-width: 170px; flex: 1; display: grid; gap: 5px; }
.trash-item strong { font-size: 12px; }
.trash-item small { color: #9997a7; font-size: 10px; }
.trash-item select { min-height: 36px; padding: 0 8px; border: 1px solid #eeedf2; border-radius: 6px; color: #777587; background: #fff; }
.button-danger { min-height: 38px; padding: 0 12px; border: 1px solid #f0dfe1; color: #b65c67; background: #fff8f8; font-size: 11px; }
.button-danger:hover { background: #fff0f1; }

@media (min-width: 1400px) { .workspace { width: min(100% - 120px, 1120px); padding-top: 35px; } }
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 195px minmax(0, 1fr); }
    .sidebar { padding-right: 12px; padding-left: 12px; }
    .workspace { width: calc(100% - 44px); }
    .browser-chrome { padding: 0 15px; gap: 12px; }
    .tab-strip { padding: 0 15px; }
    .task-toolbar { padding: 0 14px; }
    .search-box { width: 145px; }
    .documents-workspace, .admin-workspace { width: calc(100% - 44px); }
    .documents-layout { grid-template-columns: minmax(0, 1fr); }
    .admin-table th, .admin-table td { padding: 11px 10px; }
}
@media (max-width: 680px) {
    .app-shell { display: block; }
    .sidebar { min-height: 92px; height: auto; position: sticky; z-index: 5; top: 0; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; row-gap: 0; padding: 5px 15px; border-right: 0; border-bottom: 1px solid #ececf0; }
    .sidebar-brand { padding: 0; font-size: 20px; }
    .workspace-label, .side-section-heading, .list-navigation, .sidebar-add-list, .sidebar-logout { display: none; }
    .sidebar-mode-navigation { width: 100%; display: flex; order: 3; gap: 5px; margin: 0; overflow-x: auto; }
    .sidebar-mode-button { min-height: 34px; flex: 0 0 auto; justify-content: center; padding: 0 8px; }
    .sidebar-bottom { display: flex; order: 2; align-items: center; gap: 4px; margin: 0; }
    .sidebar-contact, .sidebar-settings { width: auto; min-height: 36px; }
    .sidebar-profile { width: auto; min-height: 36px; margin: 0; padding: 0 5px; border: 0; }
    .sidebar-profile .profile-avatar { width: 28px; height: 28px; }
    .profile-settings-icon { display: none; }
    .app-shell[data-role="admin"] .sidebar { min-height: 57px; }
    .browser { min-height: calc(100vh - 92px); }
    .browser-chrome { height: 38px; padding: 0 12px; }
    .tab-strip { height: 40px; padding: 0 10px; }
    .browser-tab { flex-basis: 135px; }
    .browser-shortcut { display: none; }
    .workspace { width: calc(100% - 28px); padding-top: 19px; }
    .documents-workspace, .admin-workspace { width: calc(100% - 28px); padding-top: 20px; }
    .feature-workspace { padding-top: 20px; }
    .documents-heading, .admin-heading { align-items: flex-start; flex-direction: column; }
    .summary-panel { padding: 16px; }
    .summary-result-heading { align-items: flex-start; flex-direction: column; }
    .summary-downloads { width: 100%; }
    .summary-downloads .button { flex: 1; }
    .documents-layout { min-height: 0; grid-template-columns: 1fr; }
    .document-editor-heading { padding: 0 12px; }
    .document-editor-heading > span { font-size: 9px; }
    .editor-toolbar { padding: 6px 10px; }
    .document-editor { min-height: 350px; padding: 18px; }
    .admin-summary { grid-template-columns: 1fr; }
    .feedback-card-heading, .feedback-card-footer { align-items: flex-start; flex-direction: column; }
    .admin-panel-heading:has(.admin-panel-actions) { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
    .admin-panel-actions { width: 100%; justify-content: space-between; }
    .admin-host-metrics, .admin-container-list { grid-template-columns: 1fr; }
    .admin-feedback-chart { gap: 20px; padding: 16px; }
    .contact-panel { padding: 16px; }
    .contact-form-footer { align-items: stretch; flex-direction: column; }
    .developer-message-actions { align-items: stretch; flex-direction: column; }
    .developer-message-actions .button { justify-content: center; }
    .developer-message-popup { right: 12px; bottom: 12px; }
    .welcome-block { align-items: flex-start; flex-direction: column; gap: 18px; padding: 26px 0 20px; }
    .feature-heading { align-items: stretch; flex-direction: column; }
    .feature-actions { justify-content: flex-start; }
    .kanban-columns { grid-auto-columns: minmax(82vw, 1fr); }
    .calendar-panel, .calendar-day-panel { padding: 10px; }
    .calendar-day { min-height: 46px; padding: 5px; }
    .calendar-weekday { font-size: 8px; }
    .calendar-day-heading { align-items: flex-start; flex-direction: column; }
    .trash-item { align-items: stretch; flex-direction: column; }
    .progress-card { width: 100%; }
    .task-toolbar { align-items: flex-start; flex-direction: column; gap: 11px; padding: 14px; }
    .toolbar-actions { width: 100%; }
    .search-box { min-width: 0; flex: 1; }
    .task-row { grid-template-columns: 18px minmax(80px, 1fr) auto; gap: 9px; }
    .task-meta { grid-column: 2; justify-content: flex-start; }
    .task-actions { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
    .task-panel-footer { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
    .list-footer-actions { width: 100%; justify-content: flex-end; }
    .workspace-footer { padding-bottom: 12px; }
}
@media (max-width: 420px) {
    .login-card { padding: 34px 25px 26px; }
    .login-brand { margin-bottom: 43px; }
    .login-intro h1 { font-size: 34px; }
    .today-label { font-size: 8px; }
    .breadcrumbs { font-size: 7px; }
    .filter-select { max-width: 83px; padding: 0 4px; }
    .admin-role-select { max-width: none; }
    .sort-button { padding: 0 6px; }
    .sort-button span { display: none; }
    .quick-add { margin-right: 11px; margin-left: 11px; padding: 0 8px; }
    .quick-add input { font-size: 9px; }
    .quick-add button { gap: 5px; padding: 7px; }
    .task-list { padding-right: 10px; padding-left: 10px; }
    .task-meta { flex-wrap: wrap; }
    .modal-card { padding: 28px 20px 21px; }
    .color-choices { gap: 5px; }
    .color-choices label { padding: 6px; }
}

body[data-text-size="large"] .login-intro p { font-size: 15px; }
body[data-text-size="large"] .form-stack label,
body[data-text-size="large"] .modal-form > label,
body[data-text-size="large"] .form-row label { font-size: 13px; }
body[data-text-size="large"] .input-wrap input { font-size: 14px; }
body[data-text-size="large"] .password-toggle { font-size: 12px; }
body[data-text-size="large"] .button { font-size: 13px; }
body[data-text-size="large"] .login-footnote { font-size: 12px; }
body[data-text-size="large"] .sidebar-brand { font-size: 24px; }
body[data-text-size="large"] .workspace-label strong,
body[data-text-size="large"] .sidebar-profile strong,
body[data-text-size="large"] .account-card strong { font-size: 12px; }
body[data-text-size="large"] .workspace-label small,
body[data-text-size="large"] .sidebar-profile small,
body[data-text-size="large"] .account-card small { font-size: 11px; }
body[data-text-size="large"] .side-section-heading { font-size: 10px; }
body[data-text-size="large"] .side-list-name,
body[data-text-size="large"] .sidebar-add-list,
body[data-text-size="large"] .sidebar-contact,
body[data-text-size="large"] .sidebar-settings,
body[data-text-size="large"] .sidebar-logout { font-size: 12px; }
body[data-text-size="large"] .side-list-count { font-size: 11px; }
body[data-text-size="large"] .browser-section-label { font-size: 10px; }
body[data-text-size="large"] .browser-tab { font-size: 11px; }
body[data-text-size="large"] .browser-tab-count { font-size: 10px; }
body[data-text-size="large"] .breadcrumbs { font-size: 10px; }
body[data-text-size="large"] .today-label { font-size: 11px; }
body[data-text-size="large"] .welcome-copy p { font-size: 14px; }
body[data-text-size="large"] .progress-copy span { font-size: 9px; }
body[data-text-size="large"] .progress-copy strong { font-size: 13px; }
body[data-text-size="large"] .progress-caption { font-size: 10px; }
body[data-text-size="large"] .task-toolbar-title h2 { font-size: 14px; }
body[data-text-size="large"] .count-pill { font-size: 10px; }
body[data-text-size="large"] .search-box input,
body[data-text-size="large"] .filter-select,
body[data-text-size="large"] .sort-button span { font-size: 11px; }
body[data-text-size="large"] .quick-add input { font-size: 12px; }
body[data-text-size="large"] .quick-add button { font-size: 11px; }
body[data-text-size="large"] .task-title-button { font-size: 13px; }
body[data-text-size="large"] .task-note { font-size: 11px; }
body[data-text-size="large"] .task-due { font-size: 10px; }
body[data-text-size="large"] .priority-badge { font-size: 9px; }
body[data-text-size="large"] .empty-state strong { font-size: 14px; }
body[data-text-size="large"] .empty-state p,
body[data-text-size="large"] .empty-state button { font-size: 11px; }
body[data-text-size="large"] .no-results { font-size: 12px; }
body[data-text-size="large"] .task-panel-footer { font-size: 10px; }
body[data-text-size="large"] .list-footer-actions button { font-size: 10px; }
body[data-text-size="large"] .workspace-footer { font-size: 9px; }
body[data-text-size="large"] .modal-kicker { font-size: 10px; }
body[data-text-size="large"] .modal-form input:not([type="radio"]),
body[data-text-size="large"] .modal-form textarea,
body[data-text-size="large"] .modal-form select { font-size: 13px; }
body[data-text-size="large"] .color-choices label,
body[data-text-size="large"] .setting-toggle { font-size: 13px; }
body[data-text-size="large"] .account-badge { font-size: 9px; }
body[data-text-size="large"] .toast { font-size: 12px; }

html[data-theme="dark"] {
    color-scheme: dark;
    --ink: #eeedf5;
    --muted: #aaa8b9;
    --muted-dark: #c2c0ce;
    --paper: #24242f;
    --canvas: #191920;
    --line: #373744;
    --violet: #a497f2;
    --violet-dark: #b6aafa;
    --violet-soft: #322e4c;
    --green: #75c49b;
    --red: #e18490;
    --shadow: 0 18px 60px rgba(0, 0, 0, .28);
    --sidebar-surface: #24242f;
    --sidebar-hover: #2d2c3a;
    --sidebar-active: #34304c;
    --sidebar-active-ink: #ddd7ff;
    --sidebar-divider: #393947;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell { color: var(--ink); background: var(--canvas); }
html[data-theme="dark"] .login-screen { background: #191920; }
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .task-panel,
html[data-theme="dark"] .progress-card,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .documents-layout,
html[data-theme="dark"] .document-editor-panel,
html[data-theme="dark"] .calendar-panel,
html[data-theme="dark"] .calendar-day-panel,
html[data-theme="dark"] .trash-item,
html[data-theme="dark"] .kanban-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] .feedback-card,
html[data-theme="dark"] .developer-message-popup,
html[data-theme="dark"] .toast { border-color: #373744; background: #24242f; }
html[data-theme="dark"] .browser-chrome,
html[data-theme="dark"] .tab-strip { border-color: #343440; background: #202029; }
html[data-theme="dark"] .browser-tab.is-active { border-color: #393947; color: #eeedf5; background: #24242f; }
html[data-theme="dark"] .group-credentials { border-color: #39334f; color: #d0c9ff; background: #302d40; }
html[data-theme="dark"] .kanban-column { border-color: #393947; background: #202029; }
html[data-theme="dark"] .kanban-card-title { color: #e3e1ed; }
html[data-theme="dark"] .kanban-card p,
html[data-theme="dark"] .kanban-card small { color: #c0becb; }
html[data-theme="dark"] .kanban-column-heading button:hover { background: #383744; }
html[data-theme="dark"] .kanban-label { color: #d0c9ff; background: #38334f; }
html[data-theme="dark"] .calendar-day { border-color: #424250; color: #d0cede; background: #2b2b37; }
html[data-theme="dark"] .calendar-day.is-outside { color: #777587; background: #24242f; }
html[data-theme="dark"] .calendar-day.is-selected { border-color: #9585e7; color: #d0c9ff; background: #302d47; }
html[data-theme="dark"] .group-board-toolbar select,
html[data-theme="dark"] .trash-item select { border-color: #424250; color: #d0cede; background: #2b2b37; }
html[data-theme="dark"] .button-danger { border-color: #52343b; color: #f0a6ae; background: #34272e; }
html[data-theme="dark"] .calendar-task { border-color: #373744; color: #d0cede; }
html[data-theme="dark"] .button-danger:hover { background: #423038; }
html[data-theme="dark"] .settings-logout-btn { border-color: #552727; color: #ff9b9b; background: #2f1d22; }
html[data-theme="dark"] .settings-logout-btn:hover { border-color: #7a3535; background: #3d232a; }
html[data-theme="dark"] .workspace-label,
html[data-theme="dark"] .account-card,
html[data-theme="dark"] .documents-sidebar { border-color: #393947; background: #292934; }
html[data-theme="dark"] .summary-panel, html[data-theme="dark"] .summary-preview { border-color: #393947; color: var(--ink); background: #292934; }
html[data-theme="dark"] .summary-drop-zone { border-color: #514b6f; color: #c0becb; background: #252431; }
html[data-theme="dark"] .summary-drop-zone:hover, html[data-theme="dark"] .summary-drop-zone.is-dragging { border-color: #a99be9; background: #302d47; }
html[data-theme="dark"] .summary-drop-zone strong, html[data-theme="dark"] .summary-file-name { color: var(--ink); }
html[data-theme="dark"] .summary-preview h3 { color: #c4baff; }
html[data-theme="dark"] .contact-panel,
html[data-theme="dark"] .admin-monitor-panel { border-color: #373744; background: #24242f; }
html[data-theme="dark"] .admin-monitor-metric,
html[data-theme="dark"] .admin-container-card,
html[data-theme="dark"] .feedback-donut-center { border-color: #393947; background: #292934; }
html[data-theme="dark"] .admin-workgroup-members { border-color: #424250; }
html[data-theme="dark"] .admin-workgroup-member-option:hover { background: #302d40; }
html[data-theme="dark"] .contact-form label { color: #d0cede; }
html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea { border-color: #424250; color: var(--ink); background: #2b2b37; }
html[data-theme="dark"] .admin-feedback-chart,
html[data-theme="dark"] .admin-panel-heading { border-color: #373744; }
html[data-theme="dark"] .admin-monitor-status.is-healthy { color: #a7d6bd; background: #293b33; }
html[data-theme="dark"] .admin-monitor-status.is-warning { color: #f0cb88; background: #3f3527; }
html[data-theme="dark"] .admin-monitor-status.is-error { color: #efb2b7; background: #422e34; }
html[data-theme="dark"] .feedback-status-new { border-color: #654148; color: #efb2b7; background: #422e34; }
html[data-theme="dark"] .feedback-status-read { border-color: #665332; color: #f0cb88; background: #3f3527; }
html[data-theme="dark"] .feedback-status-resolved { border-color: #365644; color: #a7d6bd; background: #293b33; }
html[data-theme="dark"] .task-toolbar,
html[data-theme="dark"] .task-panel-footer { border-color: #373744; }
html[data-theme="dark"] .sidebar-profile { border-color: transparent; border-top-color: var(--sidebar-divider); }
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .sort-button,
html[data-theme="dark"] .modal-form input:not([type="radio"]),
html[data-theme="dark"] .modal-form textarea,
html[data-theme="dark"] .modal-form select,
html[data-theme="dark"] .input-wrap,
html[data-theme="dark"] .setting-toggle,
html[data-theme="dark"] .form-stack > input { border-color: #424250; color: var(--ink); background: #2b2b37; }
html[data-theme="dark"] .quick-add { border-color: #4b456b; background: #252431; }
html[data-theme="dark"] .quick-add:focus-within,
html[data-theme="dark"] .setting-toggle:hover { background: #302d40; }
html[data-theme="dark"] .side-list { color: #c0becb; }
html[data-theme="dark"] .side-list:hover { color: var(--ink); background: #292934; }
html[data-theme="dark"] .side-list.is-active { color: #d0c9ff; background: #302d47; }
html[data-theme="dark"] .task-title-button { color: #e3e1ed; }
html[data-theme="dark"] .task-row { border-color: #343440; }
html[data-theme="dark"] .progress-track { background: #393744; }
html[data-theme="dark"] .progress-track span { background: linear-gradient(90deg, #9585e7, #b1a4f5); }
html[data-theme="dark"] .task-check { border-color: #5a5868; background: #2b2b37; }
html[data-theme="dark"] .task-check.checked { border-color: #75aa8e; background: #75aa8e; }
html[data-theme="dark"] .priority-badge { color: #d0cede; background: #383744; }
html[data-theme="dark"] .priority-low { color: #a7d6bd; background: #293b33; }
html[data-theme="dark"] .priority-high { color: #efb2b7; background: #422e34; }
html[data-theme="dark"] .task-due.due-today { color: #e8b78e; }
html[data-theme="dark"] .task-due.due-overdue { color: #ee929e; }
html[data-theme="dark"] .browser-avatar,
html[data-theme="dark"] .workspace-avatar,
html[data-theme="dark"] .profile-avatar { color: #d0c9ff; background: #38334f; }
html[data-theme="dark"] .count-pill,
html[data-theme="dark"] .account-badge { color: #d0c9ff; background: #38334f; }
html[data-theme="dark"] .color-choices label { border-color: #424250; color: #d0cede; }
html[data-theme="dark"] .color-choices label:has(input:checked) { border-color: #7368aa; background: #302d40; color: #d0c9ff; }
html[data-theme="dark"] .button-quiet { border-color: #424250; color: #d0cede; background: #2b2b37; }
html[data-theme="dark"] .button-quiet:hover,
html[data-theme="dark"] .modal-close:hover { background: #383744; }
html[data-theme="dark"] .empty-state button,
html[data-theme="dark"] .quick-add button { color: #d0c9ff; background: #38334f; }
html[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, .62); }
html[data-theme="dark"] .modal-actions { border-color: #373744; }
html[data-theme="dark"] .toast { color: #eeedf5; }
html[data-theme="dark"] .form-stack label,
html[data-theme="dark"] .modal-form > label,
html[data-theme="dark"] .form-row label,
html[data-theme="dark"] .settings-form-title { color: #d0cede; }
html[data-theme="dark"] #admin-user-name-fields label,
html[data-theme="dark"] #admin-user-role-fields label { color: #d0cede; }
html[data-theme="dark"] .document-editor blockquote { color: #c0becb; }
html[data-theme="dark"] .sidebar-contact:hover,
html[data-theme="dark"] .sidebar-contact.is-active,
html[data-theme="dark"] .sidebar-settings:hover,
html[data-theme="dark"] .sidebar-logout:hover,
html[data-theme="dark"] .task-action:hover { background: #302d40; }
html[data-theme="dark"] .sidebar-profile:hover { border-color: #403d52; background: var(--sidebar-hover); }
html[data-theme="dark"] .sidebar-mode-button,
html[data-theme="dark"] .editor-toolbar button { color: #c0becb; }
html[data-theme="dark"] .sidebar-mode-button:hover,
html[data-theme="dark"] .sidebar-mode-button.is-active,
html[data-theme="dark"] .editor-toolbar button.is-active { color: #d0c9ff; background: #302d47; }
html[data-theme="dark"] .view-tab.is-active,
html[data-theme="dark"] .document-link.is-active { border-color: #393947; color: #d0c9ff; background: #302d47; }
html[data-theme="dark"] .view-tab:hover,
html[data-theme="dark"] .document-link:hover,
html[data-theme="dark"] .admin-action:hover { background: #302d40; }
html[data-theme="dark"] .document-navigation-delete:hover { color: #f18d99; background: #3a2a32; }
html[data-theme="dark"] .documents-sidebar,
html[data-theme="dark"] .admin-table th { background: #292934; }
html[data-theme="dark"] .document-editor-heading,
html[data-theme="dark"] .editor-toolbar,
html[data-theme="dark"] .toolbar-divider,
html[data-theme="dark"] .admin-table th,
html[data-theme="dark"] .admin-table td,
html[data-theme="dark"] .developer-message-form textarea,
html[data-theme="dark"] .feedback-section { border-color: #373744; }
html[data-theme="dark"] .developer-message-form textarea { color: var(--ink); background: #2b2b37; }
html[data-theme="dark"] .app-version-footer { color: #aaa8b7; }
html[data-theme="dark"] .app-version-footer span:last-child { color: #d0cede; }
html[data-theme="dark"] .app-version-field { border-color: #424250; color: #c0becb; background: #2b2b37; }
html[data-theme="dark"] .app-version-field input { color: var(--ink); }
html[data-theme="dark"] .developer-message-popup p,
html[data-theme="dark"] .developer-message-actions > span { color: #c0becb; }
html[data-theme="dark"] .developer-message-popup-heading button { color: #d0cede; background: transparent; }
html[data-theme="dark"] .developer-message-popup-heading button:hover { color: #fff; background: #383744; }
html[data-theme="dark"] .developer-message-form label { color: #d0cede; }
html[data-theme="dark"] .admin-table th { color: #c0becb; }
html[data-theme="dark"] .feedback-card > p { color: #d0cede; }

/* ═══════════════════════════════════════════════════════════════
   FILESPACE — Espace Documents (v1.0.3)
   ═══════════════════════════════════════════════════════════════ */

/* Layout principal */
.filespace-workspace { display: flex; flex-direction: column; gap: 0; padding: 0; }
.filespace-layout {
    display: grid;
    grid-template-columns: minmax(300px, .9fr) minmax(0, 2.1fr);
    gap: 0;
    flex: 1;
    height: min(68vh, 720px);
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--paper);
    box-shadow: var(--shadow);
    margin: 0 0 24px;
}

/* Sidebar liste */
.filespace-sidebar {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    overflow: hidden;
    background: var(--canvas);
}
.filespace-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--muted);
    flex-shrink: 0;
}
.filespace-search-wrap {
    padding: 0 14px 10px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.filespace-search-wrap input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    font-size: 12px;
    transition: border-color .15s;
}
.filespace-search-wrap input:focus { border-color: var(--violet); outline: 2px solid var(--violet-soft); }
.filespace-list { min-height: 0; flex: 1; overflow-y: auto; padding: 8px 0; }
.filespace-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 20px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}
.filespace-list-empty span { font-size: 28px; opacity: .4; }

/* Entrée dans la liste */
.filespace-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 68px;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    border-radius: 0;
    transition: background .15s;
    border-left: 3px solid transparent;
}
.filespace-item:hover { background: rgba(133, 116, 232, .06); }
.filespace-item.is-active {
    background: var(--violet-soft);
    border-left-color: var(--violet);
}
.filespace-item-main { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 5px 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.filespace-item-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: var(--violet); background: var(--violet-soft); font-size: 16px; }
.filespace-item.is-active .filespace-item-icon { color: var(--violet); }
.filespace-item-body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.filespace-item-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.filespace-item-meta { font-size: 11px; color: var(--muted); }
.filespace-item-actions { display: flex; align-items: center; gap: 3px; }
.filespace-item-rename, .filespace-item-delete {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--muted-dark);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    opacity: .72;
}
.filespace-item-rename:hover, .filespace-item-delete:hover { opacity: 1; border-color: var(--line); background: var(--paper); }
.filespace-item-delete:hover { color: var(--red); }
/* Éditeur */
.filespace-editor-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
.filespace-editor-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    flex-shrink: 0;
}
#filespace-title {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    font-weight: 700;
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    letter-spacing: -.4px;
    min-width: 0;
}
#filespace-title::placeholder { color: var(--muted); font-weight: 400; }
#filespace-title:disabled { cursor: default; }
#filespace-title:focus { outline: none; }

.filespace-editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.filespace-crypto-pill {
    font-size: 10px;
    font-weight: 700;
    color: var(--violet);
    background: var(--violet-soft);
    border: 1px solid rgba(133, 116, 232, .2);
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: .4px;
}
.filespace-save-status {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .8px;
    color: var(--green);
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(83, 169, 133, .1);
    white-space: nowrap;
    transition: all .3s;
}
.filespace-save-status.saving {
    color: var(--muted);
    background: rgba(140, 139, 156, .1);
}
.filespace-save-status.error {
    color: var(--red);
    background: rgba(214, 109, 121, .1);
}

.button-download-word {
    color: #2b579a !important;
    background: rgba(43, 87, 154, .08) !important;
    border-color: rgba(43, 87, 154, .25) !important;
    font-weight: 600 !important;
}
.button-download-word:hover {
    background: rgba(43, 87, 154, .16) !important;
}

/* Barre d'outils de traitement */
.filespace-treatment-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 18px;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
    font-size: 11px;
}
.filespace-tools-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.filespace-tools-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-right: 4px;
}
.tool-btn {
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.tool-btn:hover {
    background: var(--violet-soft);
    border-color: var(--violet);
    color: var(--violet);
}
.tool-sep {
    width: 1px;
    height: 14px;
    background: var(--line);
    margin: 0 4px;
}
.filespace-stats-group {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

#filespace-editor {
    flex: 1;
    border: 0;
    outline: 0;
    resize: none;
    padding: 24px 28px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--paper);
    font-family: "DM Sans", "Segoe UI", sans-serif;
    tab-size: 4;
}
#filespace-editor::placeholder { color: #c4c3d0; }
#filespace-editor:disabled { background: var(--canvas); cursor: default; }

.filespace-editor-empty {
    position: absolute;
    inset: 60px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 40px;
    background: var(--paper);
    pointer-events: auto;
}
.filespace-editor-empty strong { font-size: 16px; }
.filespace-editor-empty p { color: var(--muted); font-size: 13px; margin: 0; }
.filespace-editor-empty .empty-illustration { font-size: 40px; opacity: .25; }

/* Modal nouvelle document */
#filespace-new-modal .modal-card { max-width: 420px; }

/* Bouton danger (supprimer) */
.button-danger {
    color: var(--red);
    background: rgba(214, 109, 121, .08);
    border: 1px solid rgba(214, 109, 121, .2);
    min-height: 36px;
    padding: 0 14px;
    font-size: 16px;
    font-weight: 700;
}
.button-danger:hover { background: rgba(214, 109, 121, .15); border-color: var(--red); transform: none; }

/* Responsive */
@media (max-width: 720px) {
    .filespace-layout { grid-template-columns: 1fr; grid-template-rows: minmax(150px, auto) minmax(340px, 1fr); height: auto; min-height: 0; }
    .filespace-sidebar { border-right: 0; border-bottom: 1px solid var(--line); max-height: 300px; }
}

/* Dark mode */
html[data-theme="dark"] .filespace-layout { background: #22222e; border-color: #373744; }
html[data-theme="dark"] .filespace-sidebar { background: #1e1e2a; border-right-color: #373744; }
html[data-theme="dark"] .filespace-sidebar-head { border-bottom-color: #373744; }
html[data-theme="dark"] .filespace-item:hover { background: rgba(133, 116, 232, .1); }
html[data-theme="dark"] .filespace-item.is-active { background: rgba(133, 116, 232, .18); }
html[data-theme="dark"] .filespace-item-title { color: var(--ink); }
html[data-theme="dark"] .filespace-editor-topbar { background: #22222e; border-bottom-color: #373744; }
html[data-theme="dark"] #filespace-editor { background: #22222e; color: var(--ink); }
html[data-theme="dark"] #filespace-editor:disabled { background: #1e1e2a; }
html[data-theme="dark"] .filespace-editor-empty { background: #22222e; }
html[data-theme="dark"] #filespace-title { color: var(--ink); }
html[data-theme="dark"] .button-danger { color: #e07f8a; background: rgba(214, 109, 121, .12); border-color: rgba(214, 109, 121, .25); }
html[data-theme="dark"] .filespace-treatment-toolbar { background: #1a1a24; border-bottom-color: #373744; }
html[data-theme="dark"] .filespace-search-wrap { border-bottom-color: #373744; }
html[data-theme="dark"] .filespace-search-wrap input { background: #22222e; border-color: #373744; color: var(--ink); }
html[data-theme="dark"] .tool-btn { background: #242432; border-color: #3b3b4a; color: var(--ink); }
html[data-theme="dark"] .tool-btn:hover { background: rgba(133, 116, 232, .2); border-color: var(--violet); color: #fff; }
html[data-theme="dark"] .tool-sep { background: #373744; }
html[data-theme="dark"] .button-download-word { color: #8bb3f8 !important; background: rgba(74, 137, 243, .14) !important; border-color: rgba(74, 137, 243, .3) !important; }

.sidebar-mode-button.is-unavailable { opacity: .5; filter: grayscale(1); }
.sidebar-mode-button.is-unavailable:hover { opacity: .7; }
.unavailable-preview { margin: 0; }
.unavailable-preview figcaption { margin-bottom: 10px; color: var(--muted-dark); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.unavailable-preview-frame { position: relative; overflow: hidden; border: 1px dashed #cfcbe6; border-radius: 10px; background: #fff; box-shadow: var(--shadow); pointer-events: none; user-select: none; }
.unavailable-preview-frame img { display: block; width: 100%; height: auto; opacity: .55; filter: grayscale(.6); }
html[data-theme="dark"] .unavailable-preview-frame { border-color: #393947; background: #1f1f2a; }
