/* LOD Project System — стилове */
:root {
  --bg: #17181b;
  --side: #1c1d21;
  --card: #212226;
  --card2: #282a2f;
  --line: #2f3137;
  --line2: #3a3d44;
  --text: #ececee;
  --text2: #c4c5ca;
  --muted: #8b8e96;
  --acc: #ff7a1a;
  --acc2: #ff9445;
  --acc-soft: rgba(255, 122, 26, .12);
  --acc-line: rgba(255, 122, 26, .35);
  --ok: #4fc3a1;
  --ok-soft: rgba(79, 195, 161, .13);
  --warn: #f5b041;
  --warn-soft: rgba(245, 176, 65, .13);
  --err: #ef5f6f;
  --err-soft: rgba(239, 95, 111, .13);
  --idea: #9b7bea;
  --idea-soft: rgba(155, 123, 234, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .18);
  --r: 14px;
  --r-sm: 9px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f4f5;
  --side: #ffffff;
  --card: #ffffff;
  --card2: #f6f6f7;
  --line: #e6e6e9;
  --line2: #d6d6db;
  --text: #18181b;
  --text2: #3f3f46;
  --muted: #74747d;
  --acc: #f26b0f;
  --acc2: #ff8a33;
  --acc-soft: rgba(242, 107, 15, .09);
  --acc-line: rgba(242, 107, 15, .35);
  --ok: #1f9d7a;
  --ok-soft: rgba(31, 157, 122, .1);
  --warn: #c98a12;
  --warn-soft: rgba(201, 138, 18, .1);
  --err: #d83b4c;
  --err-soft: rgba(216, 59, 76, .09);
  --idea: #7a58d6;
  --idea-soft: rgba(122, 88, 214, .09);
  --shadow: 0 1px 2px rgba(20, 20, 30, .05), 0 8px 24px rgba(20, 20, 30, .06);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 15px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--card2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.acc { color: var(--acc); }
.d-block { display: block; margin-top: 4px; }
.ic { flex: none; }
.inline { display: inline; }
::selection { background: var(--acc); color: #fff; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: var(--card2); color: var(--text);
  font: 600 14px var(--font); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--acc); color: #fff; box-shadow: 0 4px 14px rgba(255, 122, 26, .25); }
.btn-primary:hover { background: var(--acc2); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--line2); color: var(--text2); }
.btn-ghost:hover { border-color: var(--acc-line); color: var(--text); background: var(--acc-soft); }
.btn-block { width: 100%; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 46px; font-size: 15px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  transition: .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line2); background: var(--card2); }
.icon-btn-acc { color: var(--acc); border-color: var(--acc-line); }
.icon-btn-acc:hover { background: var(--acc); color: #fff; border-color: var(--acc); }
.icon-btn-danger:hover { color: var(--err); border-color: var(--err); background: var(--err-soft); }
.icon-btn-xs { width: 28px; height: 28px; border: 0; }
.icon-btn.on { color: var(--acc); }
.link { color: var(--acc); background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ---------- полета ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text2); display: flex; justify-content: space-between; }
input, select, textarea {
  width: 100%; font: 500 14.5px var(--font); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
:root[data-theme="light"] input, :root[data-theme="light"] select, :root[data-theme="light"] textarea { background: #fbfbfc; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
textarea { resize: vertical; min-height: 44px; line-height: 1.55; }
select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8e96' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input[type="date"] { color-scheme: inherit; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--acc); }
.field-ic { position: relative; }
.field-ic .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field-ic input { padding-left: 42px; height: 48px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text2); cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--acc); margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.form-sec:first-of-type { border-top: 0; padding-top: 0; margin-top: 4px; }
.select-sm { height: 34px; padding: 0 32px 0 12px; font-size: 13px; width: auto; }

.range { -webkit-appearance: none; appearance: none; height: 6px; padding: 0; border: 0; border-radius: 6px;
  background: linear-gradient(90deg, var(--acc) var(--v, 0%), var(--line) var(--v, 0%)); cursor: pointer; }
.range:focus { box-shadow: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--acc); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--acc); }

/* ---------- съобщения ---------- */
.alert { padding: 11px 14px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; border: 1px solid; margin-bottom: 14px; transition: opacity .4s, transform .4s; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(79,195,161,.3); }
.alert.err { background: var(--err-soft); color: var(--err); border-color: rgba(239,95,111,.3); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(245,176,65,.3); }
.alert.hide { opacity: 0; transform: translateY(-6px); }

