
:root{--blue:#0F00FF;--blue2:#2458ff;--bg:#060b12;--line:rgba(255,255,255,.1);--line2:rgba(255,255,255,.16);--text:#f3f7ff;--muted:#8f9bae;--green:#28d17c;--red:#ff4d57;--orange:#ffad3b;--cyan:#25d7e8;--shadow:0 24px 80px rgba(0,0,0,.45)}
*{box-sizing:border-box}body{margin:0;min-height:100vh;font-family:Inter,Arial,sans-serif;color:var(--text);background:var(--bg)}button,input,select,textarea{font-family:inherit}button{cursor:pointer}.hidden{display:none!important}.logo{width:170px;height:auto;display:block;object-fit:contain}.logo.small{width:112px}
.login-page{min-height:100vh;display:grid;grid-template-columns:minmax(360px,1.05fr) minmax(420px,.95fr);background:radial-gradient(circle at 12% 16%,rgba(15,0,255,.34),transparent 26%),radial-gradient(circle at 82% 12%,rgba(36,88,255,.16),transparent 24%),linear-gradient(135deg,#05080f,#070d18 52%,#03050a);overflow:hidden}.login-visual{position:relative;display:flex;align-items:center;padding:72px;overflow:hidden}.login-visual:before{content:"";position:absolute;left:-220px;bottom:-260px;width:760px;height:760px;border-radius:50%;background:radial-gradient(circle,rgba(15,0,255,.25),transparent 54%),repeating-radial-gradient(circle,rgba(255,255,255,.12) 0 1px,transparent 1px 16px);opacity:.65}.login-copy{position:relative;z-index:2;max-width:580px}.login-copy h1{margin:54px 0 0;font-size:clamp(38px,5vw,76px);line-height:.95;letter-spacing:-.06em}.login-copy p{margin:24px 0 0;max-width:460px;font-size:18px;line-height:1.6;color:#aeb8c8}.login-points{display:grid;gap:16px;margin-top:38px;color:#c7d1e0}.login-point{display:flex;align-items:center;gap:12px;font-size:15px}.check{width:24px;height:24px;display:grid;place-items:center;border:1px solid rgba(36,88,255,.7);border-radius:50%;color:#4f77ff}.login-note{position:absolute;left:72px;bottom:42px;color:#8d98ab;font-size:14px;z-index:2}.login-card-wrap{display:flex;align-items:center;justify-content:center;padding:48px;border-left:1px solid var(--line);background:rgba(0,0,0,.16);backdrop-filter:blur(16px)}.login-card{width:min(100%,400px);padding:30px;border:1px solid var(--line2);border-radius:28px;background:linear-gradient(180deg,rgba(21,32,48,.9),rgba(10,16,26,.9));box-shadow:var(--shadow)}.secure-tag{display:inline-flex;gap:8px;margin-bottom:28px;color:#82e9af;font-size:13px}.login-card h2{margin:0 0 22px;font-size:28px;letter-spacing:-.04em}
.field{margin-bottom:16px}.field label{display:block;margin-bottom:8px;color:#d9e0ec;font-size:14px}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line2);border-radius:12px;outline:none;color:var(--text);background:rgba(7,13,22,.82);transition:.22s ease}.field input,.field select{height:48px;padding:0 14px}.field textarea{min-height:96px;padding:14px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:rgba(36,88,255,.9);box-shadow:0 0 0 4px rgba(36,88,255,.14)}.login-options{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:6px 0 22px;font-size:13px;color:#aeb8c8}.login-options a{color:#4f77ff;text-decoration:none}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 18px;border:0;border-radius:12px;font-size:14px;font-weight:700;color:#fff;background:linear-gradient(135deg,var(--blue),var(--blue2));box-shadow:0 16px 32px rgba(36,88,255,.22);transition:.22s ease}.btn:hover{transform:translateY(-1px);filter:brightness(1.08)}.btn.full{width:100%}.btn.ghost{background:rgba(255,255,255,.06);border:1px solid var(--line2);box-shadow:none}.btn.dark{background:rgba(11,18,28,.9);border:1px solid var(--line2);box-shadow:none}.btn.danger{background:rgba(255,77,87,.15);color:#ff9096;border:1px solid rgba(255,77,87,.28);box-shadow:none}.or{display:flex;align-items:center;gap:12px;margin:22px 0 14px;color:#6f7b8d;font-size:12px}.or:before,.or:after{content:"";flex:1;height:1px;background:var(--line)}
.app{min-height:100vh;display:grid;grid-template-columns:260px 1fr;background:radial-gradient(circle at 78% 0,rgba(15,0,255,.18),transparent 32%),radial-gradient(circle at 12% 10%,rgba(37,215,232,.08),transparent 20%),var(--bg)}.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;border-right:1px solid var(--line);background:rgba(8,14,23,.74);backdrop-filter:blur(18px)}.sidebar-head{padding:24px 22px 18px;border-bottom:1px solid var(--line)}.nav{flex:1;padding:16px 12px}.nav-title{padding:10px;color:#647184;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.nav-btn{width:100%;display:flex;align-items:center;gap:12px;min-height:42px;margin-bottom:6px;padding:0 12px;border:0;border-radius:10px;color:#b7c0cf;background:transparent;text-align:left;font-size:14px;transition:.2s ease}.nav-btn:hover{background:rgba(255,255,255,.05);color:#fff}.nav-btn.active{color:#fff;background:linear-gradient(135deg,rgba(15,0,255,.65),rgba(36,88,255,.24));box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}.nav-icon{width:22px;text-align:center}.nav-badge{margin-left:auto;min-width:22px;height:22px;display:grid;place-items:center;border-radius:999px;color:#fff;background:var(--red);font-size:12px;font-weight:800}.user-card{display:flex;align-items:center;gap:12px;padding:16px 18px;border-top:1px solid var(--line);background:rgba(255,255,255,.02)}.avatar{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;color:#fff;background:linear-gradient(135deg,#ffbd7a,#6f8bff);font-weight:800;flex:0 0 auto}.user-name{font-size:13px;font-weight:750}.user-role{margin-top:3px;font-size:12px;color:var(--muted)}
.main{min-width:0;padding:24px 28px 34px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:24px}.page-title{font-size:26px;font-weight:820;letter-spacing:-.04em}.top-actions{display:flex;align-items:center;gap:12px}.role-select{height:42px;padding:0 14px;border:1px solid var(--line2);border-radius:10px;color:var(--text);background:rgba(14,22,34,.85);outline:none}.icon-btn{width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--line2);border-radius:12px;color:#c6cfdc;background:rgba(255,255,255,.04)}
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:24px}.stat-card{position:relative;overflow:hidden;min-height:118px;padding:18px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,rgba(25,37,54,.78),rgba(14,22,34,.72));box-shadow:0 16px 36px rgba(0,0,0,.18)}.stat-card:after{content:"";position:absolute;right:-38px;top:-38px;width:110px;height:110px;border-radius:50%;background:rgba(36,88,255,.13)}.stat-card.red:after{background:rgba(255,77,87,.16)}.stat-card.cyan:after{background:rgba(37,215,232,.14)}.stat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;position:relative;z-index:2}.stat-ico{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:rgba(36,88,255,.18);color:#8fa7ff}.stat-label{color:var(--muted);font-size:13px}.stat-value{margin-top:4px;font-size:30px;font-weight:830;letter-spacing:-.05em}.stat-note{margin-top:8px;color:var(--muted);font-size:12px}.red-text{color:#ff747b}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 14px}.section-title{font-size:22px;font-weight:820;letter-spacing:-.035em}.project-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:28px}.project-card,.report-card,.card{border:1px solid var(--line);background:linear-gradient(180deg,rgba(25,37,54,.72),rgba(12,19,30,.72));box-shadow:0 18px 40px rgba(0,0,0,.16)}.project-card{padding:18px;border-radius:16px;transition:.22s ease}.project-card:hover,.report-card:hover{transform:translateY(-2px);border-color:rgba(36,88,255,.38)}.project-top{display:flex;justify-content:space-between;gap:12px}.project-name{font-weight:820}.project-domain{margin-top:6px;color:var(--muted);font-size:13px}.pill{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;color:#78f0af;background:rgba(40,209,124,.14)}.pill.red{color:#ff8c92;background:rgba(255,77,87,.14)}.pill.gray{color:#ccd2dc;background:rgba(255,255,255,.08)}.project-meta{display:flex;justify-content:space-between;margin-top:18px;color:#c9d2de;font-size:12px}.progress{height:6px;overflow:hidden;margin-top:8px;border-radius:999px;background:rgba(255,255,255,.09)}.progress span{display:block;height:100%;border-radius:inherit;background:var(--green)}.progress.warn span{background:var(--orange)}.progress.bad span{background:var(--red)}.project-update{margin-top:16px;color:var(--muted);font-size:12px;line-height:1.45}.project-actions{display:flex;gap:8px;margin-top:14px}.mini-btn{width:34px;height:34px;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;color:#c5cfdd;background:rgba(255,255,255,.05)}
.content-grid{display:grid;grid-template-columns:1.45fr .95fr;gap:18px}.card{border-radius:18px}.card-pad{padding:18px}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:14px 12px;border-bottom:1px solid var(--line);text-align:left;font-size:13px;vertical-align:middle}.table th{color:var(--muted);font-size:12px}.table small{color:var(--muted)}.table tr:last-child td{border-bottom:0}.admin-layout{display:grid;grid-template-columns:1.1fr .9fr;gap:18px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field.full{grid-column:1/-1}.quick-actions{display:grid;gap:10px;margin-top:14px}.quick-action{display:flex;align-items:center;gap:10px;min-height:46px;padding:0 13px;border:1px solid var(--line);border-radius:12px;color:#d6deeb;background:rgba(255,255,255,.045);font-size:13px;transition:.2s ease}.quick-action:hover{border-color:rgba(36,88,255,.45);background:rgba(36,88,255,.12)}
.report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.report-card{min-height:168px;padding:18px;border-radius:16px;transition:.22s ease;text-decoration:none;color:inherit}.report-ico{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;color:#8fa7ff;background:rgba(36,88,255,.16)}.report-title{margin-top:14px;font-size:17px;font-weight:820}.report-desc{margin-top:8px;min-height:38px;color:var(--muted);font-size:13px;line-height:1.45}.report-link{display:inline-flex;margin-top:14px;color:#88a0ff;font-size:13px;font-weight:760}.required-grid{display:grid;gap:12px}.required-row{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.035)}.required-row.missing{border-color:rgba(255,77,87,.32);background:rgba(255,77,87,.08)}.required-ico{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:rgba(40,209,124,.14);color:var(--green)}.missing .required-ico{background:rgba(255,77,87,.14);color:var(--red)}.required-name{font-weight:780;font-size:14px}.required-hint{margin-top:4px;color:var(--muted);font-size:12px}.activity{display:grid;grid-template-columns:40px 1fr auto;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.activity-title{font-size:13px;font-weight:760}.activity-desc,.activity-time{color:var(--muted);font-size:12px}.activity-desc{margin-top:3px}.toast{position:fixed;right:22px;bottom:22px;max-width:360px;padding:14px 16px;border:1px solid rgba(40,209,124,.28);border-radius:14px;color:#dfffee;background:rgba(13,31,25,.92);box-shadow:var(--shadow);transform:translateY(20px);opacity:0;pointer-events:none;transition:.25s ease;z-index:99}.toast.show{transform:translateY(0);opacity:1}.muted{color:var(--muted);font-size:14px;line-height:1.55;margin:8px 0 18px}.button-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}.mt{margin-top:12px}
@media(max-width:1180px){.stat-grid,.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content-grid,.admin-layout{grid-template-columns:1fr}.report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:860px){.login-page{grid-template-columns:1fr}.login-visual{min-height:420px;padding:40px 24px}.login-note{left:24px}.login-card-wrap{padding:24px;border-left:0}.app{grid-template-columns:1fr}.sidebar{position:static;height:auto}.nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.nav-title{grid-column:1/-1}.user-card{display:none}.main{padding:20px 16px 30px}.topbar{align-items:flex-start;flex-direction:column}.top-actions{width:100%;flex-wrap:wrap}.role-select{flex:1;min-width:180px}}@media(max-width:620px){.stat-grid,.project-grid,.report-grid,.form-grid{grid-template-columns:1fr}.table-wrap{overflow-x:auto}.required-row,.activity{grid-template-columns:42px 1fr}.required-row .pill,.activity-time{grid-column:1/-1}.login-copy h1{font-size:42px}}

.project-manage{display:flex;gap:8px;margin-top:14px}
.project-manage .mini-btn{width:auto;padding:0 10px;font-size:12px}
.project-manage .mini-btn.danger{color:#ff8c92;border-color:rgba(255,77,87,.28);background:rgba(255,77,87,.08)}

.template-preview{margin:2px 0 18px;padding:14px;border:1px solid rgba(36,88,255,.24);border-radius:14px;background:rgba(36,88,255,.08)}
.template-preview__title{font-size:13px;font-weight:800;color:#cbd5ff;margin-bottom:10px}
.template-preview__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.template-preview__grid span{padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.045);font-size:12px;color:#d6deeb}
.report-card.internal{border-color:rgba(255,173,59,.22)}
.report-card.draft{border-color:rgba(255,255,255,.16);opacity:.82}

.required-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.required-actions .btn{min-height:34px;padding:0 12px;font-size:12px;border-radius:10px}
.pill.orange{color:#ffc36f;background:rgba(255,173,59,.16)}
.pill.blue{color:#9fb1ff;background:rgba(36,88,255,.16)}
.muted{color:var(--muted);font-size:14px;line-height:1.55;margin:8px 0 18px}

.project-access-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.project-access-item{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.04);font-size:13px;color:#d6deeb}
.project-access-item input{width:16px;height:16px;accent-color:var(--blue2)}
.user-actions{display:flex;gap:8px;flex-wrap:wrap}
.user-actions .mini-btn{width:auto;padding:0 10px;font-size:12px}
.user-actions .mini-btn.danger{color:#ff8c92;border-color:rgba(255,77,87,.28);background:rgba(255,77,87,.08)}
@media(max-width:620px){.project-access-list{grid-template-columns:1fr}}

.report-actions{display:flex;gap:8px;flex-wrap:wrap}
.report-actions .mini-btn{width:auto;padding:0 10px;font-size:12px}
.report-actions .mini-btn.danger{color:#ff8c92;border-color:rgba(255,77,87,.28);background:rgba(255,77,87,.08)}
.report-card.hidden-report{opacity:.55}
.report-card.internal-report{border-color:rgba(255,173,59,.26)}
.report-card.draft-report{border-color:rgba(255,255,255,.18);opacity:.78}

.project-open-btn{width:auto;padding:0 10px;font-size:12px}
.project-detail-report-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.project-detail-report-actions .mini-btn{width:auto;padding:0 10px;font-size:12px}
.project-empty{padding:18px;border:1px dashed var(--line);border-radius:14px;color:var(--muted);font-size:14px;text-align:center}
.report-card.internal-report{border-color:rgba(255,173,59,.26)}
.report-card.draft-report{border-color:rgba(255,255,255,.18);opacity:.78}
.report-card.hidden-report{opacity:.55}

.doc-toolbar{display:grid;grid-template-columns:1fr 220px 220px;gap:12px;margin-bottom:18px}
.doc-toolbar input,.doc-toolbar select{height:44px;border:1px solid var(--line2);border-radius:12px;background:rgba(7,13,22,.82);color:var(--text);padding:0 14px;outline:none}
.document-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.document-card{padding:18px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,rgba(25,37,54,.72),rgba(12,19,30,.72));transition:.22s ease}
.document-card:hover{transform:translateY(-2px);border-color:rgba(36,88,255,.38)}
.document-ico{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;color:#8fa7ff;background:rgba(36,88,255,.16);font-size:20px}
.document-title{margin-top:14px;font-size:17px;font-weight:820}
.document-desc{margin-top:8px;min-height:38px;color:var(--muted);font-size:13px;line-height:1.45}
.document-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.document-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.document-actions .mini-btn{width:auto;padding:0 10px;font-size:12px}
.document-actions .mini-btn.danger{color:#ff8c92;border-color:rgba(255,77,87,.28);background:rgba(255,77,87,.08)}
@media(max-width:1180px){.document-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.doc-toolbar{grid-template-columns:1fr}}
@media(max-width:620px){.document-grid{grid-template-columns:1fr}}

/* v16 icon fields */
.project-name{display:flex;align-items:center;gap:6px}
.document-ico{font-size:20px}

.logo img{display:block;max-width:140px;height:auto;object-fit:contain}


/* v18 light theme */
html[data-theme="light"] body{
  color:#0f172a;
  background:
    radial-gradient(circle at 15% 0%, rgba(15,0,255,.10), transparent 28%),
    radial-gradient(circle at 85% 0%, rgba(37,215,232,.10), transparent 28%),
    linear-gradient(135deg,#f5f7fb,#eef3fb 56%,#ffffff);
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .card,
html[data-theme="light"] .projects-panel,
html[data-theme="light"] .project-card,
html[data-theme="light"] .quick-card,
html[data-theme="light"] .doc-card,
html[data-theme="light"] .document-card,
html[data-theme="light"] .report-card,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .hero-panel,
html[data-theme="light"] .project-detail-hero{
  color:#0f172a;
  background:rgba(255,255,255,.90);
  border-color:rgba(15,23,42,.10);
  box-shadow:0 18px 44px rgba(15,23,42,.08);
}

html[data-theme="light"] .project-detail-hero{
  background:
    radial-gradient(circle at 84% 12%, rgba(15,0,255,.10), transparent 32%),
    linear-gradient(135deg,#ffffff,#eef3ff);
}

html[data-theme="light"] .nav-item,
html[data-theme="light"] .project-sub,
html[data-theme="light"] .updated,
html[data-theme="light"] .timeline-desc,
html[data-theme="light"] .timeline-time,
html[data-theme="light"] .doc-meta,
html[data-theme="light"] .report-desc,
html[data-theme="light"] .section-note,
html[data-theme="light"] .kpi-note,
html[data-theme="light"] .kpi-title,
html[data-theme="light"] .health-value,
html[data-theme="light"] .mini-label,
html[data-theme="light"] .hello p{
  color:#64748b;
}

html[data-theme="light"] .project-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .timeline-title,
html[data-theme="light"] .doc-title,
html[data-theme="light"] .report-title,
html[data-theme="light"] .quick-title,
html[data-theme="light"] .health-name{
  color:#0f172a;
}

html[data-theme="light"] .search,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .small-btn,
html[data-theme="light"] .btn.ghost,
html[data-theme="light"] .quick-panel,
html[data-theme="light"] .profile-card{
  color:#0f172a;
  background:rgba(255,255,255,.92);
  border-color:rgba(15,23,42,.14);
}

html[data-theme="light"] .search input{color:#0f172a}
html[data-theme="light"] .info-box,
html[data-theme="light"] .notice{
  color:#0f5661;
  background:rgba(37,215,232,.09);
  border-color:rgba(37,215,232,.20);
}
html[data-theme="light"] .info-box.ok{
  color:#166534;
  background:rgba(40,209,124,.10);
  border-color:rgba(40,209,124,.22);
}

/* v19 polished light theme */
html[data-theme="light"]{
  --blue:#0F00FF;--blue2:#2458ff;--violet:#6F55FF;--bg:#f6f8ff;--bg2:#eef4ff;
  --card:rgba(255,255,255,.88);--card2:rgba(255,255,255,.78);--line:rgba(15,23,42,.10);
  --line2:rgba(15,23,42,.14);--text:#0f172a;--muted:#64748b;--muted2:#8a96a8;
  --green:#18b66a;--orange:#f59e0b;--red:#ef4444;--cyan:#0ea5e9;--shadow:0 22px 70px rgba(15,23,42,.10);
}
html[data-theme="light"] body{
  color:#0f172a!important;
  background:radial-gradient(circle at 18% -8%,rgba(15,0,255,.18),transparent 30%),
             radial-gradient(circle at 82% 2%,rgba(37,215,232,.22),transparent 28%),
             linear-gradient(180deg,#f9fbff 0%,#eef4ff 48%,#f8fbff 100%)!important;
}
html[data-theme="light"] .main,html[data-theme="light"] main,html[data-theme="light"] .page,html[data-theme="light"] .content-area,html[data-theme="light"] .dashboard{
  background:radial-gradient(circle at 20% 0%,rgba(15,0,255,.10),transparent 28%),
             radial-gradient(circle at 96% 0%,rgba(37,215,232,.14),transparent 30%),
             linear-gradient(180deg,rgba(255,255,255,.48),rgba(238,244,255,.72))!important;
}
html[data-theme="light"] .sidebar{
  color:#0f172a!important;background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(247,250,255,.86))!important;
  border-right:1px solid rgba(15,23,42,.10)!important;box-shadow:18px 0 60px rgba(15,23,42,.06)!important;
}
html[data-theme="light"] .card,html[data-theme="light"] .stat-card,html[data-theme="light"] .project-card,html[data-theme="light"] .report-card,
html[data-theme="light"] .document-card,html[data-theme="light"] .doc-card,html[data-theme="light"] .doc-card-wide,html[data-theme="light"] .quick-card,
html[data-theme="light"] .kpi-card,html[data-theme="light"] .hero-panel,html[data-theme="light"] .table-wrap,html[data-theme="light"] .required-row,
html[data-theme="light"] .user-card,html[data-theme="light"] .projects-panel,html[data-theme="light"] .project-detail-hero{
  color:#0f172a!important;background:radial-gradient(circle at 16% 0%,rgba(15,0,255,.045),transparent 36%),
  linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.82))!important;
  border-color:rgba(15,23,42,.10)!important;box-shadow:0 20px 58px rgba(15,23,42,.075)!important;
}
html[data-theme="light"] .project-detail-hero{
  background:radial-gradient(circle at 8% 0%,rgba(15,0,255,.16),transparent 34%),
  radial-gradient(circle at 92% 4%,rgba(37,215,232,.18),transparent 30%),linear-gradient(135deg,#fff 0%,#eef3ff 100%)!important;
}
html[data-theme="light"] .nav-item{color:#334155!important;background:transparent!important}
html[data-theme="light"] .nav-item:hover{color:#0f172a!important;background:rgba(15,0,255,.055)!important}
html[data-theme="light"] .nav-item.active{color:#0f172a!important;background:linear-gradient(135deg,rgba(15,0,255,.14),rgba(37,215,232,.08))!important;border-color:rgba(15,0,255,.18)!important;box-shadow:0 14px 34px rgba(15,0,255,.10)!important}
html[data-theme="light"] .nav-icon,html[data-theme="light"] .project-avatar,html[data-theme="light"] .report-ico,html[data-theme="light"] .doc-ico,
html[data-theme="light"] .document-ico,html[data-theme="light"] .quick-ico,html[data-theme="light"] .kpi-ico,html[data-theme="light"] .timeline-ico,html[data-theme="light"] .stat-ico{
  background:linear-gradient(135deg,rgba(15,0,255,.88),rgba(37,88,255,.72))!important;color:#fff!important;box-shadow:0 16px 30px rgba(15,0,255,.18)!important;
}
html[data-theme="light"] .project-title,html[data-theme="light"] .project-name,html[data-theme="light"] .report-title,html[data-theme="light"] .doc-title,
html[data-theme="light"] .document-title,html[data-theme="light"] .quick-title,html[data-theme="light"] .timeline-title,html[data-theme="light"] .section-title,
html[data-theme="light"] .stat-value,html[data-theme="light"] .kpi-value,html[data-theme="light"] h1,html[data-theme="light"] h2,html[data-theme="light"] h3{color:#0f172a!important}
html[data-theme="light"] .project-sub,html[data-theme="light"] .project-domain,html[data-theme="light"] .updated,html[data-theme="light"] .report-desc,
html[data-theme="light"] .doc-meta,html[data-theme="light"] .document-desc,html[data-theme="light"] .quick-desc,html[data-theme="light"] .timeline-desc,
html[data-theme="light"] .timeline-time,html[data-theme="light"] .section-note,html[data-theme="light"] .stat-label,html[data-theme="light"] .stat-note,
html[data-theme="light"] .kpi-title,html[data-theme="light"] .kpi-note,html[data-theme="light"] .health-value,html[data-theme="light"] .mini-label,
html[data-theme="light"] .muted,html[data-theme="light"] .hello p,html[data-theme="light"] .side-title,html[data-theme="light"] label{color:#64748b!important}
html[data-theme="light"] .search,html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea,
html[data-theme="light"] .icon-btn,html[data-theme="light"] .small-btn,html[data-theme="light"] .btn.ghost,html[data-theme="light"] .quick-panel,
html[data-theme="light"] .profile-card{
  color:#0f172a!important;background:rgba(255,255,255,.92)!important;border-color:rgba(15,23,42,.12)!important;box-shadow:0 12px 34px rgba(15,23,42,.055)!important;
}
html[data-theme="light"] input::placeholder,html[data-theme="light"] textarea::placeholder{color:#94a3b8!important}
html[data-theme="light"] .btn,html[data-theme="light"] .primary-btn{color:#fff!important;background:linear-gradient(135deg,#0F00FF,#2458ff)!important;box-shadow:0 18px 38px rgba(15,0,255,.22)!important}
html[data-theme="light"] .progress{background:rgba(15,23,42,.08)!important}
html[data-theme="light"] .progress span{background:linear-gradient(90deg,#0F00FF,#25d7e8)!important}
html[data-theme="light"] .pill,html[data-theme="light"] .status{color:#087f4e!important;background:rgba(40,209,124,.14)!important}
html[data-theme="light"] .pill.orange,html[data-theme="light"] .status.orange{color:#b45309!important;background:rgba(245,158,11,.14)!important}
html[data-theme="light"] .pill.gray,html[data-theme="light"] .status.gray{color:#475569!important;background:rgba(100,116,139,.12)!important}
html[data-theme="light"] .table,html[data-theme="light"] table,html[data-theme="light"] tr,html[data-theme="light"] td,html[data-theme="light"] th{color:#0f172a!important;border-color:rgba(15,23,42,.10)!important}
html[data-theme="light"] .notice,html[data-theme="light"] .notice-main,html[data-theme="light"] .info-box{
  color:#164e63!important;background:linear-gradient(135deg,rgba(37,215,232,.10),rgba(15,0,255,.055))!important;border-color:rgba(14,165,233,.22)!important;
}
html[data-theme="light"] .info-box.ok{color:#166534!important;background:linear-gradient(135deg,rgba(40,209,124,.12),rgba(255,255,255,.62))!important;border-color:rgba(40,209,124,.22)!important}
html[data-theme="light"] .hero-text,html[data-theme="light"] .eyebrow,html[data-theme="light"] .health-name{color:#334155!important}
html[data-theme="light"] .brand,html[data-theme="light"] .sidebar .brand{border-color:rgba(15,23,42,.10)!important}


/* v20 premium light theme — stronger depth and fixed admin sidebar link */
html[data-theme="light"]{
  --blue:#0F00FF;
  --blue2:#2458FF;
  --violet:#6D5CFF;
  --bg:#F4F7FF;
  --bg2:#EAF1FF;
  --card:rgba(255,255,255,.92);
  --card2:rgba(255,255,255,.82);
  --line:rgba(15,23,42,.115);
  --line2:rgba(15,23,42,.16);
  --text:#0B1220;
  --muted:#53627A;
  --muted2:#7C8AA2;
  --green:#12A765;
  --orange:#E98A00;
  --red:#E5484D;
  --cyan:#0EA5E9;
  --shadow:0 28px 80px rgba(15,23,42,.11);
}

html[data-theme="light"] body{
  color:#0B1220!important;
  background:
    linear-gradient(180deg,rgba(3,8,23,.98) 0px,rgba(10,16,48,.92) 120px,rgba(15,0,255,.08) 121px,rgba(244,247,255,0) 280px),
    radial-gradient(circle at 34% 0%,rgba(15,0,255,.22),transparent 24%),
    radial-gradient(circle at 86% 0%,rgba(37,215,232,.22),transparent 28%),
    linear-gradient(180deg,#F7FAFF 0%,#EEF4FF 52%,#F8FBFF 100%)!important;
}

html[data-theme="light"] .main,
html[data-theme="light"] main,
html[data-theme="light"] .page,
html[data-theme="light"] .content-area,
html[data-theme="light"] .dashboard{
  background:
    radial-gradient(circle at 25% 0%,rgba(15,0,255,.12),transparent 28%),
    radial-gradient(circle at 95% 0%,rgba(37,215,232,.16),transparent 30%),
    linear-gradient(180deg,rgba(255,255,255,.30),rgba(238,244,255,.68) 320px,rgba(247,250,255,.96))!important;
}

html[data-theme="light"] .sidebar{
  color:#0B1220!important;
  background:
    radial-gradient(circle at 0% 0%,rgba(15,0,255,.05),transparent 34%),
    linear-gradient(180deg,#FFFFFF 0%,#F8FBFF 52%,#F1F6FF 100%)!important;
  border-right:1px solid rgba(15,23,42,.10)!important;
  box-shadow:18px 0 70px rgba(15,23,42,.08)!important;
}

html[data-theme="light"] .brand,
html[data-theme="light"] .sidebar .brand{
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.70))!important;
  border-bottom:1px solid rgba(15,23,42,.08)!important;
}

html[data-theme="light"] .card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .report-card,
html[data-theme="light"] .document-card,
html[data-theme="light"] .doc-card,
html[data-theme="light"] .doc-card-wide,
html[data-theme="light"] .quick-card,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .hero-panel,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .required-row,
html[data-theme="light"] .user-card,
html[data-theme="light"] .projects-panel,
html[data-theme="light"] .project-detail-hero{
  color:#0B1220!important;
  background:
    radial-gradient(circle at 14% 0%,rgba(15,0,255,.06),transparent 38%),
    radial-gradient(circle at 100% 0%,rgba(37,215,232,.055),transparent 32%),
    linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.84))!important;
  border:1px solid rgba(15,23,42,.115)!important;
  box-shadow:0 26px 72px rgba(15,23,42,.10)!important;
  backdrop-filter:blur(14px);
}

html[data-theme="light"] .card:hover,
html[data-theme="light"] .project-card:hover,
html[data-theme="light"] .quick-card:hover,
html[data-theme="light"] .report-card:hover,
html[data-theme="light"] .document-card:hover{
  border-color:rgba(15,0,255,.18)!important;
  box-shadow:0 30px 82px rgba(15,23,42,.13)!important;
}

html[data-theme="light"] .project-detail-hero{
  background:
    radial-gradient(circle at 10% 0%,rgba(15,0,255,.18),transparent 32%),
    radial-gradient(circle at 92% 6%,rgba(37,215,232,.20),transparent 30%),
    linear-gradient(135deg,#FFFFFF 0%,#EEF3FF 100%)!important;
}

html[data-theme="light"] .topbar h1,
html[data-theme="light"] .hello h1,
html[data-theme="light"] #welcomeTitle{
  color:#08111F!important;
  text-shadow:none!important;
}

html[data-theme="light"] .nav-item{
  color:#334155!important;
  background:transparent!important;
  border-color:transparent!important;
}

html[data-theme="light"] .nav-item:hover{
  color:#08111F!important;
  background:rgba(15,0,255,.055)!important;
}

html[data-theme="light"] .nav-item.active{
  color:#FFFFFF!important;
  background:linear-gradient(135deg,#0F00FF,#4E63FF)!important;
  border-color:rgba(15,0,255,.18)!important;
  box-shadow:0 18px 36px rgba(15,0,255,.18)!important;
}

html[data-theme="light"] .nav-item.active .nav-icon{
  background:rgba(255,255,255,.18)!important;
  color:#fff!important;
  box-shadow:none!important;
}

html[data-theme="light"] .nav-icon,
html[data-theme="light"] .project-avatar,
html[data-theme="light"] .report-ico,
html[data-theme="light"] .doc-ico,
html[data-theme="light"] .document-ico,
html[data-theme="light"] .quick-ico,
html[data-theme="light"] .kpi-ico,
html[data-theme="light"] .timeline-ico,
html[data-theme="light"] .stat-ico{
  background:linear-gradient(135deg,#0F00FF,#25D7E8)!important;
  color:#fff!important;
  box-shadow:0 16px 30px rgba(15,0,255,.20)!important;
}

html[data-theme="light"] .project-title,
html[data-theme="light"] .project-name,
html[data-theme="light"] .report-title,
html[data-theme="light"] .doc-title,
html[data-theme="light"] .document-title,
html[data-theme="light"] .quick-title,
html[data-theme="light"] .timeline-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .stat-value,
html[data-theme="light"] .kpi-value,
html[data-theme="light"] .table strong,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3{
  color:#08111F!important;
}

html[data-theme="light"] .project-sub,
html[data-theme="light"] .project-domain,
html[data-theme="light"] .updated,
html[data-theme="light"] .report-desc,
html[data-theme="light"] .doc-meta,
html[data-theme="light"] .document-desc,
html[data-theme="light"] .quick-desc,
html[data-theme="light"] .timeline-desc,
html[data-theme="light"] .timeline-time,
html[data-theme="light"] .section-note,
html[data-theme="light"] .stat-label,
html[data-theme="light"] .stat-note,
html[data-theme="light"] .kpi-title,
html[data-theme="light"] .kpi-note,
html[data-theme="light"] .health-value,
html[data-theme="light"] .mini-label,
html[data-theme="light"] .muted,
html[data-theme="light"] .hello p,
html[data-theme="light"] .side-title,
html[data-theme="light"] label{
  color:#53627A!important;
}

html[data-theme="light"] .search,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .small-btn,
html[data-theme="light"] .btn.ghost,
html[data-theme="light"] .quick-panel,
html[data-theme="light"] .profile-card{
  color:#0B1220!important;
  background:rgba(255,255,255,.94)!important;
  border:1px solid rgba(15,23,42,.13)!important;
  box-shadow:0 14px 38px rgba(15,23,42,.075)!important;
}

html[data-theme="light"] .workspace-link,
html[data-theme="light"] #workspaceLink{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:48px!important;
  padding:0 14px!important;
  margin:0 14px 12px!important;
  border-radius:16px!important;
  color:#0B1220!important;
  text-decoration:none!important;
  font-size:14px!important;
  font-weight:900!important;
  background:rgba(255,255,255,.95)!important;
  border:1px solid rgba(15,23,42,.13)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.075)!important;
}

html[data-theme="dark"] .workspace-link,
html[data-theme="dark"] #workspaceLink,
#workspaceLink{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:48px!important;
  padding:0 14px!important;
  margin:0 14px 12px!important;
  border-radius:16px!important;
  text-decoration:none!important;
  font-size:14px!important;
  font-weight:900!important;
  color:#dbe4f5!important;
  background:rgba(255,255,255,.035)!important;
  border:1px solid rgba(255,255,255,.10)!important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color:#94A3B8!important;
}

html[data-theme="light"] .btn,
html[data-theme="light"] .primary-btn{
  color:#fff!important;
  background:linear-gradient(135deg,#0F00FF,#2458FF)!important;
  box-shadow:0 20px 42px rgba(15,0,255,.24)!important;
}

html[data-theme="light"] .progress{
  background:rgba(15,23,42,.08)!important;
}

html[data-theme="light"] .progress span{
  background:linear-gradient(90deg,#0F00FF,#25D7E8)!important;
  box-shadow:0 0 18px rgba(37,215,232,.35)!important;
}

html[data-theme="light"] .pill,
html[data-theme="light"] .status{
  color:#087F4E!important;
  background:rgba(40,209,124,.15)!important;
}

html[data-theme="light"] .pill.orange,
html[data-theme="light"] .status.orange{
  color:#B45309!important;
  background:rgba(245,158,11,.16)!important;
}

html[data-theme="light"] .pill.gray,
html[data-theme="light"] .status.gray{
  color:#475569!important;
  background:rgba(100,116,139,.12)!important;
}

html[data-theme="light"] .table,
html[data-theme="light"] table,
html[data-theme="light"] tr,
html[data-theme="light"] td,
html[data-theme="light"] th{
  color:#0B1220!important;
  border-color:rgba(15,23,42,.10)!important;
  background:transparent!important;
}

html[data-theme="light"] .notice,
html[data-theme="light"] .notice-main,
html[data-theme="light"] .info-box{
  color:#164E63!important;
  background:linear-gradient(135deg,rgba(37,215,232,.13),rgba(15,0,255,.07))!important;
  border-color:rgba(14,165,233,.24)!important;
}

html[data-theme="light"] .info-box.ok{
  color:#166534!important;
  background:linear-gradient(135deg,rgba(40,209,124,.14),rgba(255,255,255,.62))!important;
  border-color:rgba(40,209,124,.24)!important;
}


/* v20.1 dashboard button placement fix */
#workspaceLink.workspace-link,
.workspace-link{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:48px!important;
  width:auto!important;
  margin:0 14px 12px!important;
  padding:0 14px!important;
  border-radius:16px!important;
  text-decoration:none!important;
  font-size:14px!important;
  font-weight:900!important;
}

html[data-theme="dark"] #workspaceLink.workspace-link,
html[data-theme="dark"] .workspace-link,
#workspaceLink.workspace-link{
  color:#dbe4f5!important;
  background:rgba(255,255,255,.035)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:none!important;
}

html[data-theme="light"] #workspaceLink.workspace-link,
html[data-theme="light"] .workspace-link{
  color:#0B1220!important;
  background:rgba(255,255,255,.95)!important;
  border:1px solid rgba(15,23,42,.13)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.075)!important;
}

/* button must be above user card in sidebar bottom */
.side-bottom #workspaceLink + .profile-card{
  margin-top:0!important;
}


/* v21 clean light theme — transfer colors only, keep blocks and functionality */
html[data-theme="light"]{
  --blue:#0F00FF;
  --blue2:#155EEF;
  --violet:#5C4DFF;
  --bg:#F6F8FC;
  --bg2:#EEF3FA;
  --card:#FFFFFF;
  --card2:#FFFFFF;
  --line:rgba(15,23,42,.08);
  --line2:rgba(15,23,42,.12);
  --text:#0F172A;
  --muted:#667085;
  --muted2:#98A2B3;
  --green:#12B76A;
  --orange:#F79009;
  --red:#F04438;
  --cyan:#0BA5EC;
  --shadow:0 12px 34px rgba(15,23,42,.07);
}

html[data-theme="light"] body{
  color:#0F172A!important;
  background:
    radial-gradient(circle at 22% 0%, rgba(15,0,255,.07), transparent 26%),
    radial-gradient(circle at 88% 4%, rgba(11,165,236,.10), transparent 26%),
    linear-gradient(180deg,#F9FBFF 0%,#F4F7FC 48%,#F8FAFC 100%)!important;
}

html[data-theme="light"] .main,
html[data-theme="light"] main,
html[data-theme="light"] .page,
html[data-theme="light"] .content-area,
html[data-theme="light"] .dashboard{
  background:
    radial-gradient(circle at 22% 0%, rgba(15,0,255,.055), transparent 26%),
    radial-gradient(circle at 92% 0%, rgba(11,165,236,.08), transparent 28%),
    linear-gradient(180deg,#F7F9FD 0%,#F3F6FB 100%)!important;
}

html[data-theme="light"] .sidebar{
  color:#0F172A!important;
  background:#FFFFFF!important;
  border-right:1px solid rgba(15,23,42,.08)!important;
  box-shadow:12px 0 34px rgba(15,23,42,.045)!important;
}

html[data-theme="light"] .brand,
html[data-theme="light"] .sidebar .brand{
  background:#FFFFFF!important;
  border-bottom:1px solid rgba(15,23,42,.08)!important;
}

html[data-theme="light"] .card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .report-card,
html[data-theme="light"] .document-card,
html[data-theme="light"] .doc-card,
html[data-theme="light"] .doc-card-wide,
html[data-theme="light"] .quick-card,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .hero-panel,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .required-row,
html[data-theme="light"] .user-card,
html[data-theme="light"] .projects-panel,
html[data-theme="light"] .project-detail-hero{
  color:#0F172A!important;
  background:#FFFFFF!important;
  border:1px solid rgba(15,23,42,.08)!important;
  box-shadow:0 10px 30px rgba(15,23,42,.06)!important;
}

html[data-theme="light"] .project-card,
html[data-theme="light"] .quick-card,
html[data-theme="light"] .report-card,
html[data-theme="light"] .doc-card,
html[data-theme="light"] .document-card{
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease!important;
}

html[data-theme="light"] .project-card:hover,
html[data-theme="light"] .quick-card:hover,
html[data-theme="light"] .report-card:hover,
html[data-theme="light"] .doc-card:hover,
html[data-theme="light"] .document-card:hover{
  transform:translateY(-1px)!important;
  border-color:rgba(15,94,239,.18)!important;
  box-shadow:0 14px 38px rgba(15,23,42,.09)!important;
}

html[data-theme="light"] .project-detail-hero{
  background:
    radial-gradient(circle at 12% 0%, rgba(15,0,255,.06), transparent 32%),
    linear-gradient(180deg,#FFFFFF 0%,#F7F9FF 100%)!important;
}

html[data-theme="light"] .nav-item{
  color:#344054!important;
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}

html[data-theme="light"] .nav-item:hover{
  color:#0F172A!important;
  background:#F2F4F7!important;
}

html[data-theme="light"] .nav-item.active{
  color:#FFFFFF!important;
  background:linear-gradient(135deg,#0F00FF,#155EEF)!important;
  border-color:rgba(15,94,239,.22)!important;
  box-shadow:0 12px 24px rgba(15,94,239,.22)!important;
}

html[data-theme="light"] .nav-item.active .nav-icon{
  color:#FFFFFF!important;
  background:rgba(255,255,255,.18)!important;
  box-shadow:none!important;
}

html[data-theme="light"] .nav-icon,
html[data-theme="light"] .project-avatar,
html[data-theme="light"] .report-ico,
html[data-theme="light"] .doc-ico,
html[data-theme="light"] .document-ico,
html[data-theme="light"] .quick-ico,
html[data-theme="light"] .kpi-ico,
html[data-theme="light"] .timeline-ico,
html[data-theme="light"] .stat-ico{
  color:#155EEF!important;
  background:#EEF4FF!important;
  box-shadow:none!important;
}

html[data-theme="light"] .project-avatar,
html[data-theme="light"] .kpi-ico{
  color:#FFFFFF!important;
  background:linear-gradient(135deg,#0F00FF,#155EEF)!important;
  box-shadow:0 12px 24px rgba(15,94,239,.18)!important;
}

html[data-theme="light"] .timeline-ico.green,
html[data-theme="light"] .quick-ico.green{
  color:#12B76A!important;
  background:#ECFDF3!important;
}

html[data-theme="light"] .quick-ico.orange,
html[data-theme="light"] .timeline-ico.orange{
  color:#F79009!important;
  background:#FFF6ED!important;
}

html[data-theme="light"] .quick-ico.cyan,
html[data-theme="light"] .timeline-ico.blue,
html[data-theme="light"] .timeline-ico.cyan{
  color:#0BA5EC!important;
  background:#EFF8FF!important;
}

html[data-theme="light"] .project-title,
html[data-theme="light"] .project-name,
html[data-theme="light"] .report-title,
html[data-theme="light"] .doc-title,
html[data-theme="light"] .document-title,
html[data-theme="light"] .quick-title,
html[data-theme="light"] .timeline-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .stat-value,
html[data-theme="light"] .kpi-value,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3{
  color:#101828!important;
}

html[data-theme="light"] .project-sub,
html[data-theme="light"] .project-domain,
html[data-theme="light"] .updated,
html[data-theme="light"] .report-desc,
html[data-theme="light"] .doc-meta,
html[data-theme="light"] .document-desc,
html[data-theme="light"] .quick-desc,
html[data-theme="light"] .timeline-desc,
html[data-theme="light"] .timeline-time,
html[data-theme="light"] .section-note,
html[data-theme="light"] .stat-label,
html[data-theme="light"] .stat-note,
html[data-theme="light"] .kpi-title,
html[data-theme="light"] .kpi-note,
html[data-theme="light"] .health-value,
html[data-theme="light"] .mini-label,
html[data-theme="light"] .muted,
html[data-theme="light"] .hello p,
html[data-theme="light"] .side-title,
html[data-theme="light"] label{
  color:#667085!important;
}

html[data-theme="light"] .search,
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .small-btn,
html[data-theme="light"] .btn.ghost,
html[data-theme="light"] .quick-panel,
html[data-theme="light"] .profile-card,
html[data-theme="light"] #workspaceLink.workspace-link{
  color:#101828!important;
  background:#FFFFFF!important;
  border:1px solid rgba(15,23,42,.10)!important;
  box-shadow:0 8px 20px rgba(15,23,42,.05)!important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color:#98A2B3!important;
}

html[data-theme="light"] .btn,
html[data-theme="light"] .primary-btn{
  color:#FFFFFF!important;
  background:linear-gradient(135deg,#0F00FF,#155EEF)!important;
  box-shadow:0 14px 28px rgba(15,94,239,.22)!important;
}

html[data-theme="light"] .progress{
  background:#EAECF0!important;
}

html[data-theme="light"] .progress span{
  background:linear-gradient(90deg,#0F00FF,#155EEF)!important;
  box-shadow:none!important;
}

html[data-theme="light"] .pill,
html[data-theme="light"] .status{
  color:#027A48!important;
  background:#ECFDF3!important;
}

html[data-theme="light"] .pill.orange,
html[data-theme="light"] .status.orange{
  color:#B54708!important;
  background:#FFF6ED!important;
}

html[data-theme="light"] .pill.gray,
html[data-theme="light"] .status.gray{
  color:#475467!important;
  background:#F2F4F7!important;
}

html[data-theme="light"] .table,
html[data-theme="light"] table,
html[data-theme="light"] tr,
html[data-theme="light"] td,
html[data-theme="light"] th{
  color:#101828!important;
  border-color:#EAECF0!important;
  background:transparent!important;
}

html[data-theme="light"] .notice,
html[data-theme="light"] .notice-main,
html[data-theme="light"] .info-box{
  color:#344054!important;
  background:#F5F8FF!important;
  border-color:#D1E0FF!important;
}

html[data-theme="light"] .info-box.ok{
  color:#027A48!important;
  background:#ECFDF3!important;
  border-color:#ABEFC6!important;
}

/* bottom sidebar group: Dashboard/Admin + user */
.side-bottom{
  margin-top:auto!important;
  padding:14px!important;
  display:grid!important;
  gap:12px!important;
}

#workspaceLink.workspace-link,
.workspace-link{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  min-height:48px!important;
  width:100%!important;
  margin:0!important;
  padding:0 14px!important;
  border-radius:14px!important;
  text-decoration:none!important;
  font-size:14px!important;
  font-weight:900!important;
}

html[data-theme="dark"] #workspaceLink.workspace-link,
html[data-theme="dark"] .workspace-link,
#workspaceLink.workspace-link{
  color:#dbe4f5!important;
  background:rgba(255,255,255,.035)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:none!important;
}

/* v21.1 clean background and project-card contrast fix */
html[data-theme="light"] body{
  color:#0F172A!important;
  background:#F7F8FC!important;
}

html[data-theme="light"] .main,
html[data-theme="light"] main,
html[data-theme="light"] .page,
html[data-theme="light"] .content-area,
html[data-theme="light"] .dashboard{
  background:#F7F8FC!important;
}

html[data-theme="light"] .project-card{
  background:#FFFFFF!important;
  border:1px solid rgba(15,23,42,.10)!important;
  box-shadow:0 10px 30px rgba(15,23,42,.065)!important;
}

html[data-theme="light"] .project-card:hover{
  border-color:rgba(15,94,239,.18)!important;
  box-shadow:0 14px 36px rgba(15,23,42,.09)!important;
}

html[data-theme="light"] .project-title,
html[data-theme="light"] .project-name{
  color:#101828!important;
}

html[data-theme="light"] .project-sub,
html[data-theme="light"] .project-domain,
html[data-theme="light"] .project-card .updated{
  color:#667085!important;
}

html[data-theme="light"] .project-card .progress-row,
html[data-theme="light"] .project-card .progress-row span,
html[data-theme="light"] .project-card .progress-row span:first-child{
  color:#475467!important;
  font-weight:800!important;
}

html[data-theme="light"] .project-card .progress{
  background:#E4E7EC!important;
}

html[data-theme="light"] .project-card .progress span{
  background:linear-gradient(90deg,#0F00FF,#2B59FF)!important;
  box-shadow:none!important;
}

html[data-theme="light"] .projects-panel{
  background:#FFFFFF!important;
  border-color:rgba(15,23,42,.08)!important;
  box-shadow:0 10px 30px rgba(15,23,42,.055)!important;
}

html[data-theme="light"] .card,
html[data-theme="light"] .quick-card,
html[data-theme="light"] .doc-card,
html[data-theme="light"] .report-card,
html[data-theme="light"] .document-card,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .stat-card{
  background:#FFFFFF!important;
}

html[data-theme="light"] .notice,
html[data-theme="light"] .notice-main,
html[data-theme="light"] .info-box{
  background:#F5F8FF!important;
}


/* v21.5 REAL ADMIN FIX — applies to actual dashboard classes */

/* clean light admin background */
html[data-theme="light"] body,
html[data-theme="light"] .app,
html[data-theme="light"] .main{
  background:#F7F8FC!important;
  color:#101828!important;
}

/* sidebar */
html[data-theme="light"] .sidebar{
  background:#FFFFFF!important;
  border-right:1px solid #E4E7EC!important;
  box-shadow:8px 0 28px rgba(15,23,42,.045)!important;
}

html[data-theme="light"] .sidebar-head{
  background:#FFFFFF!important;
  border-bottom:1px solid #E4E7EC!important;
}

html[data-theme="light"] .nav-title{
  color:#667085!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
}

/* REAL admin menu class is .nav-btn, not .nav-item */
html[data-theme="light"] .nav-btn{
  color:#344054!important;
  background:transparent!important;
  font-weight:800!important;
  opacity:1!important;
}

html[data-theme="light"] .nav-btn span{
  color:inherit!important;
  opacity:1!important;
}

html[data-theme="light"] .nav-btn .nav-icon{
  color:#0F00FF!important;
  background:#EEF4FF!important;
  border-radius:6px!important;
  width:24px!important;
  height:24px!important;
  display:inline-grid!important;
  place-items:center!important;
}

html[data-theme="light"] .nav-btn:hover{
  color:#101828!important;
  background:#F2F4F7!important;
}

html[data-theme="light"] .nav-btn.active{
  color:#FFFFFF!important;
  background:linear-gradient(135deg,#0F00FF,#5D6BFF)!important;
  box-shadow:0 12px 24px rgba(15,0,255,.18)!important;
}

html[data-theme="light"] .nav-btn.active .nav-icon{
  color:#FFFFFF!important;
  background:rgba(255,255,255,.20)!important;
}

html[data-theme="light"] .nav-badge{
  color:#FFFFFF!important;
  background:#F04438!important;
}

/* admin cards */
html[data-theme="light"] .stat-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .report-card,
html[data-theme="light"] .card,
html[data-theme="light"] .table-wrap,
html[data-theme="light"] .required-row{
  background:#FFFFFF!important;
  border:1px solid #E4E7EC!important;
  box-shadow:0 10px 30px rgba(15,23,42,.06)!important;
  color:#101828!important;
}

html[data-theme="light"] .stat-card:hover,
html[data-theme="light"] .project-card:hover,
html[data-theme="light"] .report-card:hover,
html[data-theme="light"] .card:hover{
  border-color:#D0D5DD!important;
  box-shadow:0 14px 36px rgba(15,23,42,.08)!important;
}

/* titles and text */
html[data-theme="light"] .page-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .stat-value,
html[data-theme="light"] .project-name,
html[data-theme="light"] .report-title,
html[data-theme="light"] .required-name,
html[data-theme="light"] .activity-title,
html[data-theme="light"] .table strong{
  color:#101828!important;
}

html[data-theme="light"] .stat-label,
html[data-theme="light"] .stat-note,
html[data-theme="light"] .project-domain,
html[data-theme="light"] .project-update,
html[data-theme="light"] .project-meta,
html[data-theme="light"] .report-desc,
html[data-theme="light"] .required-hint,
html[data-theme="light"] .activity-desc,
html[data-theme="light"] .activity-time,
html[data-theme="light"] .muted,
html[data-theme="light"] .table th,
html[data-theme="light"] .table small,
html[data-theme="light"] label{
  color:#667085!important;
}

/* quick actions are .quick-action */
html[data-theme="light"] .quick-action{
  color:#344054!important;
  background:#FFFFFF!important;
  border:1px solid #E4E7EC!important;
  box-shadow:none!important;
  opacity:1!important;
}

html[data-theme="light"] .quick-action:hover{
  color:#101828!important;
  border-color:#D0D5DD!important;
  background:#F9FAFB!important;
}

html[data-theme="light"] .quick-action *{
  color:inherit!important;
  opacity:1!important;
}

/* form controls and header icons */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .role-select,
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .mini-btn,
html[data-theme="light"] .btn.ghost,
html[data-theme="light"] .btn.dark{
  color:#101828!important;
  background:#FFFFFF!important;
  border:1px solid #D0D5DD!important;
  box-shadow:0 6px 16px rgba(15,23,42,.035)!important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color:#98A2B3!important;
}

html[data-theme="light"] .btn:not(.ghost):not(.dark):not(.danger){
  color:#FFFFFF!important;
  background:linear-gradient(135deg,#0F00FF,#155EEF)!important;
  box-shadow:0 14px 28px rgba(15,94,239,.20)!important;
}

/* table */
html[data-theme="light"] .table td,
html[data-theme="light"] .table th{
  border-color:#EAECF0!important;
}

html[data-theme="light"] .table td{
  color:#101828!important;
}

/* progress */
html[data-theme="light"] .progress{
  background:#E4E7EC!important;
}

html[data-theme="light"] .progress span{
  background:linear-gradient(90deg,#0F00FF,#2B59FF)!important;
  box-shadow:none!important;
}

/* pills */
html[data-theme="light"] .pill{
  color:#027A48!important;
  background:#ECFDF3!important;
}

html[data-theme="light"] .pill.red{
  color:#B42318!important;
  background:#FEF3F2!important;
}

html[data-theme="light"] .pill.gray{
  color:#475467!important;
  background:#F2F4F7!important;
}

html[data-theme="light"] .pill.orange{
  color:#B54708!important;
  background:#FFF6ED!important;
}

html[data-theme="light"] .pill.blue{
  color:#155EEF!important;
  background:#EEF4FF!important;
}

/* sidebar bottom must be one group: Dashboard first, user second */
.side-bottom{
  margin-top:auto!important;
  padding:14px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}

.side-bottom #workspaceLink{
  order:1!important;
}

.side-bottom .user-card{
  order:2!important;
}

#workspaceLink.admin-sidebar-dashboard-link{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  width:100%!important;
  min-height:48px!important;
  margin:0!important;
  padding:0 14px!important;
  border-radius:14px!important;
  text-decoration:none!important;
  font-size:14px!important;
  font-weight:900!important;
}

html[data-theme="light"] #workspaceLink.admin-sidebar-dashboard-link,
html[data-theme="light"] .side-bottom .user-card{
  color:#101828!important;
  background:#FFFFFF!important;
  border:1px solid #D0D5DD!important;
  box-shadow:0 8px 20px rgba(15,23,42,.055)!important;
}

html[data-theme="dark"] #workspaceLink.admin-sidebar-dashboard-link,
#workspaceLink.admin-sidebar-dashboard-link{
  color:#dbe4f5!important;
  background:rgba(255,255,255,.035)!important;
  border:1px solid rgba(255,255,255,.10)!important;
}

.side-bottom .user-card{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  padding:14px!important;
  border-top:0!important;
  border-radius:14px!important;
}

html[data-theme="light"] .user-name{
  color:#101828!important;
  font-weight:900!important;
}

html[data-theme="light"] .user-role{
  color:#667085!important;
}


/* v21.6 Dashboard uses the same .quick-panel style as workspace Admin button */
.side-bottom{
  margin-top:auto!important;
  padding:14px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}

.side-bottom #workspaceLink.quick-panel{
  order:1!important;
}

.side-bottom .user-card{
  order:2!important;
}

#workspaceLink.quick-panel{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  width:100%!important;
  min-height:48px!important;
  margin:0!important;
  padding:0 14px!important;
  border-radius:14px!important;
  text-decoration:none!important;
  font-size:14px!important;
  font-weight:900!important;
}

html[data-theme="light"] #workspaceLink.quick-panel{
  color:#101828!important;
  background:#FFFFFF!important;
  border:1px solid #D0D5DD!important;
  box-shadow:0 8px 20px rgba(15,23,42,.055)!important;
}

html[data-theme="dark"] #workspaceLink.quick-panel,
#workspaceLink.quick-panel{
  color:#dbe4f5!important;
  background:rgba(255,255,255,.035)!important;
  border:1px solid rgba(255,255,255,.10)!important;
}

/* old custom class is intentionally neutralized in case browser cache keeps it */
.admin-sidebar-dashboard-link{
  all:unset;
}


/* v21.7 fix Dashboard button inherited margin */
html[data-theme="light"] .workspace-link,
html[data-theme="light"] #workspaceLink,
html[data-theme="dark"] .workspace-link,
html[data-theme="dark"] #workspaceLink,
.side-bottom #workspaceLink{
  margin:0!important;
}


/* v21.9 header buttons/search/theme fixes */
html[data-theme="light"] .workspace-link,
html[data-theme="light"] #workspaceLink,
html[data-theme="dark"] .workspace-link,
html[data-theme="dark"] #workspaceLink,
.side-bottom #workspaceLink{
  margin:0!important;
}

.icon-btn#themeToggleBtn{
  font-size:16px!important;
  line-height:1!important;
}

html[data-theme="light"] .icon-btn#themeToggleBtn,
html[data-theme="light"] .icon-btn#logoutBtn{
  color:#101828!important;
  background:#FFFFFF!important;
  border:1px solid #D0D5DD!important;
}


/* v21.10 header/search/theme final fixes */
html[data-theme="light"] .workspace-link,
html[data-theme="light"] #workspaceLink,
html[data-theme="dark"] .workspace-link,
html[data-theme="dark"] #workspaceLink,
.side-bottom #workspaceLink{
  margin:0!important;
}

/* Remove ugly inner native border inside search input */
.search input,
.search input:focus,
html[data-theme="light"] .search input,
html[data-theme="light"] .search input:focus,
html[data-theme="dark"] .search input,
html[data-theme="dark"] .search input:focus{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
}

.search:focus-within{
  border-color:rgba(15,0,255,.28)!important;
  box-shadow:0 0 0 4px rgba(15,0,255,.08)!important;
}

.icon-btn#themeToggleBtn{
  font-size:15px!important;
  line-height:1!important;
}

html[data-theme="light"] .icon-btn#themeToggleBtn,
html[data-theme="light"] .icon-btn#logoutBtn{
  color:#101828!important;
  background:#FFFFFF!important;
  border:1px solid #D0D5DD!important;
}


/* v21.11 dashboard search and contour theme icons */
.top-actions .search,
.search{
  display:flex!important;
  align-items:center!important;
}

.search input,
.search input:focus,
html[data-theme="light"] .search input,
html[data-theme="light"] .search input:focus,
html[data-theme="dark"] .search input,
html[data-theme="dark"] .search input:focus{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
}

.search:focus-within{
  border-color:rgba(15,0,255,.28)!important;
  box-shadow:0 0 0 4px rgba(15,0,255,.08)!important;
}

.icon-btn#themeToggleBtn{
  font-size:22px!important;
  line-height:1!important;
  font-family:Arial, sans-serif!important;
}

html[data-theme="light"] .workspace-link,
html[data-theme="light"] #workspaceLink,
html[data-theme="dark"] .workspace-link,
html[data-theme="dark"] #workspaceLink,
.side-bottom #workspaceLink{
  margin:0!important;
}


/* v21.12 unified dashboard/workspace header controls */
.top-actions{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}

.top-actions .search,
.search{
  min-width:420px!important;
  height:56px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:0 16px!important;
  border-radius:18px!important;
}

.search input,
.search input:focus,
.search input:focus-visible,
html[data-theme="light"] .search input,
html[data-theme="light"] .search input:focus,
html[data-theme="light"] .search input:focus-visible,
html[data-theme="dark"] .search input,
html[data-theme="dark"] .search input:focus,
html[data-theme="dark"] .search input:focus-visible{
  width:100%!important;
  height:auto!important;
  padding:0!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}

.search input::-webkit-search-decoration,
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-results-button,
.search input::-webkit-search-results-decoration{
  display:none!important;
}

.search:focus-within{
  border-color:rgba(15,0,255,.28)!important;
  box-shadow:0 0 0 4px rgba(15,0,255,.08)!important;
}

.search kbd{
  flex:0 0 auto!important;
}

.icon-btn#themeToggleBtn{
  font-size:22px!important;
  line-height:1!important;
  font-family:Arial, sans-serif!important;
}

html[data-theme="light"] .workspace-link,
html[data-theme="light"] #workspaceLink,
html[data-theme="dark"] .workspace-link,
html[data-theme="dark"] #workspaceLink,
.side-bottom #workspaceLink{
  margin:0!important;
}


/* v21.13 dashboard search height and working state */
.top-actions .search{
  height:48px!important;
  min-height:48px!important;
}

.top-actions .search input,
.top-actions .search input:focus,
.top-actions .search input:focus-visible{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  padding:0!important;
}


/* v21.14 dashboard nav/header corrections */
html[data-theme="light"] .nav-btn{
  font-weight:inherit!important;
}

html[data-theme="light"] .nav-btn.active span,
html[data-theme="light"] .nav-btn.active .nav-icon,
html[data-theme="light"] .nav-btn.active *{
  color:#FFFFFF!important;
}

.top-actions .search{
  height:48px!important;
  min-height:48px!important;
}


/* v22 project image icons */
.project-icon-img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  border-radius:inherit!important;
  display:block!important;
}

.project-avatar .project-icon-img,
.nav-icon .project-icon-img{
  width:100%!important;
  height:100%!important;
}

.project-name .project-icon-img{
  width:22px!important;
  height:22px!important;
  border-radius:6px!important;
  display:inline-block!important;
  vertical-align:middle!important;
  margin-right:6px!important;
}

html[data-theme="light"] .nav-badge,
html[data-theme="light"] .nav-badge *{
  color:#FFFFFF!important;
}

/* v22.1 project icon upload fix */
.project-icon-img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:inherit!important;display:block!important;}
.project-avatar .project-icon-img,.nav-icon .project-icon-img{width:100%!important;height:100%!important;}
html[data-theme="light"] .nav-badge,html[data-theme="light"] .nav-badge *{color:#FFFFFF!important;}


/* v22.9 required files settings and project template preview */
html[data-theme="light"] #projectTemplatePreview{
  background:#F8FAFF!important;
  border:1px solid #C7D2FE!important;
  color:#1A2238!important;
  opacity:1!important;
}

html[data-theme="light"] #projectTemplatePreview h3{
  color:#1A2238!important;
  opacity:1!important;
}

html[data-theme="light"] #projectTemplatePreview *{
  opacity:1!important;
}

.template-preview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 24px;
  margin-top:16px;
}

.template-preview-item{
  display:flex;
  align-items:center;
  gap:10px;
  color:#344054!important;
  font-weight:800;
}

.template-preview-item span{
  width:26px;
  height:26px;
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
}

.templates-list{
  display:grid;
  gap:10px;
}

.template-row{
  display:grid;
  grid-template-columns:42px 1fr auto auto;
  gap:14px;
  align-items:center;
  padding:14px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:16px;
  background:#fff;
}

.template-row-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#EEF4FF;
  color:#0F00FF;
  font-size:20px;
}

.template-row-main{
  display:grid;
  gap:4px;
}

.template-row-main strong{
  color:#101828;
}

.template-row-main span,
.template-row-meta small{
  color:#667085;
}

.template-row-meta{
  display:grid;
  justify-items:end;
  gap:6px;
}


/* v22.10 project template preview fix */
html[data-theme="light"] #projectTemplatePreview,
html[data-theme="light"] .project-template-preview{
  background:#FFFFFF!important;
  border:1px solid #B7C5FF!important;
  color:#101828!important;
  opacity:1!important;
  box-shadow:0 10px 30px rgba(15,23,42,.055)!important;
}

html[data-theme="light"] #projectTemplatePreview *,
html[data-theme="light"] .project-template-preview *{
  color:#344054!important;
  opacity:1!important;
}

html[data-theme="light"] #projectTemplatePreview h3,
html[data-theme="light"] .project-template-preview h3{
  color:#101828!important;
  opacity:1!important;
}

html[data-theme="light"] #projectTemplatePreview .template-preview-item,
html[data-theme="light"] .project-template-preview .template-preview-item{
  color:#344054!important;
  opacity:1!important;
  font-weight:800!important;
}

html[data-theme="light"] #projectTemplatePreview .template-preview-item strong,
html[data-theme="light"] .project-template-preview .template-preview-item strong{
  color:#344054!important;
  opacity:1!important;
}

#projectTemplatePreview.hidden,
.project-template-preview.hidden{
  display:none!important;
}


/* v22.11 real templatePreview block fix */
html[data-theme="light"] #templatePreview,
html[data-theme="light"] .template-preview{
  background:#FFFFFF!important;
  border:1px solid #B7C5FF!important;
  color:#101828!important;
  opacity:1!important;
  box-shadow:0 10px 30px rgba(15,23,42,.055)!important;
}

html[data-theme="light"] #templatePreview .template-preview__title,
html[data-theme="light"] .template-preview .template-preview__title{
  color:#101828!important;
  opacity:1!important;
  font-weight:900!important;
}

html[data-theme="light"] #templatePreview .template-preview__grid span,
html[data-theme="light"] .template-preview .template-preview__grid span{
  color:#344054!important;
  opacity:1!important;
  font-weight:750!important;
}

html[data-theme="light"] #templatePreview *,
html[data-theme="light"] .template-preview *{
  opacity:1!important;
}

#templatePreview.hidden,
.template-preview.hidden{
  display:none!important;
}

.stat-grid--overview{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1180px){.stat-grid--overview{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.stat-grid--overview{grid-template-columns:1fr}}

/* v22.11 финальная точечная правка: бейдж обязательных файлов в светлой теме */
html[data-theme="light"] #navMissing{color:#fff!important;}

/* v22.11: outline buttons and dark search contrast */
.project-actions .mini-btn svg{
  width:16px;
  height:16px;
  display:block;
}
.project-actions .mini-btn{
  color:var(--muted);
}
.project-actions .mini-btn:hover{
  color:var(--blue);
}
html[data-theme="dark"] #globalSearch{
  color:#f4f7ff!important;
  caret-color:#f4f7ff;
}
html[data-theme="dark"] #globalSearch::placeholder{
  color:rgba(244,247,255,.55)!important;
}
.document-image,
.report-image{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  border-radius:inherit;
}
.document-ico:has(.document-image),
.report-ico:has(.report-image){
  padding:0;
  overflow:hidden;
}

/* v22.11: required files images and text button sizing */
.required-file-image,
.required-file-preview-image,
.required-file-table-image,
.required-file-mini-image{
  width:24px;
  height:24px;
  display:inline-block;
  object-fit:contain;
  border-radius:6px;
  vertical-align:middle;
  margin-right:8px;
}
.required-file-preview-image{width:22px;height:22px;}
.required-file-table-image{width:26px;height:26px;}
.required-table-file{display:inline-flex;align-items:center;gap:8px;min-width:0;}
.required-name{display:flex;align-items:center;gap:8px;}
button.mini-btn.danger[data-delete-required]{width:auto!important;min-width:unset!important;padding:0 12px!important;}

/* v22.11 upload fields and sorting/edit fixes */
.native-file-input{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.upload-field{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:64px;
  padding:13px 15px;
  border:1px dashed var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.045);
  color:var(--text);
  cursor:pointer;
  transition:border-color .2s ease, background .2s ease, transform .2s ease;
}
.upload-field:hover{
  border-color:rgba(36,88,255,.55);
  background:rgba(36,88,255,.08);
  transform:translateY(-1px);
}
.upload-field.has-file{
  border-style:solid;
  border-color:rgba(40,209,124,.4);
  background:rgba(40,209,124,.08);
}
.upload-field__icon{
  width:42px;
  height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  color:#8ea7ff;
  background:rgba(36,88,255,.12);
  flex:0 0 auto;
}
.upload-field__text{display:flex;flex-direction:column;gap:4px;min-width:0;}
.upload-field__text strong{font-size:14px;font-weight:800;}
.upload-field__text small{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px;}
.required-table-actions{display:flex;align-items:center;gap:8px;justify-content:flex-end;}
.required-table-actions .mini-btn{width:auto;min-width:34px;padding:0 12px;font-size:12px;}
.required-table-actions .mini-btn.danger{color:#ff8c92;border-color:rgba(255,77,87,.28);background:rgba(255,77,87,.08);}
html[data-theme="light"] .upload-field{background:#fff;border-color:#d9e1ef;color:#101828;}
html[data-theme="light"] .upload-field:hover{background:#f3f6ff;border-color:rgba(15,0,255,.35);}
html[data-theme="light"] .upload-field.has-file{background:#f1fff7;border-color:rgba(22,163,74,.35);}


/* v22.11 polish fixes */
.kpi-value{font-weight:600!important;}
.timeline-title{font-weight:600!important;}
.report-title{font-weight:600!important;}
.upload-field{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-height:48px!important;
  height:48px!important;
  padding:0 14px!important;
  border:1px solid var(--line)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.04)!important;
  color:var(--text)!important;
  cursor:pointer!important;
}
.upload-field:hover{
  border-color:rgba(36,88,255,.38)!important;
  background:rgba(255,255,255,.06)!important;
}
.upload-field__icon{
  width:28px!important;
  height:28px!important;
  flex:0 0 28px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:var(--muted)!important;
}
.upload-field__text{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  overflow:hidden!important;
}
.upload-field__text strong{
  font-size:13px!important;
  font-weight:600!important;
  white-space:nowrap!important;
}
.upload-field__text small{
  font-size:12px!important;
  color:var(--muted)!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  max-width:220px!important;
}
html[data-theme="light"] .upload-field{
  background:#fff!important;
  border-color:#d9e1ef!important;
  color:#101828!important;
}
html[data-theme="light"] .upload-field:hover{
  background:#f8fafc!important;
  border-color:#b9c4d6!important;
}


/* v22.11 accumulated dashboard polish */
.kpi-value{font-weight:600!important;}
.timeline-title{font-weight:600!important;}
.report-title{font-weight:600!important;}
.upload-field{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  height:48px!important;
  min-height:48px!important;
  padding:0 14px!important;
  border:1px solid var(--line2)!important;
  border-radius:12px!important;
  outline:none!important;
  color:var(--text)!important;
  background:rgba(7,13,22,.82)!important;
  cursor:pointer!important;
  transition:.22s ease!important;
  transform:none!important;
}
.upload-field:hover,
.upload-field:focus-within{
  border-color:rgba(36,88,255,.9)!important;
  box-shadow:0 0 0 4px rgba(36,88,255,.14)!important;
  background:rgba(7,13,22,.82)!important;
}
.upload-field.has-file{
  border-style:solid!important;
  border-color:var(--line2)!important;
  background:rgba(7,13,22,.82)!important;
}
.upload-field__icon{
  width:24px!important;
  height:24px!important;
  flex:0 0 24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:var(--muted)!important;
  background:transparent!important;
}
.upload-field__text{
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  overflow:hidden!important;
}
.upload-field__text strong{
  font-size:13px!important;
  font-weight:600!important;
  white-space:nowrap!important;
}
.upload-field__text small{
  font-size:12px!important;
  color:var(--muted)!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  max-width:240px!important;
}
html[data-theme="light"] .upload-field,
html[data-theme="light"] .upload-field.has-file{
  background:#ffffff!important;
  border-color:#d7deea!important;
  color:#0f172a!important;
}
html[data-theme="light"] .upload-field:hover,
html[data-theme="light"] .upload-field:focus-within{
  background:#ffffff!important;
  border-color:rgba(36,88,255,.9)!important;
  box-shadow:0 0 0 4px rgba(36,88,255,.12)!important;
}
html[data-theme="dark"] #globalSearch{
  color:#f4f7ff!important;
  caret-color:#f4f7ff!important;
}
html[data-theme="dark"] #globalSearch::placeholder{
  color:rgba(244,247,255,.55)!important;
}
html[data-theme="light"] #navMissing{color:#fff!important;}
button.mini-btn.danger[data-delete-required]{width:auto!important;min-width:unset!important;padding:0 12px!important;}


/* v22.11 polish: stable logo sizing */
.logo,
.logo img,
[data-theme-logo]{
  width:140px;
  height:40px;
  max-width:140px;
  object-fit:contain;
  object-position:left center;
  flex-shrink:0;
}
.logo.small{width:140px;height:40px;}

/* v22.11 final polish: template preview contrast in light theme */
html[data-theme="light"] #templatePreview .template-preview__grid span,
html[data-theme="light"] .template-preview .template-preview__grid span{
  background:#F4F7FF!important;
  border:1px solid #DCE4FF!important;
  color:#243047!important;
  box-shadow:0 1px 2px rgba(15,0,255,.04)!important;
}


/* v22.11 project quick modal and report filters */
.report-toolbar{margin:0 0 18px 0;}
.project-quick-modal.hidden{display:none!important;}
.project-quick-modal{position:fixed;inset:0;z-index:1000;display:flex;justify-content:flex-end;}
.project-quick-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.42);backdrop-filter:blur(3px);}
.project-quick-modal__panel{position:relative;z-index:1;width:min(520px,calc(100vw - 24px));height:100%;padding:28px;background:var(--panel);border-left:1px solid var(--line);box-shadow:-18px 0 48px rgba(0,0,0,.28);overflow:auto;}
.project-quick-modal__close{position:absolute;top:14px;right:14px;width:34px;height:34px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--text);font-size:22px;line-height:1;cursor:pointer;}
.project-quick-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px;padding-right:32px;}
.project-quick-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0;}
.project-quick-summary>div{padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03);}
.project-quick-summary strong{display:block;font-weight:700;font-size:18px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.project-quick-summary span{display:block;margin-top:4px;color:var(--muted);font-size:12px;}
.project-quick-list{display:grid;gap:10px;}
.project-quick-row{display:flex;gap:12px;align-items:flex-start;padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.03);}
.project-quick-row strong{display:block;font-weight:600;}
.project-quick-row small{display:block;margin-top:3px;color:var(--muted);}
.project-quick-status{display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:999px;flex:0 0 26px;font-weight:700;}
.project-quick-status.ok{background:rgba(27,185,111,.14);color:#1bb96f;}
.project-quick-status.warn{background:rgba(255,184,77,.16);color:#f59e0b;}
.project-quick-status.bad{background:rgba(255,77,109,.14);color:#ff4d6d;}
.project-quick-ok{padding:14px;border-radius:14px;border:1px solid rgba(27,185,111,.22);background:rgba(27,185,111,.08);font-weight:600;}
html[data-theme="light"] .project-quick-modal__panel{background:#fff;border-left-color:#d7deea;}
html[data-theme="light"] .project-quick-summary>div,
html[data-theme="light"] .project-quick-row{background:#f8faff;border-color:#dce4ff;}
html[data-theme="light"] .project-quick-modal__close{border-color:#d7deea;color:#243047;}
@media (max-width:640px){.project-quick-modal__panel{width:100%;padding:22px 16px;}.project-quick-summary{grid-template-columns:1fr;}}

/* v22.11 document categories management */
.subcategory-indent{
  display:inline-block;
  width:18px;
  color:var(--muted);
}
.document-categories-card .table td:last-child{
  white-space:nowrap;
}
html[data-theme="light"] .document-categories-card{
  border-color:#DCE4FF!important;
}

/* v22.11 visual/document categories polish */
.table-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
  justify-content:flex-end;
}
.table-actions .mini-btn,
.document-categories-card .mini-btn[data-edit-doc-category],
.document-categories-card .mini-btn[data-delete-doc-category]{
  width:auto!important;
  min-width:unset!important;
  padding:0 12px!important;
  white-space:nowrap;
}
.document-category-table-file{
  display:flex;
  align-items:center;
  gap:10px;
}
.document-category-table-icon{
  width:26px;
  min-width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  overflow:hidden;
}
.document-category-table-image{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.document-category-table-file .subcategory-indent{
  opacity:.65;
  margin-right:0;
}
html[data-theme="light"] .document-categories-card .table-actions .mini-btn{
  background:#fff;
  border-color:#DCE4FF;
}
html[data-theme="light"] #templatePreview .template-preview__grid span,
html[data-theme="light"] .template-preview .template-preview__grid span{
  background:#F4F7FF!important;
  border:1px solid #DCE4FF!important;
  color:#243047!important;
  box-shadow:0 1px 2px rgba(15,0,255,.04);
}


/* Final UX polish: clickable document tags and required keywords */
.document-tag-pill{border:0;appearance:none;font:inherit;cursor:pointer;}
.document-tag-pill:hover{transform:translateY(-1px);filter:brightness(1.08);}

/* Document category multi-bind list */
.document-category-access-list .project-access-item{
  align-items:center;
  gap:8px;
}
.document-category-access-list .project-access-item.is-child{
  padding-left:26px;
}
.document-category-access-image{
  width:18px;
  height:18px;
  object-fit:contain;
  border-radius:5px;
  flex-shrink:0;
}

/* Quick access polish */
.quick-card{
  text-align:left;
  border:1px solid var(--line);
  color:inherit;
  font:inherit;
  cursor:pointer;
}
.quick-card.is-disabled{
  opacity:.55;
  cursor:not-allowed;
  pointer-events:none;
}
.quick-card[disabled]{
  opacity:.55;
  cursor:not-allowed;
}

/* v22.11 configurable quick access */
.table-actions{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;}
.table-actions .mini-btn{width:auto;min-width:unset;padding:0 12px;}
#quickAccessTable th:nth-child(5),#quickAccessTable td:nth-child(5){text-align:right;}


/* v22.11 document category rubrics and multi-category placement */
.document-category-link-list .document-category-access-item{
  display:grid;
  grid-template-columns:auto minmax(160px,1fr) minmax(180px,260px);
  align-items:center;
  gap:10px;
}
.document-category-link-list .document-category-access-item.is-child{
  padding-left:28px;
}
.document-category-access-title{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.document-category-rubric-select{
  min-width:0;
  width:100%;
  height:38px;
}
@media (max-width:760px){
  .document-category-link-list .document-category-access-item{
    grid-template-columns:auto 1fr;
  }
  .document-category-rubric-select{
    grid-column:2;
  }
}

/* v22.13 project sorting and user avatars */
.avatar{overflow:hidden;}
.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block;}
.table-user-cell{display:flex;align-items:center;gap:10px;min-width:0;}
.table-user-avatar{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;border-radius:50%;overflow:hidden;background:linear-gradient(135deg,#8b6cff,#0F00FF);color:#fff;font-weight:700;font-size:12px;}
.table-user-avatar img,.table-user-avatar-img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block;}

/* v23.02 dashboard + workspace final adaptive polish */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.table-wrap .table{min-width:640px;}
.nav-btn,.nav-btn *{min-width:0;}
.nav-btn{white-space:normal;line-height:1.2;}
.nav-btn span:not(.nav-icon):not(.nav-badge){overflow:hidden;text-overflow:ellipsis;}
.sidebar{overflow:hidden;}
.nav{overflow-y:auto;min-height:0;scrollbar-width:thin;}
.side-bottom{flex-shrink:0;}
#documentCategoriesView > .section-head{display:none;}
.document-categories-card > .section-head .section-title{font-size:22px;}
.document-categories-card > .section-head .muted{max-width:760px;}
.page-title{min-width:0;overflow-wrap:anywhere;}
.top-actions{min-width:0;}
.search{min-width:0;}
.search input{min-width:0;}
.form-grid{min-width:0;}
.field{min-width:0;}
.field input,.field select,.field textarea{min-width:0;width:100%;}
.button-row{flex-wrap:wrap;}

.admin-mobile-menu-btn,.admin-sidebar-overlay{display:none;}

@media (min-width: 1601px){
  .app{grid-template-columns:260px minmax(0,1fr)!important;}
  .main{max-width:1920px;width:100%;}
  .project-grid{grid-template-columns:repeat(auto-fill,minmax(260px,320px));justify-content:start;}
  .project-card{max-width:320px;width:100%;}
}

@media (max-width: 1366px){
  .main{padding:24px 24px 32px;}
  .topbar{gap:18px;}
  .top-actions .search{max-width:420px;}
  .section-title{line-height:1.15;}
}

@media (max-width: 1180px){
  .admin-layout,.content-grid{grid-template-columns:1fr!important;}
  .form-grid{grid-template-columns:1fr!important;}
  .document-category-link-list .document-category-access-item{grid-template-columns:auto 1fr;}
  .document-category-rubric-select{grid-column:2;}
}

@media (min-width: 901px) and (max-width: 1100px){
  .app{grid-template-columns:96px minmax(0,1fr)!important;}
  .sidebar{width:96px!important;}
  .sidebar-head{padding:18px 10px!important;display:flex;justify-content:center;overflow:hidden;}
  .sidebar-head .logo,.logo.small{width:74px!important;max-width:74px!important;object-fit:contain;object-position:left center;}
  .nav{padding:14px 8px!important;}
  .nav-title{height:1px;padding:0!important;overflow:hidden;font-size:0!important;opacity:0;}
  .nav-btn{justify-content:center!important;width:52px!important;height:52px!important;min-height:52px!important;margin:0 auto 8px!important;padding:0!important;border-radius:16px!important;font-size:0!important;gap:0!important;}
  .nav-btn .nav-icon{font-size:16px!important;width:26px!important;flex:0 0 26px!important;}
  .nav-badge{position:absolute;right:-5px;top:-5px;margin:0;}
  .side-bottom{padding:10px 8px!important;}
  .quick-panel{width:56px;height:56px;margin:0 auto 10px!important;padding:0!important;justify-content:center!important;font-size:0!important;border-radius:16px!important;}
  .quick-panel span:first-child{font-size:18px!important;}
  .quick-panel span:last-child{display:none!important;}
  .user-card{display:flex!important;width:60px;margin:0 auto!important;padding:8px!important;justify-content:center!important;border-radius:18px!important;}
  .user-card>div:not(.avatar){display:none!important;}
  .avatar{width:44px;height:44px;}
  .main{padding:22px 20px 30px!important;}
  .topbar{display:grid;grid-template-columns:1fr;gap:14px;align-items:start;}
  .top-actions{width:100%;flex-wrap:wrap;}
  .top-actions .search{width:min(100%,520px);max-width:520px;}
}

@media (max-width: 900px){
  .app{display:block!important;min-height:100vh;}
  .admin-mobile-menu-btn{display:inline-grid;place-items:center;width:46px;height:46px;border:1px solid var(--line2);border-radius:16px;background:rgba(255,255,255,.04);color:var(--text);font-size:21px;flex:0 0 46px;}
  html[data-theme="light"] .admin-mobile-menu-btn{background:#fff;border-color:#d7deea;color:#172033;box-shadow:0 12px 28px rgba(15,23,42,.08);}
  .admin-sidebar-overlay{display:block;position:fixed;inset:0;z-index:45;background:rgba(3,8,18,.42);opacity:0;pointer-events:none;backdrop-filter:blur(4px);transition:opacity .2s ease;}
  body.admin-sidebar-open .admin-sidebar-overlay{opacity:1;pointer-events:auto;}
  .sidebar{position:fixed!important;left:0!important;top:0!important;bottom:0!important;width:310px!important;max-width:86vw!important;height:100vh!important;z-index:50!important;display:flex!important;flex-direction:column!important;transform:translateX(-105%);transition:transform .24s ease;border-right:1px solid var(--line)!important;border-bottom:0!important;}
  body.admin-sidebar-open .sidebar{transform:translateX(0);}
  .sidebar-head{padding:22px 20px 18px!important;}
  .nav{display:flex!important;flex-direction:column!important;gap:6px!important;padding:16px 12px!important;overflow-y:auto!important;}
  .nav-title{display:block!important;grid-column:auto!important;height:auto!important;padding:10px!important;font-size:11px!important;opacity:1!important;}
  .nav-btn{width:100%!important;height:auto!important;min-height:44px!important;margin:0!important;padding:0 12px!important;justify-content:flex-start!important;font-size:14px!important;gap:12px!important;border-radius:12px!important;}
  .nav-btn .nav-icon{width:22px!important;flex:0 0 22px!important;font-size:14px!important;}
  .nav-badge{position:static;margin-left:auto;}
  .side-bottom{padding:12px!important;display:grid!important;gap:10px!important;}
  .quick-panel{width:auto!important;height:auto!important;margin:0!important;padding:14px!important;font-size:14px!important;justify-content:space-between!important;border-radius:16px!important;}
  .quick-panel span:first-child{font-size:14px!important;}
  .quick-panel span:last-child{display:inline!important;}
  .user-card{display:flex!important;width:auto!important;margin:0!important;padding:14px!important;justify-content:flex-start!important;border-radius:16px!important;}
  .user-card>div:not(.avatar){display:block!important;}
  .main{width:100%!important;margin-left:0!important;padding:22px 16px 32px!important;}
  .topbar{display:grid!important;grid-template-columns:auto 1fr!important;gap:14px!important;align-items:start!important;margin-bottom:20px!important;}
  .page-title{font-size:32px!important;line-height:1.08!important;grid-column:2;}
  .top-actions{grid-column:1 / -1;width:100%;display:grid!important;grid-template-columns:1fr auto auto!important;gap:10px!important;align-items:center!important;}
  .top-actions .search{width:100%!important;max-width:none!important;}
  .top-actions .icon-btn{flex:0 0 auto;}
  .content-grid,.admin-layout,.stat-grid,.report-grid,.project-grid{grid-template-columns:1fr!important;}
  .card-pad{padding:18px!important;}
  .section-head{flex-wrap:wrap;gap:12px;}
  .section-title{font-size:24px;line-height:1.12;}
  .muted{line-height:1.45;}
  .form-grid{grid-template-columns:1fr!important;gap:12px;}
  .button-row .btn{min-width:180px;}
  .document-category-link-list .document-category-access-item{grid-template-columns:auto 1fr;}
  .document-category-rubric-select{grid-column:2;}
}

@media (max-width: 520px){
  .main{padding:18px 12px 28px!important;}
  .topbar{grid-template-columns:1fr!important;}
  .admin-mobile-menu-btn{grid-column:1;}
  .page-title{grid-column:1;font-size:28px!important;}
  .top-actions{grid-template-columns:1fr auto auto!important;}
  .top-actions .search{height:48px;border-radius:16px;}
  .top-actions .search kbd{display:none;}
  .icon-btn{width:48px;height:48px;border-radius:16px;}
  .card-pad{padding:16px!important;border-radius:18px;}
  .section-title{font-size:22px;}
  .button-row{display:grid;grid-template-columns:1fr;}
  .button-row .btn,.btn{width:100%;white-space:normal;}
  .table-wrap{margin-left:-4px;margin-right:-4px;}
  .table-wrap .table{min-width:560px;}
  .document-categories-card > .section-head .section-title{font-size:20px;}
  .upload-field{min-height:48px;}
  .upload-field__text strong{font-size:13px;}
  .upload-field__text small{font-size:11px;}
}


/* v23.03 responsive and login polish */
.project-grid{
  grid-template-columns:repeat(auto-fill,minmax(260px,320px))!important;
  justify-content:start!important;
  align-items:start;
}
.project-card{
  width:100%;
  max-width:320px;
  min-width:0;
}
.project-domain,
.project-name{
  overflow:hidden;
  text-overflow:ellipsis;
  overflow-wrap:anywhere;
}
.project-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.nav-btn{position:relative;}
.nav-badge{
  flex:0 0 auto;
  margin-left:auto;
}
.activity-list,
#activityList,
.activity-card{
  min-width:0;
}

@media (min-width:901px) and (max-width:1100px){
  .nav-badge{
    position:absolute!important;
    top:7px!important;
    right:7px!important;
    margin:0!important;
    min-width:18px!important;
    height:18px!important;
    font-size:10px!important;
    z-index:3;
  }
  .quick-panel{
    overflow:hidden!important;
  }
  .quick-panel span:first-child{
    max-width:20px!important;
    overflow:hidden!important;
    white-space:nowrap!important;
  }
}

@media (max-width:900px){
  .main{
    max-width:none!important;
    width:100%!important;
  }
  .project-grid{
    grid-template-columns:1fr!important;
  }
  .project-card{
    max-width:none!important;
  }
}

@media (max-width:520px){
  .main{
    padding:18px 10px 28px!important;
    max-width:none!important;
  }
  .card,
  .card-pad,
  .activity-card,
  #activityView .card,
  #activityView .card-pad{
    width:100%!important;
    max-width:none!important;
  }
  .activity-item,
  .timeline-item{
    grid-template-columns:42px 1fr!important;
    gap:10px!important;
  }
  .activity-item .activity-time,
  .timeline-time{
    grid-column:2!important;
    font-size:12px!important;
    opacity:.78;
  }
  .search input{
    autocomplete:off;
  }
}

/* v23.04 test-ready UI polish */
/* CTA buttons: keep one-line labels on desktop, full width on mobile */
.btn,
.primary-btn,
.small-btn{
  white-space:nowrap;
}
.section-head .btn,
.section-head .primary-btn,
button[id*="add" i],
button[data-view="documents"] + .btn,
#addDocumentBtn,
#addProjectBtn,
#addUserBtn,
#saveDocumentBtn,
#saveProjectBtn{
  min-width:160px;
  width:auto;
  white-space:nowrap!important;
  padding-left:18px;
  padding-right:18px;
}

/* Dashboard projects: dense grid on wide screens, without huge gaps */
.project-grid{
  grid-template-columns:repeat(auto-fill,minmax(260px,320px))!important;
  justify-content:start!important;
  gap:20px!important;
}
.project-card{
  max-width:320px!important;
}
.project-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
}
.project-actions .mini-btn{
  width:auto!important;
  min-width:72px!important;
  padding:0 10px!important;
}
.project-domain,
.report-link,
.table a,
.document-desc{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  overflow-wrap:anywhere;
}

/* Dashboard admin/file registry: prevent cramped side-by-side form on laptop widths */
@media (max-width:1366px){
  .admin-layout{
    grid-template-columns:1fr!important;
  }
  .admin-layout > .card,
  .admin-layout > .card-pad{
    width:100%;
  }
  .table-wrap{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  .table-wrap .table{
    min-width:900px;
  }
}

/* Keep red badges anchored correctly in compact dashboard sidebar */
.nav-btn{
  position:relative!important;
  min-width:0;
}
.nav-btn .nav-badge,
.nav-badge{
  flex:0 0 auto;
  margin-left:auto;
}
@media (min-width:861px) and (max-width:1100px){
  .nav-btn .nav-badge,
  .nav-badge{
    position:absolute!important;
    top:8px!important;
    right:8px!important;
    transform:none!important;
    margin:0!important;
    min-width:18px!important;
    width:18px!important;
    height:18px!important;
    font-size:10px!important;
    line-height:18px!important;
    z-index:4!important;
  }
  .quick-panel,
  .user-card{
    overflow:hidden!important;
  }
  .quick-panel span:first-child,
  .user-name,
  .user-role{
    max-width:0!important;
    opacity:0!important;
    overflow:hidden!important;
    white-space:nowrap!important;
  }
}

/* Dashboard mobile: content should use available width */
@media (max-width:520px){
  .app{
    width:100%!important;
  }
  .main,
  .dashboard-main,
  .main-content{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
  }
  .card,
  .card-pad,
  .activity-card,
  .table-wrap{
    width:100%!important;
    max-width:none!important;
  }
  .topbar{
    gap:14px!important;
  }
  .top-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr auto auto!important;
    gap:10px!important;
  }
  .top-actions .search{
    width:100%!important;
    max-width:none!important;
  }
  .section-head{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  .section-head .btn,
  .section-head .primary-btn,
  .button-row .btn,
  .btn{
    width:100%!important;
    min-width:0!important;
    white-space:normal!important;
  }
  .project-grid,
  .document-grid,
  .report-grid,
  .stat-grid,
  .form-grid{
    grid-template-columns:1fr!important;
  }
  .project-card,
  .document-card,
  .report-card{
    max-width:none!important;
  }
}

/* Small mobile activity log: compact dates and readable rows */
@media (max-width:480px){
  .activity,
  .activity-item,
  .timeline-item{
    grid-template-columns:42px 1fr!important;
    align-items:start!important;
  }
  .activity-time,
  .timeline-time{
    grid-column:2!important;
    font-size:12px!important;
    line-height:1.25!important;
    opacity:.72!important;
  }
}

/* v23.05 final dashboard layout polish: required files + overview side panels */
@media (max-width:1366px){
  #requiredView > .content-grid,
  #overviewView > .content-grid{
    grid-template-columns:1fr!important;
  }

  #requiredView .card,
  #overviewView .card{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }

  #requiredView .required-grid{
    grid-template-columns:1fr!important;
  }

  #overviewView .quick-actions{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;
    gap:10px!important;
  }

  #overviewView .quick-action{
    width:100%!important;
    min-height:46px!important;
    height:auto!important;
    justify-content:flex-start!important;
    white-space:normal!important;
    line-height:1.25!important;
    padding:12px 14px!important;
  }
}

@media (max-width:520px){
  #overviewView .quick-actions{
    grid-template-columns:1fr!important;
  }
}

/* v23.08 final polish */
@media (min-width:1601px){
  .main{max-width:none!important;width:100%!important;}
}

.field .project-access-list{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}

.field .project-access-item{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  min-height:52px!important;
  padding:12px 14px!important;
  margin:0!important;
  text-align:left!important;
}

.field .project-access-item input[type="checkbox"]{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  min-height:16px!important;
  flex:0 0 16px!important;
  margin:0!important;
  padding:0!important;
  position:static!important;
  transform:none!important;
  box-shadow:none!important;
  accent-color:var(--blue2)!important;
}

.field .document-category-link-list .document-category-access-item{
  display:grid!important;
  grid-template-columns:16px minmax(0,1fr) minmax(180px,260px)!important;
  align-items:center!important;
  column-gap:10px!important;
}

.field .document-category-link-list .document-category-access-item input[type="checkbox"]{grid-column:1!important;}
.field .document-category-access-title{grid-column:2!important;min-width:0!important;}
.field .document-category-rubric-select{grid-column:3!important;width:100%!important;}

html[data-theme="light"] .field .project-access-item,
html[data-theme="light"] .document-category-link-list .document-category-access-item{
  background:#fff!important;
  border:1px solid rgba(15,23,42,.08)!important;
  border-radius:14px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 6px 16px rgba(15,23,42,.045)!important;
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease!important;
}

html[data-theme="light"] .field .project-access-item:hover,
html[data-theme="light"] .document-category-link-list .document-category-access-item:hover{
  transform:translateY(-1px)!important;
  border-color:rgba(15,0,255,.16)!important;
  box-shadow:0 2px 4px rgba(15,23,42,.06),0 10px 24px rgba(15,23,42,.08)!important;
}

html[data-theme="light"] .upload-field,
html[data-theme="light"] .upload-field.has-file{
  background:#fff!important;
  border:1px solid rgba(15,23,42,.08)!important;
  border-radius:14px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 6px 16px rgba(15,23,42,.045)!important;
  transition:border-color .2s ease,box-shadow .2s ease,transform .2s ease!important;
}

html[data-theme="light"] .upload-field:hover,
html[data-theme="light"] .upload-field:focus-within{
  transform:translateY(-1px)!important;
  background:#fff!important;
  border-color:rgba(15,0,255,.18)!important;
  box-shadow:0 2px 4px rgba(15,23,42,.06),0 10px 24px rgba(15,23,42,.08),0 0 0 3px rgba(15,0,255,.055)!important;
}

@media(max-width:768px){
  .field .project-access-list{grid-template-columns:1fr!important;}
  .field .document-category-link-list .document-category-access-item{grid-template-columns:16px 1fr!important;}
  .field .document-category-rubric-select{grid-column:2!important;}
}

/* YouGile read-only module */
.nav-badge--new{width:auto;height:auto;padding:2px 6px;border-radius:999px;background:rgba(40,209,124,.18);color:#78f0af;font-size:9px;text-transform:uppercase}
.yougile-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}.yougile-tab{padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.04);color:var(--muted);font-weight:800}.yougile-tab.active{border-color:rgba(36,88,255,.55);background:rgba(36,88,255,.16);color:var(--text)}.yougile-panel{margin-top:12px}.yougile-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.yougile-sync-box{display:grid;gap:9px;color:var(--muted);font-size:14px;line-height:1.55}.yougile-sync-box b{color:var(--text)}.yougile-filters{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:14px}.yougile-filters .field.full{grid-column:span 2}.yougile-table th,.yougile-table td{white-space:normal}.yougile-status{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.yougile-status.done{color:#78f0af;background:rgba(40,209,124,.14)}.yougile-status.active{color:#ffc66d;background:rgba(255,174,66,.14)}.yougile-status.archive{color:#c8d1df;background:rgba(255,255,255,.08)}.yougile-task-cards{display:none}.yougile-task-card{padding:14px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,rgba(25,37,54,.72),rgba(12,19,30,.72));margin-bottom:10px}.yougile-task-card__top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.yougile-task-card__code{font-weight:850}.yougile-task-card__title{margin:10px 0;color:var(--text);line-height:1.35}.yougile-task-card__meta{display:grid;gap:6px;color:var(--muted);font-size:13px}.yougile-task-card__meta b{color:var(--text)}@media(max-width:1180px){.yougile-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.yougile-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.yougile-filters .field.full{grid-column:1/-1}}@media(max-width:760px){.yougile-stat-grid,.yougile-filters{grid-template-columns:1fr}.yougile-task-cards{display:block}.yougile-table{display:none}.yougile-tabs{overflow-x:auto;flex-wrap:nowrap}.yougile-tab{white-space:nowrap}}
:root[data-theme="light"] .yougile-tab{background:#fff;color:#536174}:root[data-theme="light"] .yougile-tab.active{background:#edf3ff;color:#0f2d77}:root[data-theme="light"] .yougile-task-card{background:#fff}.yougile-copy-ok{color:#78f0af}.yougile-copy-error{color:#ff8c92}

/* YouGile project links and project card */
.yougile-project-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:12px 0 14px}
.yougile-mini-stat{padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.04);display:grid;gap:4px;text-align:left;color:inherit;cursor:pointer;transition:transform .16s ease,border-color .16s ease,background .16s ease}.yougile-mini-stat:hover,.yougile-mini-stat.active{transform:translateY(-1px);border-color:rgba(36,88,255,.55);background:rgba(36,88,255,.12)}
.yougile-mini-stat b{font-size:22px;color:var(--text)}
.yougile-mini-stat span{font-size:12px;color:var(--muted);font-weight:700}
.yougile-project-list{display:grid;gap:8px}
.yougile-project-task{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.035);line-height:1.35}
.yougile-links-table td{vertical-align:middle}
.yougile-project-subhead{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:14px 0 8px}
.yougile-project-subtitle{font-weight:850;color:var(--text);font-size:15px}
.yougile-project-report{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.yougile-project-report-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.yougile-project-report-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.yougile-project-report-actions .input{height:38px;min-width:190px}

:root[data-theme="light"] .yougile-mini-stat,
:root[data-theme="light"] .yougile-project-task{background:#fff}
:root[data-theme="light"] .yougile-mini-stat:hover,:root[data-theme="light"] .yougile-mini-stat.active{background:#edf3ff;border-color:#b8c9ff}
@media(max-width:1180px){.yougile-project-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.yougile-project-stats{grid-template-columns:1fr 1fr}.yougile-project-card .section-head{gap:12px}.yougile-project-card .section-head .button-row,.yougile-project-card .section-head .btn{width:100%}.yougile-project-report-head{display:grid}.yougile-project-report-actions{display:grid}.yougile-project-report-actions .input,.yougile-project-report-actions .btn{width:100%}}

/* YouGile v27 rules */
.yougile-rules-table input.input,
.yougile-column-rules-table select.input{min-width:160px;height:36px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text)}
.checkline{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:13px;font-weight:700;white-space:nowrap}
.checkline input{width:16px;height:16px;accent-color:#2458ff}
.yougile-project-stats{grid-template-columns:repeat(7,minmax(0,1fr))}
@media(max-width:1180px){.yougile-project-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.yougile-project-stats{grid-template-columns:1fr 1fr}}

/* v28 YouGile visual polish */
.yougile-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:20px;margin:2px 0 18px;padding:22px;border:1px solid rgba(36,88,255,.26);border-radius:24px;background:radial-gradient(circle at 15% 10%,rgba(36,88,255,.30),transparent 28%),radial-gradient(circle at 88% 18%,rgba(37,215,232,.14),transparent 26%),linear-gradient(135deg,rgba(25,37,54,.86),rgba(10,16,26,.84));box-shadow:0 24px 70px rgba(0,0,0,.22)}
.yougile-hero__glow{position:absolute;right:-120px;bottom:-170px;width:380px;height:380px;border-radius:50%;background:repeating-radial-gradient(circle,rgba(255,255,255,.12) 0 1px,transparent 1px 18px),radial-gradient(circle,rgba(15,0,255,.25),transparent 58%);opacity:.75;pointer-events:none}
.yougile-hero__content,.yougile-hero__actions{position:relative;z-index:1}.yougile-kicker{display:inline-flex;align-items:center;gap:8px;margin-bottom:8px;padding:6px 10px;border:1px solid rgba(40,209,124,.26);border-radius:999px;color:#8af2b7;background:rgba(40,209,124,.10);font-size:12px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.yougile-kicker:before{content:"";width:7px;height:7px;border-radius:50%;background:#28d17c;box-shadow:0 0 0 5px rgba(40,209,124,.13)}
.yougile-hero__title{font-size:34px;font-weight:900;letter-spacing:-.055em}.yougile-hero p{max-width:720px;margin:8px 0 0;color:var(--muted);line-height:1.6}.yougile-hero__badges{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.yougile-hero__badges span{padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.045);color:#cbd5e1;font-size:12px;font-weight:760}.yougile-hero__actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.yougile-tabs{position:sticky;top:0;z-index:7;padding:8px;margin:0 0 16px;border:1px solid var(--line);border-radius:18px;background:rgba(9,15,25,.82);backdrop-filter:blur(16px);box-shadow:0 18px 40px rgba(0,0,0,.16)}.yougile-tab{border-radius:12px}.yougile-tab.active{box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 10px 24px rgba(36,88,255,.12)}
.yougile-stat-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.yougile-stat-grid .stat-card{min-height:126px;border-radius:18px}.yougile-stat-grid .stat-value{font-size:34px}.yougile-overview-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:16px}.yougile-actions-card,.yougile-recent-card{min-height:180px}.yougile-action-grid{grid-template-columns:1fr;gap:10px}.yougile-breakdown{display:grid;gap:12px;margin-top:12px}.yougile-breakdown-row{display:grid;gap:7px}.yougile-breakdown-row__head{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;color:var(--muted)}.yougile-breakdown-row__head b{color:var(--text)}.yougile-breakdown-bar{height:8px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.08)}.yougile-breakdown-bar span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--blue),var(--cyan));box-shadow:0 0 18px rgba(36,88,255,.32)}
.yougile-recent-list{display:grid;gap:10px;margin-top:12px}.yougile-recent-item{padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.035)}.yougile-recent-item__top{display:flex;align-items:center;justify-content:space-between;gap:10px}.yougile-recent-item__title{margin-top:8px;font-size:14px;line-height:1.35;color:var(--text)}.yougile-recent-item__meta{margin-top:7px;color:var(--muted);font-size:12px;line-height:1.45}
.yougile-filters{position:sticky;top:64px;z-index:6;border-radius:18px;background:linear-gradient(180deg,rgba(25,37,54,.86),rgba(12,19,30,.86));backdrop-filter:blur(14px);box-shadow:0 18px 45px rgba(0,0,0,.16)}.yougile-filters .field{margin-bottom:0}.yougile-filters label{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}.yougile-filters select,.yougile-filters input{height:42px;border-radius:12px}.yougile-table{border-collapse:separate;border-spacing:0}.yougile-table th{position:sticky;top:0;background:rgba(13,21,33,.96);z-index:1}.yougile-table tr:hover td{background:rgba(36,88,255,.055)}.yougile-table td:first-child,.yougile-table th:first-child{padding-left:16px}.yougile-status{border:1px solid transparent}.yougile-status.done{border-color:rgba(40,209,124,.22)}.yougile-status.active{border-color:rgba(255,173,59,.22)}.yougile-status.archive{border-color:rgba(255,255,255,.10)}
.yougile-task-card{border-radius:18px;background:radial-gradient(circle at 94% 0,rgba(36,88,255,.12),transparent 32%),linear-gradient(180deg,rgba(25,37,54,.82),rgba(12,19,30,.78))}.yougile-task-card__code{color:#dce6ff}.yougile-task-card__title{font-weight:760}.yougile-project-card{background:radial-gradient(circle at 100% 0,rgba(36,88,255,.10),transparent 26%),linear-gradient(180deg,rgba(25,37,54,.72),rgba(12,19,30,.72))}.yougile-mini-stat{min-height:86px;position:relative;overflow:hidden}.yougile-mini-stat:after{content:"";position:absolute;right:-22px;top:-22px;width:72px;height:72px;border-radius:50%;background:rgba(36,88,255,.10)}.yougile-mini-stat b,.yougile-mini-stat span{position:relative;z-index:1}.yougile-mini-stat.active:after,.yougile-mini-stat:hover:after{background:rgba(36,88,255,.18)}.yougile-project-report{border-top-style:dashed}.yougile-project-report-actions .btn{min-height:38px}
html[data-theme="light"] .yougile-hero{background:radial-gradient(circle at 15% 10%,rgba(36,88,255,.14),transparent 30%),radial-gradient(circle at 86% 18%,rgba(37,215,232,.10),transparent 28%),linear-gradient(135deg,#fff,#f7f9ff);box-shadow:0 20px 54px rgba(15,23,42,.08);border-color:#d8e2ff}html[data-theme="light"] .yougile-hero__badges span{background:#fff;color:#536174;border-color:#e6ebf5}html[data-theme="light"] .yougile-tabs{background:rgba(255,255,255,.88);box-shadow:0 16px 38px rgba(15,23,42,.08)}html[data-theme="light"] .yougile-filters{background:rgba(255,255,255,.92);box-shadow:0 18px 40px rgba(15,23,42,.08)}html[data-theme="light"] .yougile-table th{background:#f8fafc}html[data-theme="light"] .yougile-recent-item,html[data-theme="light"] .yougile-project-card{background:#fff}html[data-theme="light"] .yougile-task-card{background:#fff;box-shadow:0 14px 34px rgba(15,23,42,.06)}html[data-theme="light"] .yougile-breakdown-bar{background:#e8edf5}html[data-theme="light"] .yougile-hero p{color:#536174}
@media(max-width:1180px){.yougile-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.yougile-overview-grid{grid-template-columns:1fr}.yougile-hero{align-items:flex-start;flex-direction:column}.yougile-hero__actions{justify-content:flex-start}.yougile-filters{top:0}}
@media(max-width:760px){.yougile-hero{padding:18px;border-radius:20px}.yougile-hero__title{font-size:28px}.yougile-hero__actions,.yougile-hero__actions .btn{width:100%}.yougile-stat-grid{grid-template-columns:1fr 1fr}.yougile-tabs{overflow-x:auto;flex-wrap:nowrap}.yougile-tabs::-webkit-scrollbar{display:none}.yougile-overview-grid{gap:12px}.yougile-filters{position:relative;top:auto}}

/* YouGile v29 movement control */
.yougile-movement-mini{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.yougile-movement-mini>div{padding:12px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.035);display:grid;gap:4px}
.yougile-movement-mini b{font-size:24px;color:var(--text)}
.yougile-movement-mini span{font-size:12px;color:var(--muted);font-weight:700;line-height:1.25}
.yougile-flow-chart{display:grid;gap:10px;margin-top:12px}
.yougile-flow-row{display:grid;gap:5px}
.yougile-flow-row__head{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:var(--muted)}
.yougile-flow-row__head b{color:var(--text)}
.yougile-flow-bar{height:9px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden}
.yougile-flow-bar span{display:block;height:100%;border-radius:999px;background:#4c7dff}
.yougile-flow-backlog{background:#64748b!important}.yougile-flow-plan{background:#22c55e!important}.yougile-flow-work{background:#3b82f6!important}.yougile-flow-review{background:#f59e0b!important}.yougile-flow-client{background:#a855f7!important}.yougile-flow-done{background:#10b981!important}
.yougile-flow-note{font-size:12px;color:var(--muted);margin-top:2px}
.yougile-transition-list,.yougile-stuck-list{display:grid;gap:8px;margin-top:12px}
.yougile-transition-item,.yougile-stuck-item{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.035);line-height:1.35}
.yougile-transition-item b,.yougile-stuck-item b{color:var(--text)}
:root[data-theme="light"] .yougile-movement-mini>div,
:root[data-theme="light"] .yougile-transition-item,
:root[data-theme="light"] .yougile-stuck-item{background:#fff}
:root[data-theme="light"] .yougile-flow-bar{background:#edf1f7}
@media(max-width:760px){.yougile-movement-mini{grid-template-columns:1fr}}

/* YouGile v29.3 simple charts and date filters */
.yougile-chart-card{min-height:260px}
.yougile-chart{display:grid;gap:10px;margin-top:12px;min-height:150px}
.yougile-chart-row{display:grid;gap:6px}
.yougile-chart-row__head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;color:var(--muted)}
.yougile-chart-row__head span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.yougile-chart-row__head b{color:var(--text);font-size:13px}
.yougile-chart-bar{height:9px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden}
.yougile-chart-bar span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--blue),var(--cyan));box-shadow:0 0 18px rgba(36,88,255,.28)}
.yougile-line-chart-wrap{display:grid;gap:10px}
.yougile-line-chart{width:100%;height:auto;min-height:180px;overflow:visible}
.yougile-chart-grid line{stroke:rgba(148,163,184,.18);stroke-width:1}
.yougile-chart-legend{display:flex;flex-wrap:wrap;gap:8px 12px;color:var(--muted);font-size:12px;line-height:1.2}
.yougile-chart-legend span{display:inline-flex;align-items:center;gap:6px;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.yougile-chart-legend i{width:8px;height:8px;border-radius:999px;flex:0 0 auto}
html[data-theme="light"] .yougile-chart-bar{background:#edf1f7}
html[data-theme="light"] .yougile-chart-grid line{stroke:rgba(100,116,139,.20)}
@media(max-width:760px){.yougile-chart-card{min-height:auto}.yougile-chart-legend span{max-width:100%}}

/* v30 YouGile workload */
.yougile-workload-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.yougile-workload-controls{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;min-width:360px;justify-content:flex-end}
.yougile-workload-controls .field{min-width:170px;margin-bottom:0}
.yougile-workload-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}
.yougile-workload-table td,.yougile-workload-table th{white-space:normal}
.yougile-workload-cards{display:none;gap:10px;margin-top:12px}
.yougile-workload-card{padding:14px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.035)}
.yougile-workload-card__top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.yougile-workload-card__top span{color:var(--muted);font-size:12px;font-weight:800}
.yougile-workload-card__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.yougile-workload-card__grid div{padding:8px;border:1px solid var(--line);border-radius:12px;display:grid;gap:3px;text-align:center}
.yougile-workload-card__grid b{font-size:18px;color:var(--text)}
.yougile-workload-card__grid span{font-size:11px;color:var(--muted);font-weight:700}
.yougile-project-load-row{display:grid;grid-template-columns:minmax(160px,1fr) 2fr;gap:10px;align-items:center}
html[data-theme="light"] .yougile-workload-card{background:#fff}
@media(max-width:1180px){.yougile-workload-head{display:grid}.yougile-workload-controls{justify-content:flex-start;min-width:0}.yougile-workload-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.yougile-workload-grid{grid-template-columns:1fr 1fr}.yougile-workload-controls{display:grid}.yougile-workload-controls .field{min-width:0}.yougile-workload-table{display:none}.yougile-workload-cards{display:grid}.yougile-workload-card__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.yougile-project-load-row{grid-template-columns:1fr}}

/* v31 visual polish and project YouGile UX fixes */
#navMissing,
.nav-btn .nav-badge:not(.nav-badge--new){
  height:21px!important;
  min-width:21px!important;
  width:10%!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  line-height:1!important;
}
.nav-badge.nav-badge--new{color:#fff!important;white-space:nowrap!important;}
html[data-theme="light"] .nav-badge.nav-badge--new{color:#fff!important;}

html[data-theme="light"] .yougile-kicker{
  color:#065f46!important;
  background:rgba(16,185,129,.14)!important;
  border-color:rgba(16,185,129,.38)!important;
  font-weight:900!important;
}

.yougile-rules-table .btn,
.yougile-project-rules-table .btn,
.yougile-rules-table button,
.yougile-project-rules-table button{
  min-width:96px!important;
  white-space:nowrap!important;
  justify-content:center!important;
  padding-left:14px!important;
  padding-right:14px!important;
}
.yougile-rules-table td:last-child,
.yougile-project-rules-table td:last-child{text-align:right;}

.yougile-project-report-actions .input,
#projectYougileMonthSelect{
  height:44px!important;
  min-width:220px!important;
  padding:0 14px!important;
  border-radius:14px!important;
  border:1px solid var(--line2)!important;
  background:rgba(7,13,22,.82)!important;
  color:var(--text)!important;
  font:inherit!important;
}
.yougile-project-report-actions .btn{
  min-height:44px!important;
  height:44px!important;
  border-radius:14px!important;
  white-space:nowrap!important;
}
html[data-theme="light"] .yougile-project-report-actions .input,
html[data-theme="light"] #projectYougileMonthSelect{
  background:#fff!important;
  color:#111827!important;
  border-color:#dbe4f0!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
}

.yougile-project-card.is-collapsed .yougile-project-body{display:none!important;}
.yougile-project-head-actions{margin-top:0;justify-content:flex-end;}
.yougile-project-stats{grid-template-columns:repeat(6,minmax(0,1fr))!important;}
@media(max-width:1180px){.yougile-project-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important;}}
@media(max-width:760px){
  .yougile-project-stats{grid-template-columns:1fr 1fr!important;}
  .yougile-project-head-actions{width:100%;justify-content:flex-start;}
  .yougile-project-head-actions .btn{width:100%;}
  .yougile-project-report-actions .input,
  #projectYougileMonthSelect,
  .yougile-project-report-actions .btn{width:100%!important;min-width:0!important;}
}

/* v32 responsive polish: admin project details, YouGile workload/rules and copy UX */
.card,
.content-grid > *,
.admin-layout > *,
.yougile-panel,
.yougile-overview-grid > *,
.yougile-workload-head > *,
.yougile-project-card,
.yougile-project-report,
.yougile-project-task{min-width:0;}
.table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
.table-wrap .table{min-width:720px;}
#yougileRulesPanel .content-grid,
#projectDetailContent .content-grid{grid-template-columns:minmax(0,1fr) minmax(300px,420px);}
#yougileWorkloadPanel .yougile-overview-grid{grid-template-columns:minmax(0,1fr) minmax(300px,360px);align-items:start;}
#yougileWorkloadPanel .yougile-chart-card{overflow:hidden;}
#yougileWorkloadPanel .yougile-chart{min-width:0;}
#yougileRulesPanel .table-wrap .table{min-width:680px;}
#yougileRulesPanel .yougile-rules-table input.input{min-width:170px;}
#yougileRulesPanel .checkline{white-space:nowrap;}
.yougile-project-report-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;}
.yougile-project-report-head > div:first-child{min-width:0;}
.yougile-project-report-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;}
.yougile-project-list{min-width:0;}
.yougile-project-task{overflow:hidden;}
.yougile-project-task > div{min-width:0;overflow-wrap:anywhere;}
@media(max-width:1400px){
  #projectDetailContent .content-grid,
  #yougileRulesPanel .content-grid,
  #yougileWorkloadPanel .yougile-overview-grid{grid-template-columns:1fr!important;}
  #yougileWorkloadPanel .yougile-chart-card{order:2;}
  #yougileWorkloadPanel .yougile-workload-head{display:grid;grid-template-columns:1fr!important;}
  #yougileWorkloadPanel .yougile-workload-controls{justify-content:flex-start;min-width:0;width:100%;}
}
@media(max-width:920px){
  .yougile-workload-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .yougile-project-report-head{display:grid;grid-template-columns:1fr;}
  .yougile-project-report-actions{justify-content:flex-start;width:100%;}
  .yougile-project-report-actions .input,
  #projectYougileMonthSelect,
  .yougile-project-report-actions .btn{width:100%!important;min-width:0!important;}
  #yougileRulesPanel .content-grid .card,
  #yougileWorkloadPanel .card,
  #projectDetailContent .content-grid .card{overflow:hidden;}
}
@media(max-width:620px){
  .yougile-workload-grid{grid-template-columns:1fr!important;}
  .yougile-workload-card__grid{grid-template-columns:1fr 1fr!important;}
  .yougile-project-stats{grid-template-columns:1fr!important;}
  .section-head{align-items:flex-start;flex-direction:column;}
  .section-head .btn,
  .section-head .button-row{width:100%;}
  .section-head .button-row .btn{flex:1 1 100%;}
}


/* v33 targeted fixes: desktop workload layout and default collapsed project YouGile block */
@media (min-width:1181px){
  #yougileWorkloadPanel .yougile-overview-grid{
    grid-template-columns:minmax(0,1fr) minmax(380px,420px)!important;
    align-items:start!important;
  }
  #yougileWorkloadPanel .yougile-chart-card{
    width:100%!important;
    min-width:380px!important;
    max-width:420px!important;
    justify-self:stretch!important;
  }
}
@media (max-width:1180px){
  #yougileWorkloadPanel .yougile-overview-grid{
    grid-template-columns:1fr!important;
  }
  #yougileWorkloadPanel .yougile-chart-card{
    min-width:0!important;
    max-width:none!important;
  }
}

