/* Shared visual layer. No layout or application state is owned here. */
:root {
  --glass-surface:rgba(27,29,31,.56);
  --glass-card:rgba(28,30,34,.55);
  --glass-border:rgba(255,255,255,.11);
  --glass-gold:rgba(216,166,87,.38);
  --glass-active:linear-gradient(145deg,rgba(216,166,87,.17),rgba(216,166,87,.045));
  --glass-shadow:inset 0 1px 0 rgba(255,255,255,.045),0 12px 32px -22px rgba(0,0,0,.55);
}
body.site-glass {--panel:rgba(28,30,34,.55);--panel-2:rgba(34,36,40,.58);--line:rgba(255,255,255,.085);--line-2:rgba(255,255,255,.15);--accent:#d8a657;--accent-soft:rgba(216,166,87,.10)}
/* Restrict header treatment to page headers; never affect image-viewer navigation. */
.site-glass > :is(.bar,nav,header),.site-glass > nav.scrolled {
  background:var(--glass-surface);border-bottom:1px solid var(--glass-border);
  backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.025);
}
.site-glass :is(.card,.card2,.proj,.film,.contact-card,.usage-panel,.totals) {
  background:linear-gradient(145deg,rgba(255,255,255,.025),transparent 65%),var(--glass-card);
  border-color:var(--glass-border);border-radius:14px;box-shadow:var(--glass-shadow);
}
/* Cards stay translucent without creating containing blocks for nested dialogs. */
.site-glass :is(.proj,.film,.glist a):hover {border-color:var(--glass-gold)}
.site-glass :is(.btn,.copy-all,.tabs button,.seg button,.lang-btn,.fpills button,.ypills button) {
  background:rgba(255,255,255,.025);border:1px solid var(--glass-border);color:var(--text,#eceef2);
  border-radius:9px;box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  transition:background .18s,border-color .18s,color .18s,box-shadow .18s;
}
.site-glass :is(.btn:not(.ghost):not(.btn-ghost):not(.danger):not(.ok),.copy-all),
.site-glass :is(.tabs button,.seg button,.fpills button,.ypills button).active {
  background:var(--glass-active);border-color:var(--glass-gold);color:#efc77f;
  box-shadow:inset 0 1px 0 rgba(255,224,165,.09),0 0 16px rgba(216,166,87,.045);
}
.site-glass :is(.btn,.copy-all,.tabs button,.seg button,.lang-btn,.fpills button,.ypills button):not(:disabled):hover {
  background:rgba(216,166,87,.11);border-color:rgba(216,166,87,.55);color:#f2d69f;filter:none;
}
.site-glass .btn.danger {color:var(--bad,#f0616d);border-color:rgba(240,97,109,.32);background:rgba(240,97,109,.04)}
.site-glass .btn.danger:not(:disabled):hover {background:rgba(240,97,109,.13);border-color:var(--bad,#f0616d);color:var(--bad,#f0616d)}
.site-glass .btn.ok {color:var(--ok,#49d0bd);border-color:rgba(73,208,189,.35);background:rgba(73,208,189,.08)}
.site-glass :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),textarea,select) {
  background-color:rgba(8,10,13,.28);border-color:var(--glass-border);
}
.site-glass select option {background:#1b1d21;color:#eceef2}
.site-glass :is(input,textarea,select):focus {border-color:var(--glass-gold);box-shadow:0 0 0 3px rgba(216,166,87,.08)}
.site-glass :is(button,a,input,select,textarea):focus-visible {outline:2px solid #d8a657;outline-offset:3px}
.site-glass button:disabled {opacity:.45;cursor:not-allowed}
.site-glass .tabs button {letter-spacing:.03em;text-transform:none;font-weight:500}
.site-glass .workspace-nav .tabs {gap:6px}
.site-glass [data-ui-icon]::before {
  content:'';display:inline-block;width:16px;height:16px;flex:0 0 16px;vertical-align:-3px;
  background:currentColor;mask:var(--ui-icon) center/contain no-repeat;-webkit-mask:var(--ui-icon) center/contain no-repeat;
}
.site-glass [data-ui-icon] {column-gap:8px}
/* Keep document output flat and readable; glass is a screen treatment. */
@media print {
  .site-glass :is(.card,.card2,.totals) {background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
}
@media(prefers-reduced-motion:reduce) {.site-glass :is(.btn,.tabs button,.seg button) {transition:none}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .site-glass > :is(.bar,nav,header) {background:#1b1d20}
}
.site-glass [data-ui-icon="plus"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="link"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m10%2013%204-4m-6%207-1%201a4%204%200%200%201-6-6l5-5a4%204%200%200%201%206%200m0%202%201-1a4%204%200%200%201%206%206l-5%205a4%204%200%200%201-6%200%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="folder"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207V5a1%201%200%200%201%201-1h5l2%203h9a1%201%200%200%201%201%201v11a1%201%200%200%201-1%201H4a1%201%200%200%201-1-1V7Z%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="download"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v12m-4-4%204%204%204-4M4%2016v5h16v-5%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="upload"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2016V4m-4%204%204-4%204%204M4%2016v5h16v-5%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="back"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m10%205-7%207%207%207M3%2012h18%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="logout"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%204H4v16h5m6-12%204%204-4%204m-7-4h11%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="calendar"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%205h16v16H4ZM8%203v4m8-4v4M4%2010h16%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="chart"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%203v18h17M8%2016v-5m5%205V6m5%2010v-8%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="wallet"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%207h18v14H3ZM3%207V4h15v3m3%205h-6v5h6%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="grid"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203h7v7H3Zm11%200h7v7h-7ZM3%2014h7v7H3Zm11%200h7v7h-7Z%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="check"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2012l5%205L20%206%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="delete"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h18M9%206V3h6v3M5%206l1%2015h12l1-15M10%2010v7m4-7v7%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="edit"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m14%205%205%205M4%2020l5-1L21%207l-4-4L5%2015Z%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="file"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%203H5v18h14V8Zm0%200v5h5M8%2012h8m-8%204h8%22/%3E%3C/svg%3E")}
.site-glass [data-ui-icon="spark"] {--ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m12%203%202.5%206.5L21%2012l-6.5%202.5L12%2021l-2.5-6.5L3%2012l6.5-2.5Z%22/%3E%3C/svg%3E")}

.site-glass.site-select button.primary {background:var(--glass-active);color:#efc77f;border-color:var(--glass-gold)}
.site-glass.site-select :is(.toolbar,.viewer-top,.viewer-tools,.viewer-bottom) {background:var(--glass-surface);border-color:var(--glass-border)}
.site-glass.site-select [data-ui-icon] {display:inline-flex;align-items:center;gap:8px}
@media(max-width:760px) {
  .site-glass .workspace-nav .tabs button {padding-left:10px;padding-right:10px;min-width:0;flex-wrap:wrap;row-gap:5px}
}
/* Six workspace sections remain readable on phones rather than shrinking labels. */
@media(max-width:760px) {
  .site-glass .workspace-nav {grid-template-columns:minmax(0,1fr);gap:10px}
  .site-glass .workspace-nav .tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}
  .site-glass .workspace-nav .tabs button {width:100%;max-width:none;min-height:46px;justify-content:center;font-size:11px}
  .site-glass .workspace-year {justify-self:end}
}
.site-glass > nav .nav-links a {color:#c0c1c3}
.site-glass > nav .nav-links a:hover {color:#efc77f}