/* ---------- вход / инсталатор ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(900px 500px at 85% -10%, var(--acc-soft), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(255,122,26,.06), transparent 60%),
    var(--bg); }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-wide { max-width: 560px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 36px 32px 32px; box-shadow: var(--shadow); }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-logo { height: 54px; width: auto; max-width: 220px; object-fit: contain; }
.auth-title { font-size: 20px; font-weight: 800; margin-top: 14px; letter-spacing: -.01em; }
.auth-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
.theme-fab { position: fixed; top: 18px; right: 18px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text2); cursor: pointer; display: grid; place-items: center; }
.theme-fab:hover { color: var(--acc); border-color: var(--acc-line); }
.req { display: grid; gap: 6px; margin-bottom: 18px; }
.req-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 12px; background: var(--card2); border-radius: 8px; }
.req-row b { margin-left: auto; font-size: 12px; }
.req-row .dot { width: 8px; height: 8px; border-radius: 50%; }
.req-row.ok .dot { background: var(--ok); } .req-row.ok b { color: var(--ok); }
.req-row.bad .dot { background: var(--err); } .req-row.bad b { color: var(--err); }

/* лого по тема */
.logo-d { display: none; }
:root:not([data-theme="light"]) .logo-l { display: none; }
:root:not([data-theme="light"]) .logo-d { display: inline-block; }
.t-light { display: none; }
:root[data-theme="light"] .t-dark { display: none; }
:root[data-theme="light"] .t-light { display: inline-flex; }

/* ---------- оформление ---------- */
.app { display: flex; min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: 252px; background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 16px 16px; z-index: 40; transition: transform .25s;
}
.side-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 8px 20px; }
.side-brand .logo { height: 40px; width: auto; max-width: 170px; object-fit: contain; }
.side-name { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.side-new { margin-bottom: 18px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text2); font-weight: 600; font-size: 14px; position: relative; transition: .15s;
}
.side-nav a:hover { background: var(--card2); color: var(--text); }
.side-nav a.on { background: var(--acc-soft); color: var(--acc); }
.side-nav a.on::before { content: ''; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc); }
.side-nav em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); background: var(--card2); padding: 1px 8px; border-radius: 20px; }
.side-nav a.on em { background: var(--acc-soft); color: var(--acc); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.theme-btn { display: flex; align-items: center; height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--text2); font: 600 13px var(--font); cursor: pointer; }
.theme-btn span { align-items: center; gap: 9px; display: inline-flex; }
.theme-btn:hover { border-color: var(--acc-line); color: var(--acc); }
:root[data-theme="light"] .theme-btn .t-dark { display: none; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-sm); background: var(--card2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: #fff; font-weight: 800; font-size: 14px; flex: none; }
.uname { font-weight: 700; font-size: 13.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side-user .icon-btn { border: 0; }
.side-shade { display: none; }

.main { flex: 1; margin-left: 252px; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 14px 32px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; height: 40px; background: var(--card); }
.search-sm { max-width: 280px; }
.search-sm input { height: 34px; font-size: 13px; }
.top-up { margin-left: auto; }
.content { padding: 28px 32px 60px; max-width: 1400px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 13px; margin-bottom: 14px; }
.back:hover { color: var(--acc); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-head .link { font-size: 13px; }
.empty-s { color: var(--muted); font-size: 13.5px; }

/* ---------- табло ---------- */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; position: relative; overflow: hidden; }
.stat-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--card2); color: var(--muted); margin-bottom: 14px; }
.stat-n { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-l { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 3px; }
.stat-accent { background: linear-gradient(140deg, var(--acc) 0%, #e8590c 100%); border-color: transparent; color: #fff; }
.stat-accent .stat-ic { background: rgba(255,255,255,.18); color: #fff; }
.stat-accent .stat-l { color: rgba(255,255,255,.82); }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card-wide { grid-column: 1 / -1; }

.donut-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut { width: 156px; height: 156px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--ok) 0 var(--a1), var(--acc) var(--a1) var(--a2), var(--idea) var(--a2) 360deg); }
.donut[style*="--empty"] { background: var(--line); }
.donut-in { width: 116px; height: 116px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-in b { font-size: 26px; font-weight: 800; }
.donut-in span { font-size: 11px; color: var(--muted); font-weight: 600; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13.5px; flex: 1; min-width: 160px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend b { margin-left: auto; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.lg-done { background: var(--ok); } .lg-dev { background: var(--acc); } .lg-idea { background: var(--idea); }

.bars { display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 32px; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; }
.bar-row:hover { background: var(--card2); }
.bar-name { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 8px; background: var(--card2); border-radius: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 8px; background: var(--muted); min-width: 2px; }
.bar-row b { text-align: right; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }

.progress { display: block; height: 6px; background: var(--card2); border-radius: 6px; overflow: hidden; flex: 1; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc2)); border-radius: 6px; transition: width .3s; }
.plist { display: grid; gap: 2px; }
.prow { display: grid; grid-template-columns: 1fr 120px 40px; align-items: center; gap: 14px; padding: 9px 8px; border-radius: 8px; font-size: 13.5px; }
.prow:hover { background: var(--card2); }
.prow-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pct { text-align: right; font-size: 13px; }
.ver { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--acc); background: var(--acc-soft); padding: 1px 7px; border-radius: 20px; vertical-align: 2px; white-space: nowrap; }
.ver-lg { font-size: 13px; vertical-align: 5px; padding: 2px 10px; }

.rlist { display: grid; gap: 2px; }
.rrow { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 8px; }
.rrow:hover { background: var(--card2); }
.rrow-m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rrow-m b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow-m small { color: var(--muted); font-size: 12px; }
.zip-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none;
  color: var(--c, var(--acc)); background: color-mix(in srgb, var(--c, var(--acc)) 14%, transparent); }

.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.st-done { color: var(--ok); background: var(--ok-soft); }
.st-dev { color: var(--acc); background: var(--acc-soft); }
.st-idea { color: var(--idea); background: var(--idea-soft); }

.empty-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); padding: 24px; border: 1.5px dashed var(--line2); border-radius: var(--r-sm); font-size: 13px; transition: .15s; }
.empty-drop:hover { border-color: var(--acc); color: var(--acc); }