/* v34: large-screen balance for YouGile workload/rules panels */
@media (min-width: 1401px){
  #yougileWorkloadPanel,
  #yougileRulesPanel{
    max-width:1560px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  #yougileWorkloadPanel .yougile-overview-grid{
    grid-template-columns:minmax(0,1fr) minmax(380px,420px)!important;
    gap:18px!important;
    align-items:start!important;
  }
  #yougileWorkloadPanel .yougile-chart-card{
    min-width:380px!important;
    max-width:420px!important;
    justify-self:stretch!important;
  }
  #yougileRulesPanel .content-grid{
    grid-template-columns:minmax(0,1fr) minmax(380px,460px)!important;
    gap:18px!important;
    align-items:start!important;
  }
}
@media (min-width: 1800px){
  #yougileWorkloadPanel,
  #yougileRulesPanel{
    max-width:1600px!important;
  }
  #yougileRulesPanel .content-grid{
    grid-template-columns:minmax(0,1fr) 460px!important;
  }
}

/* v35: targeted YouGile layout fix — no global narrowing on wide screens */
@media (min-width: 1181px){
  #yougileWorkloadPanel,
  #yougileRulesPanel{
    max-width:none!important;
    width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  #yougileWorkloadPanel .yougile-overview-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(380px,420px)!important;
    gap:18px!important;
    align-items:start!important;
  }
  #yougileWorkloadPanel .yougile-chart-card{
    min-width:380px!important;
    max-width:420px!important;
    width:100%!important;
    justify-self:stretch!important;
  }
  #yougileRulesPanel .content-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(420px,460px)!important;
    gap:18px!important;
    align-items:start!important;
    max-width:none!important;
    width:100%!important;
  }
  #yougileRulesPanel .content-grid > .card:nth-child(2){
    max-height:calc(100vh - 260px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  #yougileRulesPanel .content-grid > .card:nth-child(2) .table-wrap{
    overflow-x:hidden!important;
  }
  #yougileRulesPanel .content-grid > .card:nth-child(2) .table,
  #yougileRulesPanel .content-grid > .card:nth-child(2) table{
    min-width:0!important;
    width:100%!important;
    table-layout:auto!important;
  }
  #yougileRulesPanel .content-grid > .card:nth-child(2) th,
  #yougileRulesPanel .content-grid > .card:nth-child(2) td{
    white-space:normal!important;
  }
  #yougileRulesPanel .content-grid > .card:nth-child(2) .checkline{
    white-space:nowrap!important;
  }
}
@media (max-width: 1180px){
  #yougileWorkloadPanel .yougile-overview-grid,
  #yougileRulesPanel .content-grid{
    grid-template-columns:1fr!important;
  }
  #yougileRulesPanel .content-grid > .card:nth-child(2){
    max-height:none!important;
    overflow:visible!important;
  }
  #yougileRulesPanel .content-grid > .card:nth-child(2) .table-wrap{
    overflow-x:auto!important;
  }
}

