:root { color-scheme: dark; --scene-bg:#0b131b; --scene-grid:#223241; --scene-room:#142431; --scene-edge:#415c70; --symbol-bg:#162a3b; --success:#71d6b3; --warning:#ffd88a; --input-bg:#0f151c; }
:root[data-theme="light"] { color-scheme:light; --bg:#fff; --panel:#fff; --panel-2:#f3f7fa; --line:#cdd9e2; --text:#111417; --muted:#526a7b; --accent:#0085ad; --accent-2:#006f91; --danger:#b42d3e; --scene-bg:#fff; --scene-grid:#e1e9ee; --scene-room:#edf5fa; --scene-edge:#9ab0c1; --symbol-bg:#fff; --success:#237346; --warning:#875300; --input-bg:#fff; }
html[data-theme="light"] .sidebar { background:#f7fafc; }
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea,html[data-theme="light"] .grid-step { background-color:var(--input-bg); }
html[data-theme="light"] .panel,html[data-theme="light"] .auth-card { box-shadow:0 8px 24px #1534470a; }
html[data-theme="light"] .module-card.active-module,html[data-theme="light"] .live-calc-panel { background:linear-gradient(135deg,#e8f6fa,#f6f9fb); }
html[data-theme="light"] .dashboard-card.accent { color:#fff; }
html[data-theme="light"] .module-no { color:#fff; }
html[data-theme="light"] .module-card:not(.is-started) .module-no { color:var(--muted); }
html[data-theme="light"] .live-calc-card,html[data-theme="light"] .formula-strip,html[data-theme="light"] .catalog-card-image { background:#f3f8fb; }
html[data-theme="light"] .silencer-steps .current { background:#e5f4f8; color:var(--accent-2); }
html[data-theme="light"] .silencer-status.good,html[data-theme="light"] .equipment-good,html[data-theme="light"] .ehr-good,html[data-theme="light"] .duct-success { color:var(--success); }
html[data-theme="light"] .silencer-status.warning,html[data-theme="light"] .equipment-warning,html[data-theme="light"] .duct-warning { color:var(--warning); }
html[data-theme="light"] .equipment-bad,html[data-theme="light"] .ehr-bad,html[data-theme="light"] .ehr-error,html[data-theme="light"] .selection-alert,html[data-theme="light"] .danger-link,html[data-theme="light"] .duct-error,html[data-theme="light"] .duct-delete,html[data-theme="light"] .hx-error,html[data-theme="light"] .hx-error-row td { color:var(--danger); }
html[data-theme="light"] .equipment-form .errorlist { color:var(--danger); }
html[data-theme="light"] #duct-feedback { background:#fff0f1; color:var(--danger); }
html[data-theme="light"] .ehr-chart,html[data-theme="light"] .building-3d-wrap,html[data-theme="light"] .room-svg,html[data-theme="light"] .plan-svg,html[data-theme="light"] .building-svg { background:#fff; }
html[data-theme="light"] .ehr-axis { fill:var(--muted); }
html[data-theme="light"] .ehr-grid { stroke:#b9cbd6; }
html[data-theme="light"] .svg-front,html[data-theme="light"] .svg-side,html[data-theme="light"] .svg-top,html[data-theme="light"] .building-front,html[data-theme="light"] .building-side,html[data-theme="light"] .building-top,html[data-theme="light"] .plan-room { stroke:#5a7a90; }
html[data-theme="light"] .grid-axis-y,html[data-theme="light"] .svg-edge { stroke:#93a9b9; }
html[data-theme="light"] .grid-line { stroke:#cddce6; }
html[data-theme="light"] .grid-label { fill:var(--muted); stroke:#fff; }
html[data-theme="light"] .building-label,html[data-theme="light"] .building-coord-label { stroke:#fff; }
.selection-target { scroll-margin-top:18px; }
.kitchen-selected { outline:2px solid var(--accent); outline-offset:-2px; }
html[data-theme="light"] .nav a.active { background:#e5f4f8; }
html:not([data-theme="light"]) .kitchen-metrics div { background:var(--panel-2); }
html:not([data-theme="light"]) .kitchen-metrics strong { color:var(--text); }
html:not([data-theme="light"]) .kitchen-suitable { background:#12302a; }

.app-credit { display:flex; justify-content:center; gap:6px; flex-wrap:wrap; margin:48px 0 8px; padding:14px 0 0; border-top:1px solid var(--line); color:var(--muted); font-size:12px; letter-spacing:.02em; }
.app-credit strong { color:var(--text); font-weight:600; letter-spacing:.08em; text-transform:uppercase; font-size:11px; }
@media (max-width:900px) { .app-credit { margin-bottom:64px; } }

.intro-hero { position:relative; display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:32px; align-items:center; margin-bottom:28px; padding:36px; border-radius:22px; border:1px solid var(--line);
  background:radial-gradient(120% 140% at 0% 0%, rgba(0,133,173,.28), transparent 55%), var(--panel); overflow:hidden; }
.intro-kicker { margin:0 0 10px; color:var(--accent); font-size:12px; font-weight:600; letter-spacing:.12em; text-transform:uppercase; }
.intro-hero h1 { margin:0 0 14px; font-size:clamp(24px,3vw,34px); line-height:1.15; letter-spacing:-.02em; }
.intro-lead { margin:0 0 22px; color:var(--muted); font-size:16px; line-height:1.55; max-width:62ch; }
.intro-actions { display:flex; flex-wrap:wrap; gap:10px; }
.intro-steps { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.intro-steps li { display:flex; gap:14px; align-items:flex-start; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--panel-2); }
.intro-steps b { flex:none; display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#0085ad; color:#fff; font-size:14px; }
.intro-steps strong, .intro-steps small { display:block; } .intro-steps small { color:var(--muted); margin-top:3px; line-height:1.4; }
.intro-close { position:absolute; top:12px; right:14px; width:32px; height:32px; border:0; border-radius:50%; background:transparent; color:var(--muted); font-size:22px; cursor:pointer; }
.intro-close:hover { background:var(--panel-2); color:var(--text); }
html[data-theme="light"] .intro-hero { background:radial-gradient(120% 140% at 0% 0%, rgba(0,133,173,.12), transparent 55%), #fff; }
@media (max-width:900px) { .intro-hero { grid-template-columns:1fr; padding:24px 20px 28px; gap:22px; } }
/* Sidebar: full module names on two lines instead of cutting them off */
html:not([data-sidebar="collapsed"]) .nav a, html:not([data-sidebar="collapsed"]) .nav .nav-disabled { white-space:normal; }
html:not([data-sidebar="collapsed"]) .nav .label { overflow:visible; text-overflow:clip; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
/* Mobile: compact round feedback button so it does not cover content */
@media (max-width:900px) {
  .feedback-fab { right:14px; bottom:14px; width:48px; height:48px; padding:0; display:grid; place-items:center; font-size:0; }
  .feedback-fab::before { content:"!"; font-size:20px; font-weight:700; line-height:1; }
}
.nav a.active { background:rgba(0,133,173,.16); }
.btn.secondary:hover { background:rgba(0,133,173,.08); }
.intro-hero:not([hidden]) ~ .page-head-row { display:none; }

.field-group { margin:0 0 18px; padding:18px 18px 4px; border:1px solid var(--line); border-radius:14px; background:var(--panel-2); }
.field-group > legend { padding:0 8px; font-weight:600; font-size:14px; color:var(--text); }
.field-group > .group-hint { margin:-4px 0 12px; font-size:13px; }
.kitchen-input-grid input[type=checkbox] { display:block; width:22px; height:22px; margin:12px 0 0; accent-color:#0085ad; }

/* Brand lockup: logo without the white tile, "Air" beside it in ENPRO blue */
.brand { flex-direction:row !important; align-items:center; gap:10px; }
.brand-logo { background:transparent; padding:0; height:auto; border-radius:0; box-shadow:none; }
.brand-logo img { height:26px; }
.brand-logo .on-light { display:none !important; }
html[data-theme="light"] .brand-logo .on-light.logo-full { display:block !important; }
html[data-theme="light"] .brand-logo .on-dark { display:none !important; }
html:not([data-theme="light"]) .brand-logo .on-dark.logo-mark { display:none; }
.brand-sub { align-self:center; margin-top:1px; color:#1aaed6; font-size:17px; font-weight:600; letter-spacing:.01em; text-transform:none; line-height:1; }
html[data-theme="light"] .brand-sub { color:#0085ad; }
html[data-sidebar="collapsed"] .brand-logo .logo-full { display:none !important; }
html[data-sidebar="collapsed"] .brand-logo .logo-mark.on-dark { display:block !important; }
html[data-sidebar="collapsed"][data-theme="light"] .brand-logo .logo-mark.on-dark { display:none !important; }
html[data-sidebar="collapsed"][data-theme="light"] .brand-logo .logo-mark.on-light { display:block !important; }
html[data-sidebar="collapsed"] .brand-logo img { height:24px; }

/* Login page */
.auth-lockup { display:flex; align-items:center; gap:14px; }
.auth-lockup img { height:40px; width:auto; }
.auth-lockup span { color:#1aaed6; font-size:28px; font-weight:600; line-height:1; }
.auth-lockup .on-light { display:none; }
.auth-brand h1 { font-size:clamp(30px,3.4vw,44px); line-height:1.12; max-width:14em; }
.auth-page .content { flex-direction:column; }
.auth-page .app-credit { margin:0; padding:14px 0; border-top:1px solid var(--line); }
/* Busy submit button */
.is-busy { position:relative; color:transparent !important; pointer-events:none; }
.is-busy::after { content:""; position:absolute; left:50%; top:50%; width:16px; height:16px; margin:-8px 0 0 -8px; border-radius:50%; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; animation:busy-spin .7s linear infinite; }
.btn.secondary.is-busy::after { border-color:var(--line); border-top-color:var(--accent); }
@keyframes busy-spin { to { transform:rotate(360deg); } }
/* Cards: gentle lift on hover */
.shop-card, .kpi, .module-card { transition:border-color .15s, transform .15s, box-shadow .15s; }
.shop-card:hover { transform:translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.18); }
@media (prefers-reduced-motion:reduce) { .shop-card:hover, .project-card:hover { transform:none; } .is-busy::after { animation-duration:2s; } }
/* Kiosk notice */
.kiosk-notice { position:fixed; inset:0; z-index:100; display:grid; place-items:center; background:rgba(5,8,11,.72); backdrop-filter:blur(4px); }
.kiosk-notice > div { max-width:420px; padding:28px 32px; border-radius:18px; background:var(--panel); border:1px solid var(--line); text-align:center; box-shadow:0 30px 80px rgba(0,0,0,.45); }
.kiosk-notice strong { font-size:22px; } .kiosk-notice p { color:var(--muted); margin:10px 0 0; }
.kiosk-notice b { color:var(--accent); font-size:20px; }
html.kiosk .intro-close { display:none; }

/* Shared project */
.share-box { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:0 0 18px; padding:12px 14px; border:1px solid var(--accent); border-radius:14px; background:rgba(0,133,173,.08); }
.share-box span { flex:1 1 260px; } .share-box input { flex:2 1 280px; width:auto; font-size:13px; }
.shared-page .content { display:block; }
.shared-wrap { max-width:1100px; margin:0 auto; padding:28px 24px 40px; }
.shared-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:28px; }
.shared-page .auth-lockup img { height:30px; } .shared-page .auth-lockup span { font-size:21px; }
html[data-theme="light"] .shared-page .auth-lockup .on-light { display:block; } html[data-theme="light"] .shared-page .auth-lockup .on-dark { display:none; }
html[data-theme="light"] .shared-page .auth-lockup span { color:#0085ad; }
.shared-badge { padding:6px 12px; border-radius:99px; border:1px solid var(--line); color:var(--muted); font-size:13px; }
.shared-cta { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-top:22px; padding:22px 24px; border-radius:18px; border:1px solid var(--line);
  background:radial-gradient(120% 140% at 0% 0%, rgba(0,133,173,.22), transparent 55%), var(--panel); }
.shared-cta p { margin:4px 0 0; }

/* Inquiry */
.inquiry-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:18px; align-items:start; }
@media (max-width:900px) { .inquiry-grid { grid-template-columns:1fr; } }
.check-line { display:flex; gap:10px; align-items:flex-start; font-size:14px; }
.check-line input { width:20px; height:20px; flex:none; margin-top:1px; accent-color:#0085ad; }

/* Floating sidebar: inset rounded panel on desktop; collapsed it becomes an icon rail */
@media (min-width: 1001px) {
  .sidebar { top:12px; height:calc(100vh - 24px); margin:12px 0 12px 12px; border:1px solid var(--line); border-radius:18px;
             background:linear-gradient(180deg, #0b1116, #080c10); box-shadow:0 10px 30px rgba(0,0,0,.35); padding:14px 10px; }
  html[data-theme="light"] .sidebar { background:#fff; box-shadow:0 8px 24px rgba(16,40,60,.08); }
  .nav a, .nav-btn, .nav .nav-disabled { border-radius:10px; }
  .nav a.active { background:rgba(26,174,214,.16); box-shadow:inset 0 0 0 1px rgba(26,174,214,.28); }
  html[data-sidebar="collapsed"] .sidebar { padding-left:8px; padding-right:8px; }
  html[data-sidebar="collapsed"] .nav a, html[data-sidebar="collapsed"] .nav-btn, html[data-sidebar="collapsed"] .nav .nav-disabled { min-height:42px; border-radius:12px; }
}

/* Language: flags in the sidebar; in the credit line only where the sidebar is hidden (login, shared page) */
.lang-flags { position:relative; display:flex; margin:2px 2px 8px; padding:3px; border:1px solid var(--line); border-radius:999px; background:var(--panel-2); }
.lang-flags::before { content:""; position:absolute; top:3px; bottom:3px; left:3px; width:calc(50% - 3px); border-radius:999px; background:#0085ad; box-shadow:0 2px 8px rgba(0,133,173,.35); transition:transform .22s ease; }
.lang-flags.is-en::before { transform:translateX(100%); }
.lang-flag { position:relative; z-index:1; display:flex; align-items:center; justify-content:center; gap:7px; flex:1; padding:6px 8px; border-radius:999px; color:var(--muted); text-decoration:none; font-size:12px; font-weight:700; letter-spacing:.05em; }
.lang-flag img { width:20px; height:15px; border-radius:2px; box-shadow:0 0 0 1px rgba(255,255,255,.18); flex:none; }
.lang-flag:hover { color:var(--text); }
.lang-flag.is-current { color:#fff; pointer-events:none; }
@media (min-width:1001px) {
  html[data-sidebar="collapsed"] .lang-flags { flex-direction:column; margin:2px 4px 8px; }
  html[data-sidebar="collapsed"] .lang-flags::before { width:auto; right:3px; height:calc(50% - 3px); bottom:auto; }
  html[data-sidebar="collapsed"] .lang-flags.is-en::before { transform:translateY(100%); }
  html[data-sidebar="collapsed"] .lang-flag { padding:7px 0; }
}
.app-credit .lang-switch { display:none; margin-left:10px; }
.auth-page .app-credit .lang-switch, .shared-page .app-credit .lang-switch { display:inline-flex; }
.app-credit .lang-switch img { display:block; border-radius:2px; box-shadow:0 0 0 1px rgba(255,255,255,.15); }
@media (min-width: 1001px) { .content:has(> .intro-hero:first-child) { padding-top:12px; } }

/* Brand row balance: logo starts on the menu icon column and fills the row up to the collapse arrow */
@media (min-width:1001px) {
  html:not([data-sidebar="collapsed"]) .brand { padding-left:10px; gap:9px; }
  html:not([data-sidebar="collapsed"]) .brand-logo img { height:27px; }
  html:not([data-sidebar="collapsed"]) .brand-sub { font-size:19px; }
  html:not([data-sidebar="collapsed"]) .sidebar-toggle { width:28px; height:30px; }
}

/* ── Motion: entrance, hover and press. All of it is switched off for prefers-reduced-motion. ── */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .sidebar { view-transition-name: sidebar; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration:.18s; }

  @keyframes rise { from { opacity:0; translate:0 10px; } }
  @keyframes grow-x { from { transform:scaleX(0); } }
  @keyframes grow-y { from { transform:scaleY(0); } }
  .content > section, .content > .home-grid > *, .content > .resume-card, .content > .kpi-grid > .kpi, .content > form, .content > .inquiry-grid > * { animation:rise .38s cubic-bezier(.2,.7,.2,1) backwards; }
  .content > :nth-child(2) { animation-delay:.04s; } .content > :nth-child(3) { animation-delay:.08s; }
  .content > :nth-child(4) { animation-delay:.12s; } .content > :nth-child(n+5) { animation-delay:.16s; }
  .kpi-grid > .kpi:nth-child(2), .module-grid > :nth-child(3n+2), .project-cards > :nth-child(2), .intro-steps > li:nth-child(2) { animation-delay:.06s; }
  .kpi-grid > .kpi:nth-child(3), .module-grid > :nth-child(3n), .project-cards > :nth-child(3), .intro-steps > li:nth-child(3) { animation-delay:.12s; }
  .kpi-grid > .kpi:nth-child(n+4) { animation-delay:.18s; }
  .module-card, .project-card, .shop-card, .intro-steps > li { animation:rise .4s cubic-bezier(.2,.7,.2,1) backwards; }
  .progress span, .bar-track .bar { transform-origin:left center; animation:grow-x .7s .15s cubic-bezier(.2,.7,.2,1) backwards; }
  .spark span { transform-origin:center bottom; animation:grow-y .5s cubic-bezier(.2,.7,.2,1) backwards; }
  .spark span:nth-child(n+5) { animation-delay:.08s; } .spark span:nth-child(n+10) { animation-delay:.16s; }

  /* Hover and press */
  .module-card, .project-card, .shop-card, .kpi, .resume-card, .intro-steps > li { transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease; }
  .module-card:not(.module-disabled):hover, .kpi:hover, .intro-steps > li:hover { transform:translateY(-2px); border-color:rgba(26,174,214,.55); box-shadow:0 10px 24px rgba(0,0,0,.22), 0 0 0 1px rgba(26,174,214,.12); }
  html[data-theme="light"] .module-card:not(.module-disabled):hover, html[data-theme="light"] .kpi:hover, html[data-theme="light"] .intro-steps > li:hover { box-shadow:0 10px 24px rgba(16,40,60,.10); }
  .module-card .module-no, .intro-steps > li > b { transition:transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
  .module-card:not(.module-disabled):hover .module-no { transform:scale(1.08); background:#0085ad; border-color:#0085ad; color:#fff; }
  .intro-steps > li:hover > b { transform:scale(1.1); }
  .resume-card:hover { transform:translateY(-1px); box-shadow:0 8px 22px rgba(0,133,173,.18); }
  .resume-go, .table-link { transition:translate .18s ease, color .18s ease; }
  .resume-card:hover .resume-go { translate:4px 0; }
  .primary, .btn, .download-primary, .download-secondary, .small-button, .feedback-fab { transition:transform .15s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease; }
  .primary:hover, .download-primary:hover, .feedback-fab:hover { transform:translateY(-1px); box-shadow:0 8px 20px rgba(0,133,173,.35); }
  .btn.secondary:hover, .download-secondary:hover { transform:translateY(-1px); }
  .primary:active, .btn:active, .download-primary:active, .download-secondary:active, .small-button:active { transform:translateY(0) scale(.98); box-shadow:none; }
  .nav a, .nav-btn { transition:background .16s ease, color .16s ease, padding-left .16s ease; }
  .nav .ico, .nav-no { transition:transform .18s ease, color .18s ease, border-color .18s ease; }
  .nav a:hover .ico, .nav-btn:hover .ico { transform:scale(1.1); color:#1aaed6; }
  .nav a:hover .nav-no { border-color:#1aaed6; color:#1aaed6; }
  .nav .new:hover .ico { transform:rotate(90deg); color:#fff; }
  .theme-toggle:hover .ico { transform:rotate(25deg) scale(1.1); }
  .content tbody tr td { transition:background .12s ease; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { transition:border-color .15s ease, box-shadow .15s ease; }
  .timeline li { transition:translate .16s ease; } .timeline li:hover { translate:3px 0; }
}
.sidebar-toggle .ico { width:20px; height:20px; flex:none; }

/* Language change: an ENPRO-blue curtain with the language name sweeps across; the new page is behind it. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes curtain-in { from { transform:translateX(-101%); } to { transform:none; } }
  @keyframes curtain-out { from { transform:none; } to { transform:translateX(101%); } }
  html.lang-leaving::after, html.lang-flip::after { content:attr(data-lang-label); position:fixed; inset:0; z-index:9999; display:grid; place-items:center;
    background:linear-gradient(110deg, #006d8f, #0085ad 45%, #1aaed6); color:#fff; font-family:var(--font-sans); font-size:clamp(28px, 5vw, 56px); font-weight:700; letter-spacing:-.02em; pointer-events:none; }
  html.lang-leaving::after { animation:curtain-in .34s cubic-bezier(.6,0,.3,1) forwards; }
  html.lang-flip::after { animation:curtain-out .5s .22s cubic-bezier(.6,0,.3,1) both; }
  html.lang-leaving { overflow:hidden; }
  html.lang-flip .sidebar, html.lang-leaving .sidebar { view-transition-name:none; }
  html.lang-flip::view-transition-group(*), html.lang-flip::view-transition-old(*), html.lang-flip::view-transition-new(*),
  html.lang-leaving::view-transition-group(*), html.lang-leaving::view-transition-old(*), html.lang-leaving::view-transition-new(*) { animation:none !important; }
}

/* Toasts */
@media (min-width: 701px) {
  .messages { position:fixed; bottom:76px; right:20px; z-index:60; width:min(380px, calc(100vw - 32px)); margin:0; display:flex; flex-direction:column-reverse; gap:8px; pointer-events:none; }
}
.messages .message { position:relative; pointer-events:auto; padding-right:38px; overflow:hidden; box-shadow:0 12px 30px rgba(0,0,0,.35); background:var(--panel); }
html[data-theme="light"] .messages .message { box-shadow:0 10px 26px rgba(16,40,60,.14); }
.toast-close { position:absolute; top:6px; right:6px; width:26px; height:26px; border:0; border-radius:8px; background:transparent; color:var(--muted); font-size:18px; line-height:1; cursor:pointer; }
.toast-close:hover { color:var(--text); background:var(--panel-2); }
.message.is-timed::after { content:""; position:absolute; left:0; bottom:0; height:2px; width:100%; background:#1aaed6; transform-origin:left center; animation:toast-timer var(--toast-ms, 5500ms) linear forwards; }
.message.success.is-timed::after { background:var(--success); }
@keyframes toast-timer { to { transform:scaleX(0); } }
@keyframes toast-in { from { opacity:0; translate:24px 0; } }
.messages .message { animation:toast-in .32s cubic-bezier(.2,.7,.2,1) backwards; transition:opacity .24s ease, translate .24s ease; }
.messages .message.is-leaving { opacity:0; translate:24px 0; }
@media (prefers-reduced-motion: reduce) { .messages .message { animation:none; } .message.is-timed::after { animation:none; display:none; } }

/* Spotlight on cards */
@media (hover:hover) {
  .module-card:not(.module-disabled):hover, .kpi:hover, .project-card:hover, .shop-card:hover, .intro-steps > li:hover { background-image:radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(26,174,214,.13), transparent 70%); }
  html[data-theme="light"] .module-card:not(.module-disabled):hover, html[data-theme="light"] .kpi:hover, html[data-theme="light"] .project-card:hover, html[data-theme="light"] .shop-card:hover, html[data-theme="light"] .intro-steps > li:hover { background-image:radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(0,133,173,.08), transparent 70%); }
}

/* Download button: done tick */
.is-done { position:relative; color:transparent !important; pointer-events:none; }
.is-done::after { content:"\2713"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#3ddc97; font-weight:700; font-size:17px; animation:done-pop .3s cubic-bezier(.2,1.4,.4,1); }
@keyframes done-pop { from { transform:scale(.4); opacity:0; } }
a.download-secondary.is-busy::after, .btn.secondary.is-busy::after { border-color:var(--line); border-top-color:#1aaed6; }

@media (min-width: 701px) { .auth-page .messages { bottom:24px; } }

/* Living gradient behind the intro: slow blurred lights drifting like air */
.intro-hero { overflow:hidden; isolation:isolate; }
.intro-hero::before, .intro-hero::after { content:""; position:absolute; z-index:-1; border-radius:50%; filter:blur(56px); pointer-events:none; display:block; }
.intro-hero::before { width:44%; aspect-ratio:1; left:-10%; top:-50%; background:rgba(26,174,214,.55); }
.intro-hero::after { width:40%; aspect-ratio:1; right:-6%; bottom:-70%; background:rgba(0,120,200,.55); }
html[data-theme="light"] .intro-hero::before { background:rgba(26,174,214,.32); }
html[data-theme="light"] .intro-hero::after { background:rgba(0,133,173,.26); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes air-a { 0%,100% { translate:0 0; scale:1; } 33% { translate:95% 30%; scale:1.25; } 66% { translate:40% 85%; scale:.85; } }
  @keyframes air-b { 0%,100% { translate:0 0; scale:1; } 33% { translate:-110% -45%; scale:1.3; } 66% { translate:-45% -95%; scale:.9; } }
  .intro-hero::before { animation:air-a 13s ease-in-out infinite; }
  .intro-hero::after { animation:air-b 17s ease-in-out infinite; }
}

/* Collapsed rail in the light theme: only the "E" mark, never the full logo */
@media (min-width:1001px) {
  html[data-sidebar="collapsed"][data-theme="light"] .brand-logo .on-light.logo-full,
  html[data-sidebar="collapsed"] .brand-logo .on-dark.logo-full { display:none !important; }
  html[data-sidebar="collapsed"] .brand { padding-left:0; justify-content:center; }
}

/* Phone: page actions as a tidy two-column grid instead of squeezed, cut-off buttons */
@media (max-width:700px) {
  .page-head-row > .page-actions { display:grid; grid-template-columns:1fr 1fr; width:100%; gap:8px; }
  .page-head-row > .page-actions > a, .page-head-row > .page-actions > .menu > summary { display:flex; align-items:center; justify-content:center; width:100%; min-height:44px; text-align:center; white-space:nowrap; }
  .page-head-row > .page-actions > .menu { width:100%; }
  .page-head-row > .page-actions .menu-list { left:auto; right:0; }
}

/* Step indicator through the project modules */
.stepper { display:flex; align-items:center; gap:12px; margin:0 0 18px; padding:8px 10px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.step-dots { display:flex; align-items:center; gap:0; list-style:none; margin:0; padding:0; flex:1 1 auto; min-width:0; }
.step-dots li { display:flex; align-items:center; flex:1 1 0; min-width:0; }
.step-dots li:last-child { flex:0 0 auto; }
.step-dots li:not(:last-child)::after { content:""; flex:1 1 auto; height:2px; margin:0 4px; background:var(--line); border-radius:2px; }
.step-dots li.step-done:not(:last-child)::after { background:#1aaed6; opacity:.55; }
.step-dots a { flex:0 0 26px; width:26px; height:26px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; text-decoration:none; color:var(--muted); border:1px solid var(--line); background:transparent; }
.step-dots li.step-done a { color:#1aaed6; border-color:#1aaed6; }
.step-dots li.is-current a { background:var(--button-bg); border-color:var(--button-bg); color:#fff; box-shadow:0 0 0 4px color-mix(in srgb, var(--button-bg) 22%, transparent); }
.step-dots a:hover { border-color:#1aaed6; color:#1aaed6; }
.step-dots li.is-current a:hover { color:#fff; }
.step-count { flex:0 0 auto; font-size:12px; color:var(--muted); white-space:nowrap; }
.step-move { flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 12px; border-radius:9px; border:1px solid var(--line); color:var(--text); text-decoration:none; font-size:12.5px; font-weight:600; white-space:nowrap; max-width:260px; }
.step-move .step-move-text { overflow:hidden; text-overflow:ellipsis; }
.step-move:hover { border-color:#1aaed6; color:#1aaed6; }
.step-move.is-off { opacity:.3; }
.step-next { background:var(--button-bg); border-color:var(--button-bg); color:#fff; }
.step-next:hover { color:#fff; filter:brightness(1.08); }
.nav a.nav-done .nav-no { border-color:#1aaed6; color:#1aaed6; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
@media (max-width:1100px) { .step-move:not(.step-next) .step-move-text, .step-count { display:none; } .step-move { padding:0 10px; } }
@media (max-width:700px) { .stepper { gap:8px; padding:6px 8px; } .step-dots li:not(.is-current) a { flex-basis:8px; width:8px; height:8px; font-size:0; border-width:0; background:var(--line); } .step-dots li.step-done:not(.is-current) a { background:#1aaed6; } .step-dots li:not(:last-child)::after { margin:0 2px; } .step-next .step-move-text { max-width:120px; } }
@media print { .stepper { display:none; } }

/* Quick search */
.nav a.nav-search { color:var(--muted); border:1px solid var(--line); margin-bottom:8px; }
.nav a.nav-search kbd { margin-left:auto; }
kbd { font:600 10.5px/1 var(--font-sans, inherit); padding:3px 6px; border-radius:5px; border:1px solid var(--line); color:var(--muted); background:transparent; white-space:nowrap; }
.qs { position:fixed; inset:0; z-index:400; display:flex; justify-content:center; align-items:flex-start; padding:12vh 16px 16px; background:rgba(3,10,18,.55); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.qs[hidden] { display:none; }
.qs-panel { width:min(640px,100%); max-height:70vh; display:flex; flex-direction:column; border-radius:16px; border:1px solid var(--line); background:var(--panel); box-shadow:0 30px 80px rgba(0,0,0,.45); overflow:hidden; }
.qs-head { display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line); color:var(--muted); }
.qs-input { flex:1 1 auto; min-width:0; border:0 !important; outline:0 !important; box-shadow:none !important; background:transparent !important; color:var(--text); font-size:16px; padding:0 !important; height:auto !important; }
.qs-list { overflow:auto; padding:6px; }
.qs-row { display:grid; grid-template-columns:92px minmax(0,1fr) minmax(0,auto); align-items:center; gap:10px; padding:9px 10px; border-radius:10px; text-decoration:none; color:var(--text); font-size:14px; }
.qs-row.is-active { background:color-mix(in srgb, var(--button-bg) 18%, transparent); }
.qs-kind { font-size:10.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:#1aaed6; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.qs-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.qs-hint { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:220px; }
.qs-empty { margin:0; padding:22px 12px; text-align:center; color:var(--muted); }
.qs-foot { display:flex; gap:16px; align-items:center; padding:9px 14px; border-top:1px solid var(--line); color:var(--muted); font-size:11.5px; }
.qs-foot kbd { margin-right:3px; }
.qs-combo { margin-left:auto; }
html.qs-open { overflow:hidden; }
html[data-sidebar="collapsed"] .nav a.nav-search { border-color:transparent; }
@media (max-width:700px) { .qs { padding-top:8px; } .qs-foot, .qs-head kbd { display:none; } .qs-row { grid-template-columns:70px minmax(0,1fr); } .qs-hint { display:none; } .nav a.nav-search kbd { display:none; } }
@media (prefers-reduced-motion: no-preference) { .qs:not([hidden]) .qs-panel { animation:rise .18s ease both; } }

/* Empty states */
.empty-state { display:flex; align-items:center; gap:20px; padding:22px; border:1px dashed var(--line); border-radius:14px; text-align:left; }
.empty-art { flex:0 0 auto; color:var(--muted); }
.empty-halo { fill:color-mix(in srgb, #1aaed6 10%, transparent); }
.empty-accent { stroke:#1aaed6; }
.empty-copy strong { display:block; font-size:15px; margin-bottom:4px; }
.empty-copy p { margin:0 0 12px; color:var(--muted); max-width:52ch; }
.empty-copy p:last-child { margin-bottom:0; }
td.empty-cell { padding:14px !important; white-space:normal !important; }
td.empty-cell .empty-state { border:0; padding:8px; justify-content:center; }
@media (max-width:700px) { .empty-state { flex-direction:column; text-align:center; gap:10px; } .empty-copy p { margin-inline:auto; } }
@media (prefers-reduced-motion: no-preference) { .empty-art { animation:rise .4s ease both; } .focus-pulse { animation:focus-pulse 1.1s ease 1; } @keyframes focus-pulse { 0%{box-shadow:0 0 0 0 rgba(26,174,214,.55)} 100%{box-shadow:0 0 0 14px rgba(26,174,214,0)} } }

/* Guided tour */
.tour-hole { position:fixed; z-index:500; border-radius:12px; box-shadow:0 0 0 9999px rgba(3,10,18,.68), 0 0 0 2px #1aaed6; pointer-events:none; transition:left .28s ease, top .28s ease, width .28s ease, height .28s ease; }
.tour-card { position:fixed; z-index:501; width:min(320px, calc(100vw - 24px)); padding:16px; border-radius:14px; border:1px solid var(--line); background:var(--panel); color:var(--text); box-shadow:0 24px 60px rgba(0,0,0,.45); transition:left .28s ease, top .28s ease; }
.tour-title { display:block; font-size:15px; margin-bottom:6px; }
.tour-text { margin:0 0 14px; color:var(--muted); font-size:13.5px; line-height:1.5; }
.tour-row { display:flex; align-items:center; gap:8px; }
.tour-count { font-size:12px; color:var(--muted); margin-right:auto; }
.tour-skip { border:0; background:transparent; color:var(--muted); font-size:12.5px; cursor:pointer; padding:6px; }
.tour-skip:hover { color:var(--text); }
.tour-again { color:inherit; text-decoration:none; }
.tour-again:hover { color:#1aaed6; }
@media (prefers-reduced-motion: reduce) { .tour-hole, .tour-card { transition:none; } }
@media print { .tour-hole, .tour-card { display:none; } }
.tour-card [hidden] { display:none !important; }
.tour-card [data-tour-back] { background:transparent; border:1px solid var(--line); color:var(--text); }

/* Phone and tablet, pass 2 */
@media (pointer:coarse) {
  /* iOS zooms the page when a focused field has text under 16px */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size:16px !important; }
  .shop-nav a { min-height:40px; align-items:center; }
  .shop-side label.shop-check { min-height:36px; align-items:center; }
  .shop-side .shop-check input[type=checkbox] { width:20px; height:20px; }
  .table-link, .small-button { min-height:36px; display:inline-flex; align-items:center; }
}
/* Tablet: two and four columns instead of the phone's single column */
@media (min-width:701px) and (max-width:1200px) {
  .summary-grid { grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; }
  .module-form { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .grid-form { grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (min-width:701px) and (max-width:900px) {
  .shop-layout { grid-template-columns:220px minmax(0,1fr); gap:16px; }
  .shop-side { position:sticky; top:12px; max-height:calc(100vh - 24px); }
  .shop-grid { grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); }
}
@media (max-width:700px) {
  .content { padding-bottom:84px; }
  .breadcrumb { flex-wrap:nowrap; overflow-x:auto; white-space:nowrap; scrollbar-width:none; margin-bottom:10px; font-size:13px; }
  .breadcrumb::-webkit-scrollbar { display:none; }
  .page-head h1 { font-size:22px; line-height:1.2; }
  .summary-grid { grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
  .summary-card { padding:12px 14px; }
  .summary-card strong { font-size:18px; }
  .shop-grid { grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
  .shop-card { padding:8px; font-size:12.5px; }
  .panel { padding:16px; }
  /* step indicator: arrows and "Korak 4 / 11" instead of eleven dots */
  .stepper .step-dots { display:none; }
  .stepper .step-count { display:inline; flex:1 1 auto; text-align:center; font-weight:600; color:var(--text); }
  .stepper .step-move { height:38px; }
  /* categories fold away so the products are on the first screen */
  .shop-nav.is-folded ul { display:none; }
  .shop-nav h3 { display:flex; justify-content:space-between; align-items:center; margin:0; min-height:36px; cursor:pointer; }
  .shop-nav h3::after { content:"▾"; }
  .shop-nav.is-folded h3::after { content:"▸"; }
  .shop-nav h3 .shop-nav-current { color:var(--text); text-transform:none; letter-spacing:0; font-weight:600; margin-left:auto; margin-right:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .shop-side { gap:6px; padding:12px 14px; }
  .feedback-fab { width:44px; height:44px; right:12px; bottom:12px; opacity:.92; }
}
/* wide tables: a soft edge shows there is more to the side */
@media (max-width:1100px) {
  .table-wrap, .table-scroll { background:linear-gradient(to right, var(--panel) 30%, transparent) left center / 40px 100% no-repeat local, linear-gradient(to left, var(--panel) 30%, transparent) right center / 40px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.35), transparent) left center / 14px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.35), transparent) right center / 14px 100% no-repeat scroll; }
}

/* Restored unfinished entry */
.draft-note { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:0 0 14px; padding:10px 14px; border-radius:12px; border:1px solid color-mix(in srgb, #1aaed6 45%, transparent); background:color-mix(in srgb, #1aaed6 10%, transparent); font-size:13.5px; }
.draft-note span { flex:1 1 220px; }
.draft-note .small-button { flex:0 0 auto; }
@media (prefers-reduced-motion: no-preference) { .draft-note { animation:rise .3s ease both; } }
@media print { .draft-note { display:none; } }
.draft-note .small-button:not(.primary) { background:transparent; border:1px solid var(--line); color:var(--text); }