.notes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.note { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; border-top: 3px solid var(--c, var(--line)); transition: border-color .15s, transform .15s; }
a.note:hover { transform: translateY(-2px); border-color: var(--line2); }
.note b, .note-t { font-size: 14px; }
.note p { font-size: 13.5px; color: var(--text2); white-space: pre-line; word-wrap: break-word; }
.note small { color: var(--muted); font-size: 11.5px; margin-top: auto; }
.note.pinned { border-color: var(--acc-line); background: linear-gradient(180deg, var(--acc-soft), var(--card2) 60%); }
.note-pin { position: absolute; top: 10px; right: 10px; color: var(--acc); }
.notes-grid .note p { white-space: normal; }

/* ---------- проекти ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips-tight { margin-bottom: 0; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600; color: var(--text2); transition: .15s; }
.chip:hover { border-color: var(--line2); color: var(--text); }
.chip em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.on em { color: inherit; opacity: .6; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar-r { display: flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.seg a, .seg button, .seg-radio label span { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: 7px; font: 600 13px var(--font); color: var(--muted); background: none; border: 0; cursor: pointer; transition: .15s; white-space: nowrap; }
.seg a:hover, .seg button:hover { color: var(--text); }
.seg a.on, .seg button.on { background: var(--acc); color: #fff; }
.seg-full { display: flex; }
.seg-full > * { flex: 1; }
.seg-radio label { flex: 1; display: flex; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio label span { flex: 1; }
.seg-radio input:checked + span { background: var(--acc); color: #fff; }
.seg-radio input:focus-visible + span { box-shadow: 0 0 0 2px var(--acc-line); }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; transition: border-color .15s, transform .15s, box-shadow .15s; overflow: hidden; }
.pcard::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--c); opacity: .85; }
.pcard:hover { border-color: var(--line2); transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard-link { position: absolute; inset: 0; z-index: 1; }
.pcard .tag, .pcard .icon-btn { position: relative; z-index: 2; }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard-cat { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pcard h3 { font-size: 16.5px; line-height: 1.35; }
.pcard-purpose { color: var(--text2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--card2); color: var(--text2); border: 1px solid var(--line); }
a.tag:hover, .tag-btn:hover { border-color: var(--acc-line); color: var(--acc); }
.tag-btn { cursor: pointer; font-family: var(--font); }
.tag-btn.on { background: var(--acc-soft); color: var(--acc); border-color: var(--acc-line); }
.pcard-prog { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 4px; }
.pcard-prog b { font-size: 12.5px; width: 36px; text-align: right; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty h3 { color: var(--text); }
.empty .btn { margin-top: 8px; }

/* ---------- детайли ---------- */
.phero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 26px 24px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); margin-bottom: 18px; overflow: hidden; }
.phero::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); }
.phero::after { content: ''; position: absolute; right: -80px; top: -120px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%); pointer-events: none; }
.phero-m { position: relative; z-index: 1; min-width: 0; }
.phero-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.phero h1 { font-size: 28px; line-height: 1.2; }
.phero-purpose { color: var(--text2); font-size: 15px; margin-top: 6px; }
.phero-act { position: relative; z-index: 1; display: flex; gap: 8px; align-items: center; }
.phero-act .icon-btn { width: 40px; height: 40px; }