/* v36 Yandex Webmaster integration */
.ywm-hero .yougile-hero__title::after {
  content: ' beta';
  font-size: 13px;
  vertical-align: super;
  opacity: .72;
}
.ywm-query-filters {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}
.ywm-query-filters .field.full {
  grid-column: 1 / -1;
}
.ywm-table-wrap {
  max-height: calc(100vh - 360px);
  overflow: auto;
}
.ywm-query-table {
  min-width: 1280px;
}
.ywm-query-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.ywm-query-text {
  min-width: 260px;
  text-align: left;
  font-weight: 700;
}
.ywm-date-meta {
  font-size: 11px;
  opacity: .68;
  margin-top: 4px;
  white-space: nowrap;
}
.ywm-pos-cell {
  position: relative;
  height: 72px;
  min-width: 92px;
  color: #111827;
}
.ywm-pos-cell .position {
  position: absolute;
  top: 8px;
  left: 8px;
  font-weight: 800;
  font-size: 15px;
}
.ywm-pos-cell .position-change {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 800;
}
.ywm-pos-cell .change-up { color: #dc2626; }
.ywm-pos-cell .change-down { color: #047857; }
.ywm-pos-cell .details {
  position: absolute;
  right: 8px;
  bottom: 6px;
  text-align: right;
  font-size: 10px;
  line-height: 1.25;
  color: #334155;
}
[data-theme="dark"] .ywm-pos-cell,
body.dark .ywm-pos-cell {
  color: #0f172a;
}
@media (max-width: 980px) {
  .ywm-query-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .ywm-query-filters { grid-template-columns: 1fr; }
  .ywm-table-wrap { max-height: none; }
}

/* v37 Yandex Webmaster project summary */
.ywm-project-card{background:radial-gradient(circle at 100% 0,rgba(245,158,11,.12),transparent 28%),linear-gradient(180deg,rgba(25,37,54,.72),rgba(12,19,30,.72));}
html[data-theme="light"] .ywm-project-card{background:#fff;}
.ywm-project-stats{grid-template-columns:repeat(8,minmax(0,1fr))!important;}
.ywm-project-head-actions{margin-top:0;justify-content:flex-end;}
.ywm-opportunity-row b{display:inline-flex;align-items:center;justify-content:center;min-width:42px;margin-right:6px;padding:3px 7px;border-radius:999px;background:rgba(245,158,11,.14);color:#fbbf24;}
html[data-theme="light"] .ywm-opportunity-row b{background:#fff7ed;color:#c2410c;}
@media(max-width:1400px){.ywm-project-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important;}}
@media(max-width:760px){.ywm-project-stats{grid-template-columns:1fr 1fr!important;}.ywm-project-head-actions{width:100%;justify-content:flex-start;}.ywm-project-head-actions .btn{width:100%;}}
@media(max-width:520px){.ywm-project-stats{grid-template-columns:1fr!important;}}

/* v38 Yandex Webmaster: restore readable position color scale in light theme */
.ywm-pos-cell.ywm-pos-cell--colored {
  color: #111827 !important;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.ywm-pos-cell.ywm-pos-cell--colored .details {
  color: #334155 !important;
}
.ywm-pos-cell.ywm-pos-cell--colored .position {
  color: #0f172a !important;
}
html[data-theme="light"] .ywm-pos-cell.ywm-pos-cell--colored,
body:not(.dark) .ywm-pos-cell.ywm-pos-cell--colored {
  color: #111827 !important;
}
html[data-theme="light"] .ywm-pos-cell.ywm-pos-cell--colored .details,
body:not(.dark) .ywm-pos-cell.ywm-pos-cell--colored .details {
  color: #334155 !important;
}
html[data-theme="light"] .ywm-pos-cell.ywm-pos-cell--colored .change-up,
body:not(.dark) .ywm-pos-cell.ywm-pos-cell--colored .change-up { color: #dc2626 !important; }
html[data-theme="light"] .ywm-pos-cell.ywm-pos-cell--colored .change-down,
body:not(.dark) .ywm-pos-cell.ywm-pos-cell--colored .change-down { color: #047857 !important; }


/* v39 Yandex Webmaster: force PHP prototype position colors in light and dark tables */
.ywm-pos-cell.ywm-pos-cell--colored {
  background: var(--ywm-pos-bg) !important;
}
html[data-theme="light"] .ywm-pos-cell.ywm-pos-cell--colored,
body:not(.dark) .ywm-pos-cell.ywm-pos-cell--colored {
  background: var(--ywm-pos-bg) !important;
}
.ywm-project-stats{grid-template-columns:repeat(9,minmax(0,1fr))!important;}
@media(max-width:1600px){.ywm-project-stats{grid-template-columns:repeat(5,minmax(0,1fr))!important;}}
@media(max-width:1100px){.ywm-project-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important;}}
@media(max-width:760px){.ywm-project-stats{grid-template-columns:1fr 1fr!important;}}
@media(max-width:520px){.ywm-project-stats{grid-template-columns:1fr!important;}}

/* v40 Yandex Webmaster charts */
.ywm-chart-section{margin-top:18px;}
.ywm-chart-host-field{min-width:280px;margin:0;}
.ywm-charts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:14px;}
.ywm-chart-card{min-height:300px;}
.ywm-chart-card .section-title.small{font-size:18px;line-height:1.2;margin-bottom:4px;}
.ywm-line-chart text{fill:var(--muted);font-size:11px;}
.ywm-chart-axis text{font-weight:700;}
@media(max-width:1180px){.ywm-charts-grid{grid-template-columns:1fr;}.ywm-chart-host-field{width:100%;}}
@media(max-width:720px){.ywm-chart-section .section-head{flex-direction:column;align-items:stretch;}.ywm-chart-host-field select{width:100%;}.ywm-chart-card{min-height:auto;}}

/* v42 — Yandex Webmaster opportunities */
.ywm-opportunity-filters {
  grid-template-columns: 1.2fr 1.2fr .7fr .7fr .9fr 1.4fr;
}
.ywm-opportunity-stats {
  margin: 16px 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ywm-opportunity-table-wrap {
  max-height: 680px;
  overflow: auto;
}
.ywm-opportunity-table {
  min-width: 1040px;
}
.ywm-opportunity-table .position-change.change-up,
.ywm-opportunity-table .change-up {
  color: #dc2626;
  font-weight: 800;
}
.ywm-opportunity-table .position-change.change-down,
.ywm-opportunity-table .change-down {
  color: #047857;
  font-weight: 800;
}
[data-theme="dark"] .ywm-opportunity-table .position-change.change-up,
body.dark .ywm-opportunity-table .position-change.change-up,
[data-theme="dark"] .ywm-opportunity-table .change-up,
body.dark .ywm-opportunity-table .change-up {
  color: #fb7185;
}
[data-theme="dark"] .ywm-opportunity-table .position-change.change-down,
body.dark .ywm-opportunity-table .position-change.change-down,
[data-theme="dark"] .ywm-opportunity-table .change-down,
body.dark .ywm-opportunity-table .change-down {
  color: #34d399;
}
@media (max-width: 1360px) {
  .ywm-opportunity-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ywm-opportunity-filters .field.full { grid-column: span 3; }
}
@media (max-width: 860px) {
  .ywm-opportunity-filters { grid-template-columns: 1fr; }
  .ywm-opportunity-filters .field.full { grid-column: auto; }
  .ywm-opportunity-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .ywm-opportunity-stats { grid-template-columns: 1fr; }
}

/* v45: Yandex Webmaster SEO signals */
.ywm-signals-list .activity-item,
.ywm-project-signals-card .activity-item {
  border-left: 3px solid rgba(148, 163, 184, 0.28);
}
.ywm-signals-list .activity-item.risk,
.ywm-project-signals-card .activity-item.risk {
  border-left-color: rgba(239, 68, 68, 0.8);
}
.ywm-signals-list .activity-item.opportunity,
.ywm-project-signals-card .activity-item.opportunity {
  border-left-color: rgba(14, 165, 233, 0.8);
}
.ywm-project-signals-card { margin-top: 18px; }
@media (max-width: 760px) {
  .ywm-signals-filters { grid-template-columns: 1fr; }
}

/* v46: Yandex Webmaster SEO recommendations */
.ywm-recommendations-filters {
  grid-template-columns: 1.3fr .8fr 1fr;
}
.ywm-recommendation-stats {
  margin: 16px 0;
}
.ywm-recommendations-list {
  display: grid;
  gap: 14px;
}
.ywm-recommendation-card .section-head {
  align-items: flex-start;
}
.ywm-recommendation-card .button-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ywm-rec-body {
  margin-top: 12px;
  color: var(--text);
}
.ywm-rec-body p {
  margin: 8px 0;
}
.ywm-rec-body ol {
  margin: 8px 0 0 20px;
  padding: 0;
}
.ywm-rec-body li {
  margin: 5px 0;
}
.ywm-project-recommendations-card { margin-top: 18px; }
.ywm-project-recommendations-card .activity-item,
.ywm-recommendations-list .ywm-recommendation-card {
  border-left: 3px solid rgba(14, 165, 233, 0.75);
}
@media (max-width: 900px) {
  .ywm-recommendations-filters { grid-template-columns: 1fr; }
  .ywm-recommendation-card .section-head { flex-direction: column; align-items: stretch; }
  .ywm-recommendation-card .button-row { justify-content: flex-start; }
}

/* v50: Yandex Webmaster SEO work plan */
.ywm-work-plan-list {
  display: grid;
  gap: 14px;
}
.ywm-work-plan-card .section-head {
  gap: 12px;
}
.ywm-work-plan-card .button-row {
  align-items: center;
  flex-wrap: wrap;
}
.ywm-plan-status-select {
  min-width: 132px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
}
@media (max-width: 760px) {
  .ywm-work-plan-card .section-head {
    align-items: stretch;
  }
  .ywm-work-plan-card .button-row,
  .ywm-work-plan-card .mini-btn,
  .ywm-work-plan-card .ywm-plan-status-select {
    width: 100%;
  }
}

/* v51: SEO work plan refinements */
.ywm-work-plan-group {
  display: grid;
  gap: 12px;
}
.ywm-work-plan-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px;
}
.ywm-work-plan-meta-grid {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(150px, 190px) minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.ywm-work-plan-meta-grid .full {
  grid-column: auto;
}
.ywm-work-plan-meta-grid textarea.input {
  min-height: 42px;
  height: auto;
  resize: vertical;
  padding-top: 10px;
  line-height: 1.35;
}
.form-actions.compact {
  margin-top: 10px;
}
@media (max-width: 1100px) {
  .ywm-work-plan-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ywm-work-plan-meta-grid .full {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .ywm-work-plan-meta-grid {
    grid-template-columns: 1fr;
  }
  .ywm-work-plan-group-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

.ywm-diagnostic-pre {
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.55;
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
body.dark .ywm-diagnostic-pre,
[data-theme="dark"] .ywm-diagnostic-pre {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.18);
  color: #dbeafe;
}

/* v53 Yandex Webmaster prepared SEO task modal */
.ywm-prepared-task-title,
.ywm-prepared-task-body{width:100%;font-family:inherit;line-height:1.5;resize:vertical;}
.ywm-prepared-task-body{min-height:360px;}
@media (max-width:640px){.ywm-prepared-task-body{min-height:280px;}}

/* v54 — Yandex Webmaster work-plan UX polish */
.ywm-in-plan-pill {
  white-space: nowrap;
}
.ywm-url-inline a,
.ywm-page-work-table a,
.ywm-work-plan-card a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ywm-url-inline a:hover,
.ywm-page-work-table a:hover,
.ywm-work-plan-card a:hover {
  opacity: .8;
}
.ywm-work-plan-group-head {
  gap: 10px;
  flex-wrap: wrap;
}

/* v56 — Yandex Webmaster integration polish */
.ywm-small-stat {
  font-size: 14px !important;
  line-height: 1.25;
  word-break: break-word;
}
.ywm-integration-card .stat-card {
  min-width: 0;
}
