:root {
    color-scheme: light;
    --ink: #17233d;
    --ink-soft: #41506b;
    --muted: #7b879b;
    --line: #e7eaf1;
    --line-strong: #dce1eb;
    --canvas: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #fafbfe;
    --brand: #4f46e5;
    --brand-dark: #4038cb;
    --brand-soft: #efefff;
    --green: #138a65;
    --green-soft: #e8f6f0;
    --amber: #b7791f;
    --amber-soft: #fff5df;
    --red: #d45151;
    --red-soft: #fff0ef;
    --blue: #3874cc;
    --blue-soft: #edf4ff;
    --violet: #7957ce;
    --violet-soft: #f2edff;
    --shadow-sm: 0 2px 8px rgb(20 32 60 / 4%), 0 1px 2px rgb(20 32 60 / 3%);
    --shadow-md: 0 20px 60px rgb(22 31 58 / 14%), 0 3px 12px rgb(22 31 58 / 6%);
    --radius-card: 18px;
    --radius-control: 11px;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: var(--canvas); }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgb(79 70 229 / 24%); outline-offset: 2px; }
button:disabled { opacity: .65; cursor: wait; }

.app-root { min-height: 100vh; }
.loading-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.loading-mark, .brand-mark { display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #6b63f1, #443bd2); font-weight: 800; letter-spacing: -.06em; box-shadow: 0 8px 20px rgb(79 70 229 / 24%); }
.loading-mark { width: 46px; height: 46px; border-radius: 16px; font-size: 24px; }

.login-page { display: grid; grid-template-columns: minmax(390px, 1.02fr) minmax(440px, .98fr); min-height: 100vh; background: var(--surface); }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 44px clamp(36px, 6vw, 92px) 32px; color: #fff; background: radial-gradient(circle at 80% 15%, rgb(117 108 255 / 55%), transparent 28%), linear-gradient(145deg, #212b55 0%, #303870 48%, #4d49b8 100%); }
.login-art::after { position: absolute; inset: auto -12% -39% 10%; width: 90%; height: 62%; content: ""; border: 1px solid rgb(255 255 255 / 12%); border-radius: 50%; transform: rotate(-16deg); box-shadow: 0 -30px 0 rgb(255 255 255 / 2%), 0 -60px 0 rgb(255 255 255 / 2%); pointer-events: none; }
.login-art-orb { position: absolute; border: 1px solid rgb(255 255 255 / 12%); border-radius: 50%; pointer-events: none; }
.orb-one { top: 20%; right: -120px; width: 410px; height: 410px; }
.orb-two { top: 26%; right: -75px; width: 320px; height: 320px; border-color: rgb(255 255 255 / 8%); }
.login-brand, .mobile-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-brand .brand-mark, .mobile-brand .brand-mark { width: 43px; height: 43px; border-radius: 14px; color: #403e9e; background: #fff; box-shadow: none; font-size: 23px; }
.login-brand strong, .mobile-brand strong { display: block; font-size: 17px; letter-spacing: -.03em; }
.login-brand span, .mobile-brand span { display: block; margin-top: 2px; font-size: 9px; font-weight: 750; letter-spacing: .23em; opacity: .65; }
.login-art-copy { position: relative; z-index: 1; max-width: 520px; margin-top: auto; margin-bottom: auto; padding: 70px 0 54px; }
.login-art-copy h1 { margin: 18px 0 20px; font-size: clamp(36px, 4.8vw, 61px); line-height: 1.08; font-weight: 640; letter-spacing: -.06em; }
.login-art-copy p { max-width: 360px; color: rgb(255 255 255 / 68%); font-size: 16px; line-height: 1.65; }
.login-art-foot { position: relative; z-index: 1; display: flex; justify-content: space-between; color: rgb(255 255 255 / 58%); font-size: 11px; }
.login-panel { display: grid; place-items: center; padding: 42px; }
.login-box { width: min(100%, 390px); }
.login-box h2 { margin: 11px 0 8px; font-size: 28px; line-height: 1.2; letter-spacing: -.045em; }
.login-box > .muted { margin: 0 0 30px; }
.mobile-brand { display: none; margin-bottom: 36px; }
.login-footnote { margin: 26px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.inline-notice { margin: -12px 0 20px; padding: 11px 13px; color: #8b5c1f; background: #fff7e9; border: 1px solid #f2e4c9; border-radius: 10px; font-size: 13px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; display: flex; flex-direction: column; width: 248px; padding: 27px 17px 18px; background: var(--surface); border-right: 1px solid var(--line); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; margin: 0 9px 42px; }
.sidebar-brand .brand-mark { width: 39px; height: 39px; border-radius: 13px; font-size: 21px; }
.brand-word strong { display: block; font-size: 14px; letter-spacing: -.035em; }
.brand-word span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.sidebar-section-label { margin: 0 11px 10px; color: #9ca5b5; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.main-nav, .sidebar-bottom { display: grid; gap: 5px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; padding: 0 12px; color: #68758d; background: transparent; border: 0; border-radius: 10px; text-align: left; font-size: 13px; font-weight: 580; cursor: pointer; transition: background .16s, color .16s, transform .16s; }
.nav-item:hover { color: var(--ink); background: #f6f7fb; }
.nav-item.is-active { color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; }
.nav-count { margin-left: auto; min-width: 21px; padding: 2px 6px; color: #fff; background: var(--brand); border-radius: 20px; text-align: center; font-size: 10px; font-weight: 750; }
.sidebar-spacer { flex: 1; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 6px 2px; border-top: 1px solid var(--line); }
.sidebar-user-copy { min-width: 0; flex: 1; }
.sidebar-user-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.logout-button { width: 31px !important; height: 31px !important; border: 0 !important; }

.main-area { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 100vh; margin-left: 248px; }
.topbar { position: sticky; z-index: 3; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 98px; padding: 18px clamp(24px, 4vw, 62px); background: rgb(245 247 251 / 92%); border-bottom: 1px solid rgb(226 230 239 / 78%); backdrop-filter: blur(16px); }
.topbar-date { margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.topbar h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.sync-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.sync-dot { width: 7px; height: 7px; background: #28a67a; border-radius: 50%; box-shadow: 0 0 0 3px rgb(40 166 122 / 10%); }
.sync-error { color: var(--red); }
.sync-error .sync-dot { background: var(--red); box-shadow: 0 0 0 3px rgb(212 81 81 / 10%); }
.icon-button { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 39px; height: 39px; color: #62708a; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.icon-button:hover { color: var(--brand); border-color: #d5d5fa; background: #fcfcff; transform: translateY(-1px); }
.notification-button { width: 40px; height: 40px; }
.notification-dot-count { position: absolute; top: -5px; right: -6px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; color: #fff; background: var(--red); border: 2px solid var(--canvas); border-radius: 20px; font-size: 9px; font-weight: 800; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .16s, border-color .16s, box-shadow .16s, transform .16s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--brand); box-shadow: 0 4px 11px rgb(79 70 229 / 19%); }
.button-primary:hover { background: var(--brand-dark); box-shadow: 0 6px 15px rgb(79 70 229 / 25%); }
.button-secondary { color: var(--brand); background: #fff; border-color: #dcdcff; }
.button-secondary:hover { background: #f8f7ff; border-color: #c6c4fb; }
.button-light { color: #53617b; background: #fff; border-color: var(--line-strong); }
.button-light:hover { color: var(--brand); background: #fafaff; border-color: #d4d2fb; }
.button-soft { color: var(--brand); background: var(--brand-soft); }
.button-soft:hover { background: #e5e4ff; }
.button-danger-light { color: #bd4c4c; background: #fffafa; border-color: #f2dcdc; }
.button-danger-light:hover { background: var(--red-soft); border-color: #eecaca; }
.button-small { min-height: 32px; padding: 0 10px; border-radius: 9px; font-size: 11px; }
.button-full { width: 100%; margin-top: 16px; min-height: 48px; }
.button-full span { display: inline-flex; margin-left: auto; }
.is-loading { color: transparent !important; position: relative; }
.is-loading::after { position: absolute; width: 16px; height: 16px; content: ""; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.main-scroll { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 33px clamp(24px, 4vw, 62px) 55px; }
.eyebrow { display: block; color: #8a95a8; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.light-eyebrow { color: rgb(255 255 255 / 65%); }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.welcome-row, .view-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.welcome-row h2, .view-intro h2 { margin: 9px 0 7px; font-size: clamp(23px, 2.5vw, 31px); line-height: 1.2; letter-spacing: -.055em; font-weight: 690; }
.welcome-row p, .view-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.wave { display: inline-block; color: #f4b95d; font-size: 21px; vertical-align: 2px; }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 25px 0 20px; }
.stat-card { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; min-height: 143px; padding: 18px 18px 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); text-align: left; cursor: pointer; transition: border-color .16s, transform .16s, box-shadow .16s; }
.stat-card:hover { transform: translateY(-2px); border-color: #d5d9e6; box-shadow: 0 8px 22px rgb(20 32 60 / 7%); }
.stat-icon { grid-column: 2; grid-row: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; }
.stat-label { grid-column: 1; grid-row: 1; align-self: center; color: #6d7890; font-size: 12px; font-weight: 650; }
.stat-value { grid-column: 1; grid-row: 2; margin-top: 8px; font-size: 29px; line-height: 1; letter-spacing: -.06em; }
.stat-foot { grid-column: 1 / span 2; grid-row: 3; margin-top: 11px; color: #9aa3b2; font-size: 10px; }
.stat-blue .stat-icon { color: var(--blue); background: var(--blue-soft); }
.stat-coral .stat-icon { color: var(--red); background: var(--red-soft); }
.stat-violet .stat-icon { color: var(--violet); background: var(--violet-soft); }
.stat-amber .stat-icon { color: var(--amber); background: var(--amber-soft); }
.stat-green .stat-icon { color: var(--green); background: var(--green-soft); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(320px, .84fr); gap: 17px; align-items: start; }
.overview-staff { grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); }
.task-preview-panel, .team-pulse-panel, .focus-panel, .team-panel, .notifications-panel, .settings-panel, .tasks-panel { padding: 21px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.panel-heading h3 { margin: 6px 0 0; font-size: 16px; letter-spacing: -.035em; }
.text-button { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; color: var(--brand); background: none; border: 0; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.text-button:hover { color: var(--brand-dark); }
.task-list-compact { display: grid; }
.task-compact-row { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 61px; padding: 8px 2px; background: transparent; border: 0; border-top: 1px solid #f0f1f5; text-align: left; cursor: pointer; }
.task-compact-row:first-child { border-top: 0; }
.task-compact-row:hover .compact-task-main strong { color: var(--brand); }
.task-check { display: inline-grid; flex: 0 0 auto; place-items: center; width: 19px; height: 19px; color: #fff; background: #fff; border: 1.5px solid #d8deea; border-radius: 7px; }
.task-check.is-done { background: #24a47b; border-color: #24a47b; }
.compact-task-main { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.compact-task-main strong { overflow: hidden; font-size: 12px; font-weight: 670; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.compact-task-main small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-compact-row > svg { color: #9ba5b7; }
.status-pill, .priority-pill, .role-pill, .repeat-pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; min-height: 23px; padding: 3px 8px; border-radius: 7px; font-size: 10px; font-weight: 680; white-space: nowrap; }
.status-pill i, .priority-pill i, .account-state i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.status-todo { color: #68758b; background: #f0f2f6; }
.status-in_progress { color: #4d65c4; background: #edf0ff; }
.status-blocked { color: #b7791f; background: var(--amber-soft); }
.status-done { color: #1a8a67; background: var(--green-soft); }
.priority-urgent { color: #bb4646; background: #fff0ef; }
.priority-high { color: #b97728; background: #fff5e7; }
.priority-normal { color: #63728a; background: #f0f3f7; }
.priority-low { color: #5b8b78; background: #ecf7f1; }
.repeat-pill { color: #7255bc; background: #f2edff; }
.team-pulse-list { display: grid; }
.team-pulse-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 8px 2px; background: transparent; border: 0; border-top: 1px solid #f0f1f5; text-align: left; cursor: pointer; }
.team-pulse-row:first-child { border-top: 0; }
.team-pulse-row > svg { margin-left: 2px; color: #a5adbb; }
.team-pulse-name { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.team-pulse-name strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.team-pulse-name small, .team-pulse-metrics small { color: var(--muted); font-size: 9px; }
.team-pulse-metrics { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.team-pulse-metrics b { font-size: 10px; font-weight: 700; }
.text-overdue, .due-overdue { color: var(--red) !important; }
.text-quiet { color: #98a2b2 !important; font-size: 10px; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; color: #514bc4; background: #eeedff; border: 1px solid #e3e1ff; font-weight: 750; letter-spacing: -.02em; }
.avatar-small { width: 34px; height: 34px; border-radius: 12px; font-size: 10px; }
.avatar-medium { width: 37px; height: 37px; border-radius: 13px; font-size: 10px; }
.avatar-tiny { width: 23px; height: 23px; border-radius: 8px; font-size: 8px; }
.profile-avatar { border-radius: 50%; font-size: 18px; }
.avatar-small.profile-avatar { font-size: 15px; }
.avatar-tiny.profile-avatar { font-size: 11px; }
.profile-avatar-sparkles, .profile-avatar-star { background: #fff5df; border-color: #f7e6bb; }
.profile-avatar-rocket, .profile-avatar-bolt { background: #fff0ec; border-color: #f7d8d0; }
.profile-avatar-leaf, .profile-avatar-mountain { background: #eaf7ef; border-color: #d5ebdd; }
.profile-avatar-target, .profile-avatar-sun { background: #fff4e6; border-color: #f2dfc4; }
.profile-avatar-moon, .profile-avatar-heart { background: #f2edff; border-color: #e1d8fa; }
.profile-avatar-smile { background: #eaf3ff; border-color: #d8e7fa; }
.profile-avatar-coffee { background: #f5eee8; border-color: #e9ddd2; }
.focus-panel { min-height: 215px; background: linear-gradient(135deg, #fff, #faf9ff); }
.focus-panel p { margin: 18px 0 18px; color: #758198; font-size: 12px; line-height: 1.7; }
.focus-panel p strong { color: var(--ink-soft); }
.focus-spark { display: grid; place-items: center; width: 32px; height: 32px; color: #a47a35; background: #fff5df; border-radius: 10px; }

.view-intro { margin-bottom: 23px; }
.view-intro h2 { font-size: clamp(22px, 2.2vw, 28px); }
.tasks-panel { padding: 0; overflow: hidden; }
.task-toolbar { display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px 13px; }
.search-box { display: flex; align-items: center; gap: 9px; width: min(320px, 40%); height: 39px; padding: 0 11px; color: #8b96a9; background: #fafbfe; border: 1px solid var(--line); border-radius: 10px; }
.search-box:focus-within { color: var(--brand); background: #fff; border-color: #c9c7fb; box-shadow: 0 0 0 3px rgb(79 70 229 / 8%); }
.search-box input { width: 100%; min-width: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 11px; }
.search-box input::placeholder { color: #a1aabc; }
.filter-group { display: flex; gap: 8px; }
.select-input { width: 100%; min-height: 41px; padding: 0 32px 0 12px; color: #4e5b73; background-color: #fff; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 12px; outline: 0; }
.select-input:focus { border-color: #c4c1fa; box-shadow: 0 0 0 3px rgb(79 70 229 / 8%); }
.filter-select { width: auto; min-width: 128px; min-height: 39px; padding-left: 10px; font-size: 11px; }
.quick-filter-row { display: flex; align-items: center; gap: 6px; padding: 0 20px 13px; border-bottom: 1px solid var(--line); }
.filter-chip { min-height: 29px; padding: 0 10px; color: #778399; background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: 10px; font-weight: 650; cursor: pointer; }
.filter-chip:hover { color: var(--brand); background: #f7f6ff; }
.filter-chip.selected { color: var(--brand); background: var(--brand-soft); }
.result-count { margin-left: auto; color: #99a2b1; font-size: 10px; }
.task-table-wrap, .team-table-wrap { width: 100%; overflow-x: auto; }
.task-table, .team-table { width: 100%; border-collapse: collapse; text-align: left; }
.task-table thead, .team-table thead { background: #fbfcfe; }
.task-table th, .team-table th { height: 39px; padding: 0 13px; color: #909aab; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 760; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.task-table th:first-child, .task-table td:first-child, .team-table th:first-child, .team-table td:first-child { padding-left: 21px; }
.task-table th:last-child, .task-table td:last-child, .team-table th:last-child, .team-table td:last-child { padding-right: 20px; }
.task-table td, .team-table td { height: 63px; padding: 7px 13px; border-bottom: 1px solid #f0f2f6; font-size: 11px; }
.task-table tbody tr:last-child td, .team-table tbody tr:last-child td { border-bottom: 0; }
.task-table-row { cursor: pointer; transition: background .12s; }
.task-table-row:hover { background: #fafaff; }
.task-title-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.task-title-cell > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.task-title-cell strong { overflow: hidden; max-width: 320px; font-size: 11px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.task-title-cell small { overflow: hidden; max-width: 320px; color: #909bad; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.owner-cell { display: inline-flex; align-items: center; gap: 7px; color: #65728a; white-space: nowrap; }
.due-cell { display: flex; flex-direction: column; gap: 3px; color: #68758a; white-space: nowrap; }
.due-cell small { color: var(--red); font-size: 9px; font-weight: 700; }
.row-more { display: inline-grid; place-items: center; width: 29px; height: 29px; color: #9da6b4; background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.row-more:hover { color: var(--brand); background: #f1f0ff; }
.task-cards-mobile, .team-cards-mobile { display: none; }
.task-mobile-card { display: block; width: 100%; padding: 14px 15px; background: #fff; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.mobile-card-head { display: flex; align-items: flex-start; gap: 10px; }
.mobile-card-head strong { padding-top: 1px; font-size: 12px; line-height: 1.5; }
.mobile-card-meta, .mobile-card-foot { display: flex; align-items: center; gap: 7px; margin: 11px 0 0 29px; }
.mobile-card-foot { justify-content: space-between; color: var(--muted); font-size: 10px; }

.team-panel { padding: 0; overflow: hidden; }
.team-panel .panel-heading { margin: 0; padding: 20px 21px 16px; }
.team-panel-note { color: #8994a7; font-size: 10px; }
.team-member-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.team-member-cell > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.team-member-cell strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.team-member-cell small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.role-pill { min-height: 23px; padding: 3px 9px; }
.role-admin { color: #6e54bc; background: #f2edff; }
.role-staff { color: #4c6a96; background: #edf4ff; }
.account-state { display: inline-flex; align-items: center; gap: 7px; color: #168a67; font-size: 10px; font-weight: 650; white-space: nowrap; }
.account-state i { width: 6px; height: 6px; }
.state-inactive { color: #9099a8; }
.workload-count { color: var(--ink-soft); font-weight: 700; }
.workload-count small { color: var(--muted); font-weight: 500; }

.notification-list { display: grid; }
.notifications-load-more { display: flex; justify-content: center; padding: 16px 0 2px; }
.notification-row { display: flex; align-items: flex-start; gap: 13px; padding: 16px 2px; border-top: 1px solid #f0f1f5; }
.notification-row:first-child { border-top: 0; }
.notification-unread .notification-copy strong { color: var(--brand); }
.notification-icon { display: grid; flex: 0 0 auto; place-items: center; width: 35px; height: 35px; color: var(--brand); background: var(--brand-soft); border-radius: 12px; }
.notification-copy { min-width: 0; flex: 1; }
.notification-copy strong { font-size: 12px; }
.notification-copy p { margin: 5px 0; color: #64718a; font-size: 11px; line-height: 1.5; }
.notification-copy small { color: #9aa4b3; font-size: 9px; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 17px; align-items: start; }
.settings-panel .panel-heading { margin-bottom: 4px; }
.setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 19px 0; border-top: 1px solid #f0f1f5; }
.setting-row > div { max-width: 480px; }
.setting-row strong { display: block; font-size: 12px; }
.setting-row p { margin: 5px 0 0; color: #7e899c; font-size: 11px; line-height: 1.55; }
.setting-row small { display: block; margin-top: 5px; color: #9aa4b2; font-size: 9px; line-height: 1.4; }
.setting-warning { color: #b86645 !important; }
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 40px; height: 23px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 40px; height: 23px; background: #dfe3ec; border-radius: 20px; transition: background .16s; }
.switch span::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; content: ""; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgb(20 32 60 / 17%); transition: transform .16s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(17px); }
.switch input:disabled + span { opacity: .55; cursor: not-allowed; }
.setting-note { padding: 12px 13px; color: #6d7890; background: #f7f8fc; border-radius: 10px; font-size: 10px; line-height: 1.55; }
.profile-detail { display: flex; justify-content: space-between; gap: 15px; padding: 14px 0; border-top: 1px solid #f0f1f5; }
.profile-detail span { color: var(--muted); font-size: 10px; }
.profile-detail strong { overflow: hidden; max-width: 70%; font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.profile-icon-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.profile-icon-choice { display: grid; justify-items: center; gap: 5px; min-height: 68px; padding: 8px 4px; color: #69758b; background: #fff; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: background .14s, border-color .14s, transform .14s; }
.profile-icon-choice:hover { transform: translateY(-1px); border-color: #c9c7fb; background: #fcfbff; }
.profile-icon-choice.is-selected { color: var(--brand); background: var(--brand-soft); border-color: #bcb9f7; box-shadow: 0 0 0 2px rgb(79 70 229 / 7%); }
.profile-icon-choice > span { font-size: 21px; line-height: 1.2; }
.profile-icon-choice small { font-size: 9px; font-weight: 650; }

.password-field { position: relative; }
.password-field .text-input { padding-right: 66px; }
.password-toggle { position: absolute; top: 50%; right: 8px; padding: 6px 7px; color: var(--brand); background: transparent; border: 0; border-radius: 7px; font-size: 10px; font-weight: 750; cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover { background: var(--brand-soft); }
.remember-control { display: flex; align-items: center; gap: 8px; margin: 7px 0 1px; color: #67748b; font-size: 11px; cursor: pointer; }
.remember-control input { accent-color: var(--brand); }

.empty-state { display: grid; justify-items: center; padding: 38px 18px 42px; text-align: center; }
.empty-state-icon, .empty-icon { display: grid; place-items: center; width: 43px; height: 43px; color: #736de0; background: #f0efff; border-radius: 15px; }
.empty-state h3 { margin: 12px 0 4px; font-size: 13px; letter-spacing: -.02em; }
.empty-state p { max-width: 320px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.empty-card { display: grid; justify-items: center; max-width: 560px; margin: 50px auto; padding: 36px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); text-align: center; box-shadow: var(--shadow-sm); }
.empty-icon { font-weight: 800; font-size: 20px; }
.empty-card h3 { margin: 15px 0 7px; font-size: 17px; }
.empty-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.content-loading { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 210px; color: var(--muted); font-size: 12px; }
.spinner { width: 18px; height: 18px; border: 2px solid #deddfb; border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; overflow-y: auto; background: rgb(19 27 48 / 46%); backdrop-filter: blur(5px); animation: fade-in .12s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(100%, 610px); max-height: min(90vh, 900px); overflow-y: auto; background: #fff; border: 1px solid rgb(255 255 255 / 65%); border-radius: 19px; box-shadow: var(--shadow-md); animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: .75; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-detail { width: min(100%, 680px); padding: 22px 24px 0; }
.modal-form { padding: 22px 24px 0; }
.modal-small { width: min(100%, 450px); padding-bottom: 2px; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.modal-header h2 { max-width: 525px; margin: 7px 0 0; font-size: 20px; line-height: 1.3; letter-spacing: -.045em; }
.modal-form-stack { gap: 8px; }
.field-label { display: block; margin: 3px 0 2px; color: #4c5a73; font-size: 11px; font-weight: 680; }
.required-mark { color: #db6262; }
.optional-label { margin-left: 5px; color: #9aa3b2; font-size: 9px; font-weight: 500; }
.text-input { width: 100%; min-height: 42px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 12px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.text-input::placeholder { color: #a6afbd; }
.text-input:focus { border-color: #bab7f5; box-shadow: 0 0 0 3px rgb(79 70 229 / 8%); }
.textarea-input { min-height: 82px; resize: vertical; line-height: 1.5; }
.form-stack { display: grid; gap: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-field { min-width: 0; }
.form-field .field-label { margin: 3px 0 7px; }
.form-error { min-height: 0; color: var(--red); font-size: 10px; line-height: 1.4; }
.form-error:not(:empty) { padding: 9px 11px; background: var(--red-soft); border-radius: 8px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin: 10px -24px 0; padding: 15px 24px; background: #fbfcfe; border-top: 1px solid var(--line); border-radius: 0 0 19px 19px; }
.modal-footer-split { align-items: center; justify-content: space-between; }
.modal-footer-split > div { display: flex; gap: 8px; }
.modal-footer-split > span { display: inline-flex; align-items: center; }
.modal-user { max-width: 500px; }
.hidden { display: none !important; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 19px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 16px 0; border-top: 1px solid #f0f1f5; border-bottom: 1px solid #f0f1f5; }
.detail-field { display: flex; flex-direction: column; gap: 5px; }
.detail-field span { color: #919bad; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.detail-field strong { color: #4a5872; font-size: 11px; font-weight: 620; }
.detail-description { padding: 16px 0 5px; }
.detail-description p { margin: 7px 0 0; color: #67738a; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.detail-status-change { display: flex; align-items: center; gap: 13px; margin: 13px 0; padding: 12px; background: #fafaff; border: 1px solid #efeffb; border-radius: 11px; }
.status-control-label { color: #65718a; font-size: 10px; font-weight: 700; }
.status-control { width: auto; min-width: 145px; min-height: 34px; padding-top: 0; padding-bottom: 0; font-size: 11px; }
.series-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 13px 0; padding: 12px; background: #fbfaff; border: 1px solid #efedfb; border-radius: 11px; }
.series-controls > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.series-controls strong { font-size: 10px; }
.series-controls span { color: var(--muted); font-size: 9px; }
.series-button-group { display: flex; flex-wrap: wrap; gap: 6px; }
.activity-section { margin-top: 19px; }
.activity-heading { display: flex; align-items: center; justify-content: space-between; color: #9aa3b2; font-size: 9px; }
.activity-list { display: grid; gap: 0; max-height: 190px; margin-top: 10px; overflow-y: auto; }
.activity-item { position: relative; display: flex; gap: 10px; padding: 8px 0; }
.activity-item:not(:last-child)::after { position: absolute; top: 20px; bottom: -8px; left: 4px; width: 1px; content: ""; background: #e7e9f0; }
.activity-dot { z-index: 1; flex: 0 0 auto; width: 9px; height: 9px; margin-top: 4px; background: #bbb9f1; border: 2px solid #f4f3ff; border-radius: 50%; }
.activity-item p { margin: 0 0 3px; color: #738097; font-size: 10px; }
.activity-item p strong { color: #47546c; }
.activity-item small { color: #a0a8b6; font-size: 9px; }
.activity-empty { margin: 11px 0; color: #a0a8b6; font-size: 10px; }
.modal-detail > .modal-footer { margin-top: 15px; }

.toast-region { position: fixed; z-index: 50; top: 17px; right: 18px; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; min-height: 47px; padding: 10px 12px; color: #31405b; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 25px rgb(20 32 60 / 12%); font-size: 11px; line-height: 1.4; pointer-events: auto; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.toast-dot { flex: 0 0 auto; width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.toast-info .toast-dot { background: var(--brand); }
.toast-error .toast-dot { background: var(--red); }
.toast-link { margin-left: auto; padding: 4px; color: var(--brand); background: none; border: 0; font-size: 10px; font-weight: 750; cursor: pointer; }
.toast-leaving { opacity: 0; transform: translateY(-5px); transition: opacity .2s, transform .2s; }

.completion-celebration { position: fixed; z-index: 45; inset: 0; display: grid; place-items: center; overflow: hidden; pointer-events: none; animation: completion-fade 1.45s ease-out both; }
.completion-message { display: grid; justify-items: center; gap: 3px; padding: 16px 23px; color: #264b3b; background: rgb(255 255 255 / 96%); border: 1px solid #d8efe4; border-radius: 18px; box-shadow: 0 14px 40px rgb(25 87 64 / 18%); animation: completion-pop .42s cubic-bezier(.2, 1.5, .5, 1) both; }
.completion-message span { color: #e8ad3d; font-size: 26px; line-height: 1; }
.completion-message strong { font-size: 17px; letter-spacing: -.03em; }
.completion-message small { color: #71877b; font-size: 10px; }
.completion-particle { position: absolute; top: 50%; left: 50%; width: 9px; height: 13px; background: hsl(var(--hue) 78% 58%); border-radius: 3px; animation: completion-burst .9s cubic-bezier(.15,.72,.25,1) both; }
.completion-particle:nth-child(3n) { width: 7px; height: 7px; border-radius: 50%; }
@keyframes completion-burst { from { opacity: 1; transform: translate(-50%, -50%) scale(.4) rotate(0); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(270deg); } }
@keyframes completion-pop { from { opacity: 0; transform: translateY(9px) scale(.7); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes completion-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 1100px) {
    .sidebar { width: 220px; }
    .main-area { margin-left: 220px; }
    .main-scroll { padding-right: 28px; padding-left: 28px; }
    .topbar { padding-right: 28px; padding-left: 28px; }
    .overview-grid { grid-template-columns: 1fr; }
    .overview-staff { grid-template-columns: 1fr; }
    .team-pulse-list { grid-template-columns: 1fr 1fr; column-gap: 18px; }
    .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .team-pulse-row:nth-child(2) { border-top: 0; }
}

@media (max-width: 780px) {
    .sidebar { position: sticky; inset: auto; top: 0; width: 100%; height: auto; min-height: 0; padding: 10px 13px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
    .app-shell { display: flex; flex-direction: column; }
    .sidebar-brand { margin: 0 3px 9px; }
    .sidebar-brand .brand-mark { width: 31px; height: 31px; border-radius: 10px; font-size: 17px; }
    .brand-word strong { font-size: 12px; }
    .brand-word span { font-size: 7px; }
    .sidebar-section-label, .sidebar-spacer, .sidebar-bottom, .sidebar-user { display: none; }
    .main-nav { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
    .main-nav::-webkit-scrollbar { display: none; }
    .nav-item { display: inline-flex; flex: 0 0 auto; width: auto; min-height: 34px; padding: 0 10px; gap: 6px; border-radius: 9px; font-size: 10px; }
    .nav-icon { width: 16px; }
    .nav-icon svg { width: 15px; height: 15px; }
    .nav-count { min-width: 17px; padding: 1px 5px; font-size: 8px; }
    .main-area { min-height: calc(100vh - 99px); margin-left: 0; }
    .topbar { position: relative; min-height: 75px; padding: 13px 17px; }
    .topbar-date { font-size: 9px; }
    .topbar h1 { font-size: 17px; }
    .topbar-actions { gap: 8px; }
    .sync-status { display: none; }
    .icon-button { width: 35px; height: 35px; border-radius: 10px; }
    .notification-button { width: 35px; height: 35px; }
    .button { min-height: 38px; padding: 0 12px; font-size: 11px; }
    .add-task-top { min-height: 36px; }
    .add-task-top span { display: none; }
    .main-scroll { padding: 23px 17px 40px; }
    .welcome-row, .view-intro { align-items: flex-start; margin-bottom: 20px; }
    .welcome-row h2, .view-intro h2 { font-size: 23px; }
    .welcome-row p, .view-intro p { max-width: 380px; font-size: 11px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; margin: 18px 0 14px; }
    .stat-card { min-height: 119px; padding: 14px; border-radius: 13px; }
    .stat-value { margin-top: 4px; font-size: 25px; }
    .stat-foot { margin-top: 8px; font-size: 9px; }
    .stat-icon { width: 29px; height: 29px; border-radius: 9px; }
    .stat-icon svg { width: 16px; height: 16px; }
    .overview-grid { gap: 12px; }
    .task-preview-panel, .team-pulse-panel, .focus-panel, .settings-panel { padding: 16px; border-radius: 15px; }
    .panel-heading h3 { font-size: 14px; }
    .text-button { font-size: 10px; }
    .task-compact-row { min-height: 58px; }
    .task-compact-row .status-pill { display: none; }
    .task-toolbar { flex-direction: column; padding: 13px 13px 10px; gap: 9px; }
    .search-box { width: 100%; height: 37px; }
    .filter-group { overflow-x: auto; }
    .filter-select { flex: 1; min-width: 0; }
    .quick-filter-row { gap: 2px; padding: 0 11px 9px; overflow-x: auto; scrollbar-width: none; }
    .quick-filter-row::-webkit-scrollbar { display: none; }
    .filter-chip { flex: 0 0 auto; min-height: 27px; padding: 0 8px; font-size: 9px; }
    .result-count { display: none; }
    .task-table-wrap { display: none; }
    .task-cards-mobile { display: block; }
    .task-mobile-card:last-child { border-bottom: 0; }
    .task-mobile-card { padding: 13px; }
    .team-panel { padding: 0; }
    .team-panel .panel-heading { padding: 16px; }
    .team-table-wrap { display: none; }
    .team-cards-mobile { display: grid; }
    .team-mobile-card { padding: 13px 16px; border-top: 1px solid #f0f1f5; }
    .team-mobile-meta { display: flex; align-items: center; gap: 8px; margin: 11px 0 0 47px; }
    .team-mobile-meta .button { margin-left: auto; }
    .team-panel-note { display: none; }
    .settings-grid { grid-template-columns: 1fr; gap: 12px; }
    .notification-row { gap: 10px; }
    .modal-backdrop { align-items: end; padding: 0; }
    .modal { width: 100%; max-height: 94vh; border-radius: 18px 18px 0 0; }
    .modal-detail, .modal-form { padding: 18px 17px 0; }
    .modal-footer { margin-right: -17px; margin-left: -17px; padding-right: 17px; padding-left: 17px; }
    .modal-header h2 { font-size: 18px; }
}

@media (max-width: 480px) {
    .login-page { grid-template-columns: 1fr; min-height: 100vh; }
    .login-art { display: none; }
    .login-panel { place-items: start center; padding: 38px 24px; }
    .mobile-brand { display: flex; margin-bottom: 46px; }
    .login-box h2 { font-size: 25px; }
    .login-box > .muted { margin-bottom: 25px; }
    .login-footnote { margin-top: 21px; }
    .topbar { padding-right: 13px; padding-left: 13px; }
    .topbar-actions { gap: 6px; }
    .notification-button { width: 33px; height: 33px; }
    .main-scroll { padding-right: 12px; padding-left: 12px; }
    .welcome-row, .view-intro { gap: 10px; }
    .welcome-row h2, .view-intro h2 { font-size: 21px; }
    .welcome-row > .button, .view-intro > .button { flex: 0 0 auto; min-height: 34px; padding: 0 9px; font-size: 9px; }
    .welcome-row > .button svg, .view-intro > .button svg { width: 14px; }
    .stats-grid { gap: 8px; }
    .stat-card { min-height: 111px; padding: 12px; }
    .stat-label { font-size: 10px; }
    .stat-foot { letter-spacing: -.02em; }
    .task-preview-panel, .team-pulse-panel, .focus-panel, .settings-panel { padding: 14px 12px; }
    .task-compact-row { gap: 8px; }
    .compact-task-main strong { font-size: 11px; }
    .compact-task-main small { font-size: 9px; }
    .team-pulse-list { grid-template-columns: 1fr; }
    .team-pulse-row:nth-child(2) { border-top: 1px solid #f0f1f5; }
    .team-pulse-metrics { display: none; }
    .form-row { grid-template-columns: 1fr; gap: 8px; }
    .detail-grid { gap: 12px 8px; }
    .detail-status-change { align-items: flex-start; flex-direction: column; }
    .status-control { width: 100%; }
    .series-controls { align-items: flex-start; flex-direction: column; }
    .notification-row { flex-wrap: wrap; }
    .notification-copy { min-width: calc(100% - 55px); }
    .modal-footer-split { align-items: flex-start; flex-direction: column; }
    .modal-footer-split > div { width: 100%; justify-content: flex-end; }
    .team-mobile-meta { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
