:root {
  --gold: #edae32;
  --gold-strong: #c67a23;
  --gold-soft: #fff4d7;
  --ink: #1f2933;
  --muted: #75808e;
  --line: #e6e2da;
  --canvas: #f6f4ef;
  --surface: #ffffff;
  --sidebar: #fbfaf7;
  --danger: #c84646;
  --green: #2f8f72;
  --shadow: 0 18px 50px rgba(67, 55, 34, .11);
  --shadow-sm: 0 7px 24px rgba(63, 53, 37, .08);
  --radius: 18px;
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #f1f2f3;
  --muted: #a5adb8;
  --line: #35383d;
  --canvas: #17191c;
  --surface: #22252a;
  --sidebar: #1c1f23;
  --gold-soft: #3c3020;
  --shadow: 0 20px 60px rgba(0, 0, 0, .3);
  --shadow-sm: 0 7px 24px rgba(0, 0, 0, .22);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.auth-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; min-height: 100dvh; padding: 28px; overflow: auto; background: linear-gradient(145deg, #f9f6ef 0%, #fffaf0 50%, #f0e4ce 100%); }
.auth-screen[hidden] { display: none; }
.auth-orb { position: fixed; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.auth-orb-one { top: -180px; right: -120px; width: 520px; height: 520px; background: radial-gradient(circle at 35% 35%, rgba(255, 218, 139, .7), rgba(198, 122, 35, .08)); }
.auth-orb-two { bottom: -240px; left: -170px; width: 560px; height: 560px; border: 90px solid rgba(237, 174, 50, .12); }
.auth-card { position: relative; width: min(440px, 100%); padding: 32px; border: 1px solid rgba(199, 159, 90, .28); border-radius: 28px; background: rgba(255, 255, 255, .88); box-shadow: 0 30px 90px rgba(91, 62, 20, .15); backdrop-filter: blur(20px); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.auth-logo { display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid #eed6aa; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(172, 111, 25, .14); overflow: hidden; }
.auth-logo img { width: 46px; height: 38px; object-fit: contain; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { color: #1f2933; font-size: 17px; }
.auth-brand span { margin-top: 3px; color: #7f766a; font-size: 11px; }
.auth-copy { margin-bottom: 22px; }
.auth-kicker { color: #a96c18; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-copy h1 { margin-top: 7px; color: #202833; font-size: 31px; }
.auth-copy p { margin: 8px 0 0; color: #7c8188; font-size: 13px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 12px; background: #f4f0e8; }
.auth-tabs button { min-height: 38px; border: 0; border-radius: 9px; color: #777b80; background: transparent; font-size: 12px; font-weight: 700; }
.auth-tabs button.active { color: #6f4510; background: #fff; box-shadow: 0 3px 12px rgba(80, 56, 22, .09); }
.auth-form label { display: block; margin: 12px 0 6px; color: #62676d; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.auth-form input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #ddd8cf; border-radius: 12px; outline: 0; color: #202833; background: #fff; transition: .2s; }
.auth-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(237, 174, 50, .14); }
.password-field { position: relative; }
.password-field input { padding-right: 66px; }
.password-field button { position: absolute; top: 7px; right: 7px; height: 34px; padding: 0 9px; border: 0; border-radius: 8px; color: #a26918; background: #fff4d7; font-size: 10px; font-weight: 700; }
.auth-message { min-height: 19px; margin-top: 10px; color: #b33f3f; font-size: 11px; line-height: 1.45; }
.auth-message.success { color: #2f7f65; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 49px; margin-top: 3px; border: 0; border-radius: 13px; color: #33230d; background: linear-gradient(135deg, #f4c454, #dc9228); box-shadow: 0 10px 24px rgba(198, 122, 35, .23); font-weight: 800; }
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 13px 28px rgba(198, 122, 35, .28); }
.auth-submit:disabled { opacity: .62; cursor: wait; transform: none; }
.auth-submit svg { width: 17px; }
.auth-foot { margin: 19px 0 0; color: #969089; font-size: 9px; line-height: 1.5; text-align: center; }
.app-shell.auth-hidden { display: none; }
.app-shell { display: grid; grid-template-columns: 284px minmax(440px, 1fr) 0; height: 100dvh; transition: grid-template-columns .28s ease; }
.app-shell.detail-open { grid-template-columns: 284px minmax(440px, 1fr) 390px; }

.sidebar { display: flex; flex-direction: column; min-width: 0; padding: 24px 18px 18px; background: var(--sidebar); border-right: 1px solid var(--line); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 7px 22px; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid #eed6aa; border-radius: 15px; background: #fff; overflow: hidden; box-shadow: 0 5px 16px rgba(172, 111, 25, .12); }
.brand-mark img { width: 44px; height: 34px; object-fit: contain; }
.brand strong { display: block; font: 700 16px/1.2 Inter, ui-sans-serif, sans-serif; }
.brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.sidebar-close { display: none !important; margin-left: auto; }

.search-wrap { position: relative; display: flex; align-items: center; margin-bottom: 18px; }
.search-wrap > svg { position: absolute; left: 13px; width: 18px; color: var(--muted); pointer-events: none; }
.search-wrap input { width: 100%; height: 43px; padding: 0 48px 0 40px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: var(--surface); transition: border .2s, box-shadow .2s; }
.search-wrap input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(237, 174, 50, .14); }
.search-wrap kbd { position: absolute; right: 9px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--canvas); font: 500 10px/1.2 inherit; }

.nav-list, .custom-lists { display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 42px; padding: 9px 11px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); text-align: left; transition: .16s ease; }
.nav-item:hover { background: color-mix(in srgb, var(--gold-soft) 48%, transparent); }
.nav-item.active { background: var(--gold-soft); color: var(--gold-strong); font-weight: 600; }
.nav-item svg { width: 19px; flex: 0 0 19px; }
.nav-item .label { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { min-width: 24px; color: var(--muted); font-size: 12px; text-align: right; }
.nav-separator { height: 1px; margin: 16px 10px 13px; background: var(--line); }
.custom-lists { min-height: 0; flex: 1; overflow-y: auto; scrollbar-width: thin; }
.group-block { margin-bottom: 9px; }
.group-head { display: flex; align-items: center; width: 100%; padding: 8px 9px 5px; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.group-head svg { width: 15px; margin-right: 8px; transition: transform .2s; }
.group-head.collapsed svg { transform: rotate(-90deg); }
.group-head .group-name { flex: 1; text-align: left; }
.group-more { opacity: 0; width: 26px; padding: 2px; border: 0; background: transparent; color: var(--muted); }
.group-head:hover .group-more { opacity: 1; }
.list-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--list-color, var(--gold)); }
.list-more { opacity: 0; display: grid; place-items: center; width: 28px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.list-more svg { width: 17px; }
.nav-item:hover .list-more { opacity: 1; }
.sidebar-actions { display: grid; grid-template-columns: 1fr 42px; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border: 0; border-radius: 11px; background: transparent; color: var(--gold-strong); font-weight: 600; }
.sidebar-actions button:hover { background: var(--gold-soft); }
.profile-card { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-align: left; }
.profile-card .avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--gold), var(--gold-strong)); font-size: 11px; font-weight: 700; }
.profile-card > span:nth-child(2) { min-width: 0; flex: 1; }
.profile-card strong, .profile-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card strong { font-size: 12px; }
.profile-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.profile-card > svg { width: 17px; color: var(--muted); }

.main { min-width: 0; overflow: hidden auto; padding: 36px clamp(26px, 5vw, 78px) 60px; background: radial-gradient(circle at 85% 5%, color-mix(in srgb, var(--gold-soft) 65%, transparent), transparent 35%), var(--canvas); }
.topbar { display: flex; align-items: flex-start; gap: 18px; max-width: 1040px; margin: 0 auto; }
.menu-btn { display: none !important; }
.heading-wrap { min-width: 0; flex: 1; }
.eyebrow { margin-bottom: 7px; color: var(--gold-strong); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font: 700 clamp(30px, 4vw, 44px)/1.05 Inter, ui-sans-serif, sans-serif; letter-spacing: -.04em; }
.heading-wrap p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); }
.icon-btn:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); color: var(--gold-strong); }
.select-button { position: relative; display: flex; align-items: center; height: 42px; padding-left: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); }
.select-button svg { width: 17px; }
.select-button select { height: 100%; padding: 0 32px 0 8px; border: 0; outline: 0; appearance: none; background: transparent; color: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.select-button::after { content: "⌄"; position: absolute; right: 11px; top: 9px; pointer-events: none; }

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 1040px; margin: 28px auto 20px; }
.summary-card { position: relative; min-height: 84px; padding: 17px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 93%, transparent); box-shadow: var(--shadow-sm); }
.summary-card::after { content: ""; position: absolute; right: -16px; bottom: -25px; width: 70px; height: 70px; border-radius: 50%; background: var(--accent, var(--gold-soft)); opacity: .7; }
.summary-card span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.summary-card strong { font: 700 22px/1 Inter, ui-sans-serif, sans-serif; }
.summary-card small { margin-left: 5px; color: var(--muted); font-size: 11px; }

.quick-add { display: flex; align-items: center; max-width: 1040px; min-height: 62px; margin: 0 auto 14px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border .2s, box-shadow .2s; }
.quick-add:focus-within { border-color: var(--gold); box-shadow: 0 12px 34px rgba(196, 129, 29, .13), 0 0 0 3px rgba(237, 174, 50, .1); }
.quick-add > button:first-child { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--gold), var(--gold-strong)); }
.quick-add > input { min-width: 0; flex: 1; height: 44px; padding: 0 12px; border: 0; outline: 0; background: transparent; font-size: 15px; }
.quick-add > input::placeholder { color: var(--muted); }
.quick-actions { display: flex; gap: 4px; }
.quick-actions label, .quick-actions button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.quick-actions label:hover, .quick-actions button:hover, .quick-actions button.active { color: var(--gold-strong); background: var(--gold-soft); }
.quick-actions label input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.quick-actions label.has-value { color: var(--gold-strong); background: var(--gold-soft); }
.task-toolbar { display: flex; align-items: center; justify-content: space-between; max-width: 1040px; margin: 0 auto 10px; padding: 8px 4px; color: var(--muted); font-size: 12px; }
.task-toolbar button { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: inherit; }
.task-toolbar button:hover { color: var(--ink); }
.task-toolbar svg { width: 15px; }

.task-list { display: flex; flex-direction: column; gap: 8px; max-width: 1040px; margin: 0 auto; }
.task-card { display: grid; grid-template-columns: 30px minmax(0, 1fr) 40px; align-items: center; gap: 11px; min-height: 66px; padding: 11px 12px 11px 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 3px 12px rgba(49, 42, 31, .035); transition: transform .15s, border .15s, box-shadow .15s; cursor: pointer; }
.task-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); box-shadow: var(--shadow-sm); }
.task-card.selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(237, 174, 50, .12); }
.check-btn { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 1.8px solid #b8bec6; border-radius: 50%; background: transparent; color: #fff; }
.check-btn svg { width: 15px; opacity: 0; }
.check-btn:hover { border-color: var(--gold); }
.task-card.completed .check-btn { border-color: var(--green); background: var(--green); }
.task-card.completed .check-btn svg { opacity: 1; }
.task-copy { min-width: 0; }
.task-title { display: block; overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.task-card.completed .task-title { color: var(--muted); text-decoration: line-through; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; margin-top: 6px; color: var(--muted); font-size: 10.5px; }
.task-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task-meta svg { width: 12px; height: 12px; }
.task-meta .overdue { color: var(--danger); }
.tag-chip { padding: 2px 6px; border-radius: 6px; color: var(--gold-strong); background: var(--gold-soft); font-weight: 600; }
.star-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #a7aeb8; }
.star-btn:hover { background: var(--gold-soft); color: var(--gold-strong); }
.star-btn.active { color: var(--gold-strong); }
.star-btn.active svg { fill: currentColor; }
.empty-state { display: grid; place-items: center; min-height: 310px; padding: 40px; text-align: center; }
.empty-illustration { position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin-bottom: 18px; border-radius: 30px; color: var(--gold-strong); background: var(--gold-soft); transform: rotate(-5deg); }
.empty-illustration svg { width: 40px; height: 40px; transform: rotate(5deg); }
.empty-state h2 { margin: 0 0 7px; font: 700 18px/1.3 Inter, ui-sans-serif, sans-serif; }
.empty-state p { max-width: 330px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.detail-panel { min-width: 0; overflow: hidden; border-left: 1px solid var(--line); background: var(--sidebar); }
.detail-panel > div { width: 390px; height: 100%; overflow-y: auto; }
.detail-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 9px; padding: 17px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--sidebar) 95%, transparent); backdrop-filter: blur(14px); }
.detail-head .detail-close { margin-left: auto; }
.detail-head .check-btn { flex: 0 0 25px; }
.detail-title { min-width: 0; flex: 1; padding: 7px 8px; border: 1px solid transparent; border-radius: 8px; outline: 0; background: transparent; font-weight: 700; }
.detail-title:focus { border-color: var(--line); background: var(--surface); }
.detail-head .check-btn.done svg { opacity: 1; }
.detail-body { padding: 17px; }
.detail-action { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 48px; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.detail-action:hover { border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }
.detail-action > svg { width: 18px; color: var(--muted); }
.detail-action > span { min-width: 0; flex: 1; font-size: 12px; font-weight: 600; }
.detail-action.active { color: var(--gold-strong); background: var(--gold-soft); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-card { margin-bottom: 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.field-card label { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.field-card label svg { width: 14px; }
.field-card input, .field-card select, .field-card textarea { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; }
.field-card textarea { min-height: 98px; resize: vertical; line-height: 1.5; }
.field-help { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.steps-card { margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.steps-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 11px; font-weight: 700; }
.step-item { display: grid; grid-template-columns: 22px minmax(0,1fr) 24px; align-items: center; gap: 7px; min-height: 36px; border-bottom: 1px solid var(--line); }
.step-item:last-of-type { border-bottom: 0; }
.step-item input[type="checkbox"] { accent-color: var(--green); }
.step-item input[type="text"] { min-width: 0; border: 0; outline: 0; background: transparent; font-size: 11px; }
.step-item.done input[type="text"] { color: var(--muted); text-decoration: line-through; }
.step-remove { border: 0; background: transparent; color: var(--muted); }
.step-remove svg { width: 14px; }
.add-step { display: flex; align-items: center; gap: 7px; width: 100%; margin-top: 8px; padding: 8px; border: 0; border-radius: 8px; background: var(--canvas); color: var(--gold-strong); font-size: 11px; font-weight: 600; }
.attachments { margin-top: 8px; }
.attachment-item { display: flex; align-items: center; gap: 7px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 10px; }
.attachment-item a { min-width: 0; flex: 1; overflow: hidden; color: var(--gold-strong); text-overflow: ellipsis; white-space: nowrap; }
.attachment-item button { border: 0; background: transparent; color: var(--danger); }
.attachment-picker { position: relative; }
.attachment-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.detail-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.delete-task { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--danger); }
.delete-task:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }

.app-dialog { width: min(520px, calc(100vw - 28px)); max-height: min(82dvh, 720px); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.app-dialog::backdrop { background: rgba(22, 20, 17, .38); backdrop-filter: blur(3px); }
.dialog-inner { padding: 22px; }
.dialog-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.dialog-head > div { flex: 1; }
.dialog-head h2 { margin: 0; font: 700 20px/1.25 Inter, ui-sans-serif, sans-serif; }
.dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.dialog-close { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--canvas); color: var(--muted); }
.dialog-form label { display: block; margin: 13px 0 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.dialog-form input, .dialog-form select { width: 100%; height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--canvas); }
.dialog-form input:focus, .dialog-form select:focus { border-color: var(--gold); }
.color-row { display: flex; gap: 8px; }
.color-choice { width: 30px; height: 30px; padding: 0; border: 3px solid var(--surface); border-radius: 50%; background: var(--choice); box-shadow: 0 0 0 1px var(--line); }
.color-choice.active { box-shadow: 0 0 0 2px var(--ink); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.btn { min-height: 42px; padding: 0 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 12px; font-weight: 700; }
.btn.primary { border-color: var(--gold); color: #3b2a11; background: var(--gold); }
.btn.danger { border-color: var(--danger); color: #fff; background: var(--danger); }
.btn.danger-outline { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); background: transparent; }
.suggestion-list { display: flex; flex-direction: column; gap: 7px; max-height: 48vh; overflow-y: auto; }
.suggestion-item { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; }
.suggestion-item > span { min-width: 0; flex: 1; }
.suggestion-item strong, .suggestion-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-item strong { font-size: 12px; }
.suggestion-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.suggestion-item button { width: 32px; height: 32px; border: 0; border-radius: 9px; color: var(--gold-strong); background: var(--gold-soft); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.settings-action { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); text-align: left; }
.settings-action svg { width: 18px; color: var(--gold-strong); }
.settings-action span { display: block; font-size: 11px; font-weight: 700; }
.settings-action small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.settings-action.admin-accent { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); background: var(--gold-soft); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 12px; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 42px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #c5cad0; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(18px); }
.trash-list { max-height: 270px; overflow-y: auto; }
.trash-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trash-item span { min-width: 0; flex: 1; }
.trash-item strong, .trash-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-item strong { font-size: 11px; }
.trash-item small { color: var(--muted); font-size: 9px; }
.trash-item button { border: 0; background: transparent; color: var(--gold-strong); }
.admin-loading, .dialog-error { padding: 28px 4px; color: var(--muted); font-size: 12px; text-align: center; }
.dialog-error { color: var(--danger); }
.admin-users { display: flex; flex-direction: column; gap: 8px; max-height: 54vh; overflow-y: auto; }
.admin-user { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--canvas); }
.admin-user.suspended { opacity: .62; }
.admin-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, var(--gold), var(--gold-strong)); font-size: 10px; font-weight: 800; }
.admin-user-copy { min-width: 0; }
.admin-user-copy strong, .admin-user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-copy strong { font-size: 11px; }
.admin-user-copy strong em { margin-left: 4px; padding: 2px 5px; border-radius: 5px; color: var(--gold-strong); background: var(--gold-soft); font-size: 8px; font-style: normal; }
.admin-user-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.admin-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.admin-actions button { padding: 2px 4px; border: 0; color: var(--gold-strong); background: transparent; font-size: 8px; font-weight: 700; }
.admin-actions button.danger-link { color: var(--danger); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; display: flex; align-items: center; gap: 12px; min-width: 220px; max-width: calc(100vw - 30px); padding: 12px 15px; border-radius: 12px; color: #fff; background: #25282d; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { margin-left: auto; border: 0; color: #f8c65a; background: transparent; font-size: 11px; font-weight: 700; }
.mobile-scrim { display: none; }

@media (max-width: 1120px) {
  .app-shell.detail-open { grid-template-columns: 250px minmax(420px, 1fr) 350px; }
  .sidebar { padding-inline: 14px; }
  .detail-panel > div { width: 350px; }
  .main { padding-inline: 30px; }
}

@media (max-width: 860px) {
  .app-shell, .app-shell.detail-open { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 87vw); transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close, .menu-btn { display: grid !important; }
  .mobile-scrim { position: fixed; inset: 0; z-index: 15; display: block; background: rgba(22, 20, 17, .4); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .mobile-scrim.show { opacity: 1; pointer-events: auto; }
  .main { height: 100dvh; padding: 24px 20px 100px; }
  .detail-panel { position: fixed; inset: auto 0 0; z-index: 30; height: min(88dvh, 760px); border: 0; border-radius: 23px 23px 0 0; box-shadow: 0 -20px 60px rgba(30, 25, 18, .18); transform: translateY(105%); transition: transform .28s ease; }
  .detail-panel.open { transform: translateY(0); }
  .detail-panel > div { width: 100%; }
  .detail-panel::before { content: ""; position: absolute; top: 8px; left: 50%; z-index: 4; width: 38px; height: 4px; border-radius: 4px; background: var(--line); transform: translateX(-50%); }
  .detail-head { padding-top: 22px; }
}

@media (max-width: 560px) {
  .auth-screen { padding: 14px; }
  .auth-card { padding: 24px 20px; border-radius: 22px; }
  .auth-brand { margin-bottom: 25px; }
  .auth-copy h1 { font-size: 27px; }
  .main { padding: 20px 14px 100px; }
  .topbar { gap: 10px; }
  .heading-wrap .eyebrow { font-size: 10px; }
  h1 { font-size: 28px; }
  .heading-wrap p { display: none; }
  .top-actions { gap: 4px; }
  .select-button { width: 42px; padding: 0; justify-content: center; }
  .select-button select { position: absolute; inset: 0; width: 100%; opacity: 0; }
  .select-button::after { display: none; }
  .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 22px; }
  .summary-card { min-height: 70px; padding: 13px 11px; border-radius: 13px; }
  .summary-card span { font-size: 8px; }
  .summary-card strong { font-size: 18px; }
  .summary-card small { display: none; }
  .quick-add { min-height: 58px; }
  .quick-actions label { display: none; }
  .task-card { grid-template-columns: 27px minmax(0,1fr) 36px; gap: 8px; padding-left: 12px; }
  .task-meta { gap: 4px 8px; }
  .task-meta .tag-chip { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .app-dialog { width: calc(100vw - 20px); }
}

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