.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 18px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 18px; min-width: 0; }
.pct-lg { font-size: 22px; font-weight: 800; color: var(--acc); }
.quickprog { display: grid; gap: 18px; }
.desc { color: var(--text2); font-size: 14.5px; line-height: 1.7; word-wrap: break-word; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 4px; font-size: 13.5px; }
.meta dt { color: var(--muted); font-weight: 600; }
.meta dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.meta dd .tags { justify-content: flex-end; }
.filebox { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--card2); border-radius: var(--r-sm); margin-bottom: 14px; }
.filebox div { display: flex; flex-direction: column; min-width: 0; }
.filebox b { font-size: 13.5px; overflow-wrap: anywhere; }
.filebox small { font-size: 12px; }
.detail-side .meta + .btn { margin-top: 14px; }

.zipdet summary { list-style: none; cursor: pointer; margin-bottom: 0; }
.zipdet summary::-webkit-details-marker { display: none; }
.zipdet summary h2::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--acc); transition: transform .2s; }
.zipdet[open] summary h2::before { transform: rotate(90deg); }
.zipdet[open] summary { margin-bottom: 14px; }
.ziplist { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.ziplist li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.ziplist li:last-child { border-bottom: 0; }
.ziplist li span { overflow-wrap: anywhere; color: var(--text2); }
.ziplist li em { font-style: normal; color: var(--muted); white-space: nowrap; }

.note-quick { display: grid; gap: 8px; margin-bottom: 14px; }
.note-quick .btn { justify-self: end; }
.nlist { display: grid; gap: 8px; }
.nitem { display: flex; gap: 10px; padding: 12px 14px; background: var(--card2); border-radius: var(--r-sm); border-left: 3px solid var(--line2); }
.nitem.pinned { border-left-color: var(--acc); }
.nitem-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nitem-b p { font-size: 13.5px; color: var(--text2); overflow-wrap: anywhere; }
.nitem-b small { font-size: 11.5px; }
.nitem-a { display: flex; gap: 4px; align-items: flex-start; }
.nitem-a .icon-btn { border: 0; width: 30px; height: 30px; }

/* ---------- форма за проект ---------- */
.edit-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.edit-main { display: grid; gap: 18px; min-width: 0; }
.edit-main .card { display: flex; flex-direction: column; gap: 14px; }
.edit-side { display: grid; gap: 12px; position: sticky; top: 90px; }
.edit-side .card { display: flex; flex-direction: column; gap: 14px; }
.tech-sug { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }

.dropzone { position: relative; border: 2px dashed var(--line2); border-radius: var(--r); padding: 30px 20px; text-align: center; transition: border-color .2s, background .2s; cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--acc); background: var(--acc-soft); }
.dropzone.over .dz-ic { transform: translateY(-4px) scale(1.06); }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dz-empty b { font-size: 16px; }
.dz-empty .muted { font-size: 13px; }
.dz-ic { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); margin-bottom: 8px; transition: transform .2s; }
.dz-progress, .dz-file { display: none; align-items: center; gap: 14px; text-align: left; }
.dropzone.uploading { cursor: default; border-style: solid; }
.dropzone.uploading .dz-empty, .dropzone.has-file .dz-empty { display: none; }
.dropzone.uploading .dz-progress { display: flex; }
.dropzone.has-file { border-style: solid; border-color: var(--acc-line); background: var(--acc-soft); padding: 16px; cursor: default; }
.dropzone.has-file .dz-file { display: flex; }
.dz-name { font-weight: 700; font-size: 13.5px; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-pct { font-weight: 800; color: var(--acc); width: 44px; text-align: right; }
.dz-progress .progress { height: 8px; }
.dz-file-m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dz-file-m b { overflow-wrap: anywhere; }
.dz-file-m small { font-size: 12.5px; }
.current-file { font-size: 13px; padding: 12px 14px; background: var(--card2); border-radius: var(--r-sm); }
.current-file .check { margin-left: 10px; }

/* глобално пускане */
.drop-overlay { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.drop-overlay.on { display: grid; }
.drop-overlay-in { width: min(560px, 100%); padding: 56px 24px; border: 2.5px dashed var(--acc); border-radius: 24px; background: var(--acc-soft);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--acc); pointer-events: none; }
.drop-overlay-in b { font-size: 20px; color: var(--text); }
.drop-overlay-in span { color: var(--muted); font-size: 13.5px; }
.drop-overlay .progress { width: 100%; height: 8px; margin-top: 10px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 120; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 13.5px; transition: .25s; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--err); color: #fff; }

/* ---------- категории ---------- */
.cat-add { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cat-add > input { flex: 1; min-width: 200px; }
.swatches { display: flex; gap: 6px; }
.sw { cursor: pointer; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw span { display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--c); border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line2); transition: .15s; }
.sw input:checked + span { box-shadow: 0 0 0 2px var(--c); transform: scale(1.1); }
.cat-list { display: grid; gap: 10px; margin-top: 18px; }
.cat-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, opacity .15s; }
.cat-item:hover { border-color: var(--line2); }
.cat-item.dragging { opacity: .4; }
.cat-item.drag-over { border-color: var(--acc); }
.grip { color: var(--muted); cursor: grab; font-size: 14px; letter-spacing: -2px; user-select: none; padding: 0 2px; }
.cat-sw { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); flex: none; }
.cat-m { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cat-m b { font-size: 15px; }
.cat-m small { font-size: 12.5px; }
.cat-m:hover b { color: var(--acc); }
.cat-edit { flex: 1; }

/* ---------- бележки ---------- */
.note-form-card { margin-bottom: 20px; }
.note-form-card.editing { border-color: var(--acc-line); box-shadow: 0 0 0 3px var(--acc-soft); }
.note-form-card .form { gap: 10px; }
.note-form-row { display: flex; gap: 10px; }
.note-form-row select { max-width: 280px; }
.note-title-in { font-weight: 700; }
.note-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-form-foot > div { display: flex; gap: 8px; }
.masonry { columns: 4 260px; column-gap: 14px; }
.masonry .note { break-inside: avoid; margin-bottom: 14px; background: var(--card); }
.masonry .note.pinned { background: linear-gradient(180deg, var(--acc-soft), var(--card) 70%); }
.masonry .note.is-edit { outline: 2px solid var(--acc); }
.note-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note-proj { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.note-proj:hover { color: var(--acc); }
.note-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.note-foot > span { display: flex; }

/* ---------- настройки ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.logo-prev { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp { height: 84px; border-radius: var(--r-sm); display: grid; place-items: center; padding: 14px; border: 1px solid var(--line); }
.lp img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lp-dark { background: #1c1d21; }
.lp-light { background: #ffffff; }
:root[data-theme="dark"] [data-set-theme="dark"], :root:not([data-theme]) [data-set-theme="dark"], :root[data-theme="light"] [data-set-theme="light"] { background: var(--acc); color: #fff; }

/* ---------- адаптивност ---------- */
@media (max-width: 1280px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1080px) {
  .detail-grid, .edit-grid { grid-template-columns: 1fr; }
  .edit-side { position: static; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .side-shade.on { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 20px 16px 50px; }
  .dash-grid { grid-template-columns: 1fr; }
  .top-up span { display: none; }
  .top-up { padding: 0 12px; }
}
@media (max-width: 600px) {
  h1 { font-size: 22px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-n { font-size: 22px; }
  .notes-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .phero { padding: 20px 18px; }
  .phero h1 { font-size: 22px; }
  .phero-act { width: 100%; }
  .phero-act .btn { flex: 1; }
  .prow { grid-template-columns: 1fr 70px 36px; }
  .seg { overflow-x: auto; max-width: 100%; }
  .toolbar { align-items: stretch; }
  .search-sm { max-width: none; flex: 1 1 100%; }
  .note-form-row { flex-direction: column; }
  .note-form-row select { max-width: none; }
  .auth-card { padding: 28px 20px 24px; }
  .bar-row { grid-template-columns: 110px 1fr 28px; }
  .cat-item .btn-sm { display: none; }
}
