@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--paper:#f6f5f1;--white:#fff;--ink:#242820;--muted:#85887f;--line:#e6e5de;--green:#476b4e;--green-dark:#36533c;--green-pale:#e8eee5;--orange:#d88b5a;--shadow:0 12px 40px #25291d0a}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:14px}button,input,textarea,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #a9c4a5;outline-offset:2px}h1,h2,h3,p{margin-top:0}h1,h2,h3,.brand b,.stat-card strong{font-family:Manrope,sans-serif;letter-spacing:-.04em}h1{font-size:clamp(29px,3vw,42px);line-height:1.12;margin-bottom:12px}h2{font-size:22px;margin-bottom:8px}p{line-height:1.65}.muted{color:var(--muted)}.eyebrow{font-size:10px;letter-spacing:.15em;font-weight:700;color:#8a8d81;margin-bottom:12px}.app-shell{min-height:100vh}.topbar{height:78px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 5.2%;background:#f9f8f4}.brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none}.brand b{display:block;font-size:16px;letter-spacing:-.03em}.brand small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.brand-mark{width:52px;height:52px;background:var(--green);color:white;border-radius:17px;display:grid;place-items:center;font-family:Manrope,sans-serif;font-weight:800;letter-spacing:-.06em;font-size:17px;box-shadow:inset 0 0 0 1px #ffffff22}.brand-mark.small{width:38px;height:38px;border-radius:12px;font-size:13px}.top-actions{display:flex;align-items:center;gap:24px}.top-actions form{margin:0}.secure-label{font-size:11px;color:#777c70;display:flex;align-items:center;gap:8px}.secure-label i{width:7px;height:7px;background:#6e9871;border-radius:50%;display:block}.quiet-button,.text-button{border:0;background:transparent;color:#65695f;font-size:12px}.main-layout{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:calc(100vh - 78px)}.sidebar{padding:34px 20px 24px 5.2%;border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:calc(100vh - 78px)}.sidebar-heading{display:flex;align-items:center;justify-content:space-between;padding:0 8px 14px}.sidebar-heading .eyebrow{margin:0}.icon-button{border:1px solid var(--line);background:var(--white);width:34px;height:34px;border-radius:11px;color:#65695f;font-size:20px;display:grid;place-items:center}.icon-button:hover,.secondary:hover{border-color:#c5c9be;background:#fff}.project-list{display:grid;gap:5px}.project-item{display:flex;align-items:center;gap:11px;padding:12px 10px;border-radius:12px;border:1px solid transparent;background:transparent;text-align:left;color:var(--ink);width:100%;min-width:0}.project-item.active{background:#fff;border-color:var(--line);box-shadow:0 3px 12px #25291d06}.project-symbol{flex:0 0 34px;height:34px;border-radius:10px;background:#e9e6db;display:grid;place-items:center;color:#797966;font-size:15px}.project-item:nth-child(3n+2) .project-symbol{background:#e5ebe2;color:#4e7353}.project-item:nth-child(3n+3) .project-symbol{background:#f3e5da;color:#a36c43}.project-item-copy{min-width:0;flex:1}.project-item-copy strong{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}.project-item-copy small{font-size:10px;color:var(--muted);display:block;margin-top:5px}.sidebar-note{margin-top:auto;background:#eeeee7;border-radius:14px;padding:15px 13px;display:flex;gap:10px;align-items:flex-start}.note-icon{width:25px;height:25px;border-radius:8px;background:#fff;display:grid;place-items:center;color:var(--green);flex:0 0 25px}.sidebar-note b{font-size:11px}.sidebar-note p{font-size:10px;color:var(--muted);line-height:1.55;margin:5px 0 0}.workspace{padding:37px clamp(24px,4.2vw,64px) 24px;min-width:0;max-width:1400px;width:100%;margin:0 auto}.project-header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:27px}.project-header h1{margin-bottom:9px}.breadcrumbs{display:flex;gap:9px;align-items:center;font-size:10px;color:#999b92;margin-bottom:22px}.project-description{color:#777b70;max-width:650px;margin-bottom:0;font-size:13px}.header-buttons{display:flex;align-items:center;gap:8px;flex-shrink:0}.secondary,.primary{border-radius:10px;padding:10px 14px;font-weight:600;font-size:11px;display:inline-flex;align-items:center;justify-content:center;gap:12px;transition:background .15s,border .15s}.secondary{border:1px solid var(--line);background:#fff;color:#51564c}.primary{border:1px solid var(--green);background:var(--green);color:white;box-shadow:0 4px 10px #476b4e18}.primary:hover{background:var(--green-dark)}.primary span{font-size:15px}.danger{color:#9b6255}.stats-grid{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:12px;margin-bottom:26px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:18px 20px;min-height:118px}.stat-label{font-size:9px;letter-spacing:.12em;color:#8b8f82;font-weight:700;display:block}.stat-card strong{display:block;font-size:32px;font-weight:700;margin:8px 0 2px}.stat-card small{font-size:10px;color:#96998f}.stat-line{display:flex;justify-content:space-between;align-items:center}.stat-line strong{font-size:20px;margin:0}.progress-track{height:6px;border-radius:10px;background:#edf0e9;overflow:hidden;margin:14px 0 9px}.progress-fill{height:100%;width:0;background:#719573;border-radius:10px;transition:width .25s}.tabs{display:flex;gap:27px;border-bottom:1px solid var(--line);margin-bottom:24px}.tab{padding:0 0 14px;border:0;border-bottom:2px solid transparent;background:transparent;color:#92958b;font-size:12px;font-weight:600;margin-bottom:-1px}.tab.active{color:var(--green);border-bottom-color:var(--green)}.tab span{font-size:10px;background:#eeeee8;border-radius:6px;padding:3px 6px;margin-left:5px;color:#85897e}.tab.active span{background:#e6ece3;color:var(--green)}.section-head{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:19px}.section-head h2{margin-bottom:4px}.section-head p{font-size:11px;color:#92958b;margin-bottom:0}.stages-layout{display:grid;grid-template-columns:minmax(200px,.78fr) minmax(0,1.5fr);gap:17px;align-items:start}.stage-list{display:grid;gap:9px}.stage-row{border:1px solid var(--line);border-radius:13px;background:#fff;display:flex;align-items:flex-start;gap:11px;padding:14px 12px;text-align:left;width:100%;color:var(--ink)}.stage-row.selected{border-color:#a9bca8;box-shadow:0 0 0 2px #e4ece2}.stage-dot{width:24px;height:24px;border-radius:50%;border:1px solid #d8dcd2;display:grid;place-items:center;color:#7c8c79;font-size:11px;flex:0 0 24px}.stage-row.done .stage-dot{background:var(--green);border-color:var(--green);color:white}.stage-row-copy{min-width:0;flex:1}.stage-row-copy strong{font-size:11px;line-height:1.5;display:block;font-weight:600}.stage-row-copy small{font-size:9px;color:#96998f;display:block;margin-top:5px}.stage-row .row-arrow{color:#a1a399;font-size:15px;margin-top:2px}.detail-card{border:1px solid var(--line);background:#fff;border-radius:15px;padding:22px;min-width:0}.detail-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:19px}.status-pill{font-size:9px;font-weight:700;border-radius:7px;padding:6px 9px;background:#f5eadd;color:#a56c42;white-space:nowrap}.status-pill.done{background:#e6eee3;color:#4b7950}.status-pill.planned{background:#eeeee9;color:#818579}.detail-title{font-size:21px;margin:0 0 9px}.detail-notes{font-size:12px;line-height:1.7;color:#74786e;white-space:pre-wrap;margin-bottom:20px}.detail-image{width:100%;aspect-ratio:16/8;object-fit:cover;border-radius:10px;background:#f0f0ea;display:block}.detail-photo-placeholder{aspect-ratio:16/7;border-radius:10px;background:linear-gradient(135deg,#e8e8df,#f3f0e7);display:grid;place-items:center;color:#9b9e91;font-size:12px;gap:6px}.detail-photo-placeholder span{font-size:24px}.detail-photo-strip{display:flex;gap:8px;overflow:auto;margin-top:9px}.detail-photo-strip img{width:66px;height:55px;object-fit:cover;border-radius:7px;border:1px solid var(--line)}.detail-footer{border-top:1px solid var(--line);padding-top:17px;margin-top:18px;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.detail-footer .secondary,.detail-footer .primary{font-size:10px;padding:9px 11px}.detail-edit{display:grid;gap:10px}.detail-edit label,.modal-form label{font-size:10px;font-weight:700;color:#777b70}.detail-edit input,.detail-edit textarea,.detail-edit select,.modal-form input:not([type=file]),.modal-form textarea,.modal-form select{width:100%;border:1px solid #e1e2da;background:#fcfcfa;border-radius:9px;padding:11px 12px;color:var(--ink);font-size:12px;resize:vertical}.detail-edit textarea{min-height:92px;line-height:1.5}.detail-edit-actions{display:flex;gap:8px;justify-content:flex-end}.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.photo-card{border:1px solid var(--line);border-radius:13px;overflow:hidden;background:white;min-width:0}.photo-card img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block;background:#eeeee8}.photo-card-body{padding:11px}.photo-card-body p{font-size:11px;line-height:1.5;margin:0 0 9px;overflow-wrap:anywhere}.photo-card-body .photo-meta{font-size:9px;color:#96998f;margin-bottom:9px}.photo-card-actions{display:flex;gap:8px}.mini-button{border:1px solid var(--line);border-radius:7px;background:#fff;padding:6px 8px;font-size:10px;color:#686d62}.summary-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:clamp(20px,4vw,36px);max-width:900px}.summary-top{display:flex;justify-content:space-between;gap:15px}.summary-top .muted{font-size:10px}.summary-card h2{font-size:28px;margin:10px 0}.summary-card>p{font-size:12px;color:#74786e;max-width:650px}.summary-metrics{display:flex;gap:40px;padding:21px 0;margin:20px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.summary-metrics div{display:grid;gap:4px}.summary-metrics strong{font-family:Manrope,sans-serif;font-size:23px}.summary-metrics span{font-size:10px;color:#92958b}.summary-stages{display:grid;gap:0}.summary-stage{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid #efeee9;padding:12px 0;font-size:11px}.summary-stage:last-child{border:0}.summary-stage span:last-child{color:#7e8e78;white-space:nowrap}.workspace-footer{display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding-top:17px;margin-top:34px;font-size:10px;color:#96998f}.workspace-footer i{font-style:normal;margin:0 5px}.empty-state{max-width:590px;margin:10vh auto;text-align:center}.empty-art{height:150px;position:relative;display:flex;align-items:center;justify-content:center;margin-bottom:25px}.empty-art span{position:absolute;width:80px;height:90px;background:#fff;border:1px solid var(--line);border-radius:14px;display:grid;place-items:center;font-size:25px;box-shadow:var(--shadow)}.empty-art span:nth-child(1){transform:translate(-47px,5px) rotate(-12deg);color:#a4b59e}.empty-art span:nth-child(2){transform:translate(0,-5px);color:#647c61}.empty-art span:nth-child(3){transform:translate(47px,7px) rotate(12deg);color:#d59a72}.empty-state h1{font-size:39px}.empty-state>.muted{max-width:390px;margin:0 auto 23px;font-size:13px}.loading{padding:12px;color:#999;font-size:11px}.modal{border:1px solid var(--line);border-radius:18px;padding:0;width:min(520px,calc(100% - 28px));max-width:520px;box-shadow:0 24px 90px #22291c30;background:#fff;color:var(--ink)}.modal::backdrop{background:#20251e77;backdrop-filter:blur(3px)}.modal-form{padding:26px;display:grid;gap:9px}.modal-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:10px}.modal-heading h2{margin:0}.close-dialog{font-size:21px}.field-help{font-size:10px;color:#989b91;margin:-3px 0 4px}.modal-form input[type=file]{font-size:11px;padding:12px;border:1px dashed #cfd3c7;background:#fafaf7;border-radius:9px;width:100%}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:12px}.upload-progress{background:#edf2ea;border-radius:8px;padding:10px;color:var(--green);font-size:11px}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#27352a;color:white;border-radius:10px;padding:12px 17px;font-size:12px;box-shadow:0 8px 25px #0002;transition:all .2s;z-index:20;max-width:calc(100% - 30px)}.toast.show{opacity:1;transform:translate(-50%,0)}.login-body{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at 50% 30%,#fdfcf8 0%,#f3f2ec 65%)}.login-card{width:min(410px,100%);background:white;border:1px solid var(--line);border-radius:20px;padding:37px;box-shadow:0 20px 70px #22291c0b}.login-card .brand-mark{margin-bottom:23px}.login-card h1{font-size:31px;margin-bottom:10px}.login-card>.muted{font-size:12px;margin-bottom:25px}.login-card form{display:grid;gap:9px}.login-card label{font-size:11px;font-weight:700;color:#686d62}.login-card input{padding:13px;border:1px solid var(--line);border-radius:9px;font-size:13px;margin-bottom:7px}.full{width:100%;padding:13px}.fine-print{font-size:10px;color:#9a9d93;text-align:center;margin:22px 0 0}.error-message{font-size:11px;color:#9d5147;background:#f9ebe8;padding:10px;border-radius:8px;margin-bottom:12px}.error-message[hidden]{display:none}
@media(max-width:1000px){.main-layout{grid-template-columns:220px minmax(0,1fr)}.sidebar{padding-left:18px;padding-right:14px}.workspace{padding:30px 24px}.stages-layout{grid-template-columns:1fr}.stage-list{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-card{margin-top:2px}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.topbar{height:66px;padding:0 16px}.brand small{display:none}.secure-label{display:none}.main-layout{display:block;min-height:calc(100vh - 66px)}.sidebar{min-height:0;border-right:0;border-bottom:1px solid var(--line);padding:15px 16px}.sidebar-heading{padding:0 2px 10px}.project-list{display:flex;overflow-x:auto;gap:7px;padding-bottom:3px}.project-item{width:180px;flex:0 0 180px;padding:9px}.sidebar-note{display:none}.workspace{padding:25px 16px 22px}.project-header{display:block}.header-buttons{margin-top:18px;justify-content:flex-start}.stats-grid{grid-template-columns:1fr 1fr;gap:8px}.stat-card{padding:14px;min-height:100px}.progress-card{grid-column:1/-1;min-height:95px}.stat-card strong{font-size:27px}.tabs{gap:20px}.section-head{align-items:flex-start;flex-direction:column}.section-head>.secondary,.section-head>.primary{align-self:flex-start}.stage-list{grid-template-columns:1fr}.detail-card{padding:16px}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.photo-card-body{padding:9px}.summary-metrics{gap:23px}.summary-metrics strong{font-size:20px}.workspace-footer{align-items:flex-start}.workspace-footer .text-button{max-width:130px;text-align:right}.empty-state{margin:7vh auto}.empty-state h1{font-size:33px}.login-card{padding:27px}.modal-form{padding:20px}}


/* DARK THEME */
html[data-theme="dark"] body {
  background: #15191e;
  color: #e8edf2;
}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .stage-card,
html[data-theme="dark"] .photo-card,
html[data-theme="dark"] .report-card {
  background-color: #20262d;
  color: #e8edf2;
  border-color: #39434e;
}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: #171c22;
  color: #f0f3f6;
  border-color: #46515d;
}
html[data-theme="dark"] button.secondary {
  background: #303943;
  color: #f0f3f6;
  border-color: #46515d;
}
html[data-theme="dark"] a { color: #9bc8ad; }
html[data-theme="dark"] .muted,
html[data-theme="dark"] small { color: #b1bbc5; }

/* Пользовательская настройка оформления */
html[data-custom-colors="1"] body {
  background-color: var(--custom-bg) !important;
  color: var(--custom-text) !important;
}

html[data-custom-colors="1"] body h1,
html[data-custom-colors="1"] body h2,
html[data-custom-colors="1"] body h3,
html[data-custom-colors="1"] body p,
html[data-custom-colors="1"] body label,
html[data-custom-colors="1"] body li,
html[data-custom-colors="1"] body span {
  color: var(--custom-text);
}

html[data-custom-colors="1"] body main,
html[data-custom-colors="1"] body section,
html[data-custom-colors="1"] body article,
html[data-custom-colors="1"] body .card,
html[data-custom-colors="1"] body .panel,
html[data-custom-colors="1"] body .container,
html[data-custom-colors="1"] body .modal,
html[data-custom-colors="1"] body form {
  background-color: var(--custom-card);
  color: var(--custom-text);
}

html[data-custom-colors="1"] body a {
  color: var(--custom-accent);
}

html[data-custom-colors="1"] body button:not(#theme-toggle):not(#appearance-settings-button),
html[data-custom-colors="1"] body input[type="submit"] {
  accent-color: var(--custom-accent);
}

html[data-custom-colors="1"] body input,
html[data-custom-colors="1"] body textarea,
html[data-custom-colors="1"] body select {
  accent-color: var(--custom-accent);
}
