
/* ----- GLOBAL ----- */
/* Inter loads via <link> in index.html head (parallel, non-blocking) */

:root {
  --bg-color: #0a0a0c;
  --search-bar-bg: #1c1c1e;
  --text-white: #ffffff;
  --text-muted: #8e8e93;
  --search-border: #3a3a3c;
  --search-hover: #2c2c2e;
  --search-accent: #5e5ce6;
  --rg-purple: #bf5af2;
  --panel: #151517;
  --radio-accent: #00ff88;
  --radio-border: #2c2c2e;
  --led-off: #1a1a1e;
  --led-on: #30d158;
  --rad-accent: #ff453a;
  --shift-12h: #ff9f0a;
  --shift-15h: #ff453a;
  --shift-24h: #bf5af2;
  --shift-9h: #64d2ff;
  --moon-active: #0a84ff;
  --sun-active: #ff9f0a;
  --glass-bg: rgba(28, 28, 30, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  --glass-blur: 24px;
  --bg-case: #1c1c1e;
  --bg-lcd: #0a0a0c;
  --active-color: #f5f5f7;
  --ghost-color: rgba(245, 245, 247, 0.05);
  --accent: #b77bff;
  --border: rgba(255,255,255,0.10);
  --card-bg: rgba(255,255,255,0.035);
  --text-sub: rgba(255,255,255,0.60);

  /* sizing */
  --menubar-h: 0px;          /* top bar hidden */
  --dock-h: 70px;
  --radio-h: 170px;
  --ui-gap: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg-color);
  height: 100vh;
  overflow: hidden;
  font-family: 'Inter', -apple-system, sans-serif;
  position: relative;
  color: var(--text-white);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.02;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='140'%20height='140'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='.9'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='140'%20height='140'%20filter='url(%23n)'%20opacity='1'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

/* ----- SUN/MOON – pure icons, no cards ----- */
#weather-widget {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 5000;
  opacity: 0.92;
  pointer-events: none;
}
.astro-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.astro-icon {
  font-size: 44px;
  line-height: 1;
  color: #f5f5f7;
  text-shadow: 0 0 18px rgba(255,255,255,0.3);
}
.moon-icon {
  color: #f5f5f7;
  text-shadow: -4px 2px 0 rgba(255,255,255,0.1), 0 0 18px rgba(10,132,255,0.4);
}
.astro-info {
  text-align: center;
  font-family: 'Inter', sans-serif;
  color: var(--text-white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.astro-value {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.astro-sub {
  font-size: 11px;
  opacity: 0.8;
}

/* ----- FULL LIST MODAL (glassy) ----- */
#full-list-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  max-height: 80%;
  background: var(--glass-bg);
  backdrop-filter: blur(calc(var(--glass-blur) * 1.5));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 1.5));
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--glass-shadow);
  z-index: 20000;
  display: none;
  flex-direction: column;
  color: white;
}
#full-list-modal.open { display: flex; }
.full-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 16px;
}
.full-list-header h2 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}
.full-list-close {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--glass-border);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}
.full-list-close:hover {
  background: var(--accent);
  color: black;
}
.full-list-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
}
.full-list-group {
  margin-bottom: 24px;
}
.full-list-group h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 12px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}
.full-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin-bottom: 8px;
  transition: 0.15s;
}
.full-list-item:hover {
  background: rgba(191, 90, 242, 0.1);
  border-color: var(--accent);
}
.full-list-item .item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.full-list-item .item-name {
  font-weight: 600;
  color: white;
}
.full-list-item .item-cat {
  font-size: 11px;
  color: var(--text-sub);
}
.full-list-item .item-phone {
  font-weight: 600;
  color: var(--search-accent);
  background: rgba(94,92,230,0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ----- GRAFIKS – draggable, resizable, glassy, with search inside ----- */
#grafiks-app {
  position: absolute;
  top: 12px;                    /* was --menubar-h + 12, now menubar-h = 0 */
  left: 50%;
  transform: translateX(-50%);
  width: min(1800px, 98vw);
  height: calc(100vh - 12px - var(--radio-h) - var(--dock-h) - 32px);
  min-height: 400px;
  max-height: calc(100vh - 12px - var(--radio-h) - var(--dock-h) - 32px);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: 32px;
  display: flex;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  z-index: 1000;
  resize: both;
  min-width: 800px;
  max-width: 98vw;
}

/* custom resize handles */
.grafiks-resize-handle-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
  cursor: ns-resize;
  z-index: 100;
}
.grafiks-resize-handle-bottom::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  transition: 0.2s;
}
.grafiks-resize-handle-bottom:hover::after {
  background: var(--accent);
  width: 60px;
}
.grafiks-resize-handle-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 100%;
  background: transparent;
  cursor: ew-resize;
  z-index: 100;
}
.grafiks-resize-handle-right::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  width: 4px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  transition: 0.2s;
}
.grafiks-resize-handle-right:hover::after {
  background: var(--accent);
  height: 60px;
}

/* drag handle for grafiks-app */
.grafiks-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  padding-left: 15px;
  cursor: move;
  z-index: 1001;
}
.grafiks-handle .dots { display: none; } /* hide traffic lights */

.side-panel {
  width: 260px;
  padding: 40px 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(calc(var(--glass-blur) * 0.8));
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) * 0.8));
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden; /* prevent long text from spilling outside the panel */
  border-right: 1px solid var(--border);
}
.left-panel { border-right: 1px solid var(--border); }
.right-panel { border-left: 1px solid var(--border); }

.main-panel {
  flex-grow: 1;
  padding: 40px 18px 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Search card inside main panel */
.search-card {
  background: rgba(44, 44, 46, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 28px;
  border: 1px solid var(--glass-border);
  margin-bottom: 20px;
  position: relative;
  z-index: 100;
}
.search-header {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 48px;
  gap: 10px;
}
.minka-avatar { font-size: 22px; filter: grayscale(100%); opacity: 0.7; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  height: 100%;
  color: var(--text-white);
  caret-color: var(--text-white);
}
.search-input::placeholder { color: #8e8e93 !important; opacity: 1; }
.full-list-btn {
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 22px;
  transition: 0.2s;
}
.full-list-btn:hover { color: white; }
.results-area {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  background: #1c1c1e;
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 28px 28px;
  box-shadow: var(--glass-shadow);
  max-height: 0;
  opacity: 0;
  overflow-y: auto;
  transition: max-height 0.3s ease-in-out, opacity 0.2s;
  z-index: 200;
}
.search-card:hover .results-area,
.search-card:focus-within .results-area {
  max-height: 40vh;
  opacity: 1;
  padding-bottom: 10px;
}
.section-label {
  padding: 12px 20px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #1c1c1e;
  position: sticky;
  top: 0;
  z-index: 5;
}
.list-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  cursor: default;
  transition: 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.list-item:hover { background: #2c2c2e; }
.item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 2px;
}
.item-name b { color: var(--rg-purple); font-weight: 700; }
.item-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.item-phone {
  font-size: 13px;
  font-weight: 600;
  color: var(--search-accent);
  padding: 4px 8px;
  background: rgba(94, 92, 230, 0.1);
  border-radius: 16px;
  white-space: nowrap;
}

.status-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
}
.status-tag.radiographers { color: var(--accent); }
.status-tag.radiologists { color: var(--rad-accent); }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}
.dot.radiographers-dot { background: var(--accent); }
.dot.radiologists-dot { background: var(--rad-accent); }

.duty-vertical {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.duty-block {
  line-height: 1.2;
  text-transform: uppercase;
  width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}
.name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px 10px;
}
.duty-name {
  font-weight: 800;
  display: inline-block;
  max-width: 100%;
  line-height: 1.05;
  font-size: 22px;
  -webkit-text-fill-color: #fff;
  color: #fff;
}
.duty-surname {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.56);
  text-transform: none;
  letter-spacing: 0.3px;
  display: block;
  margin-top: -2px;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.duty-timer {
  display: inline-flex;
  align-items: center;
  font-family: 'Digital-7 Mono', monospace;
  background: var(--bg-lcd);
  color: var(--active-color);
  padding: 2px 10px;
  border-radius: 30px;
  box-shadow: inset 2px 2px 4px #000, inset -1px -1px 2px rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  position: relative;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 1px;
}
.duty-timer .ghost {
  position: absolute;
  top: 2px;
  left: 10px;
  right: 10px;
  color: var(--ghost-color);
  text-shadow: none;
  pointer-events: none;
  font-family: 'Digital-7 Mono', monospace;
  white-space: nowrap;
}
.duty-timer .val { position: relative; z-index: 2; }

.duty-12h, .duty-15h, .duty-24h, .duty-9h {
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
  margin: 0;
  padding: 2px 8px;
  border-radius: 30px;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  line-height: 1;
}
.duty-12h { color: var(--shift-12h); border: 1px solid rgba(255, 159, 10, 0.3); }
.duty-15h { color: var(--shift-15h); border: 1px solid rgba(255, 69, 58, 0.3); }
.duty-24h { color: var(--shift-24h); border: 1px solid rgba(191, 90, 242, 0.3); }
.duty-9h { color: var(--shift-9h); border: 1px solid rgba(100, 210, 255, 0.3); }

.shift-icon-side {
  font-size: 16px;
  display: inline-block;
  margin-right: 2px;
  vertical-align: middle;
}
.shift-icon-side.sun-icon { color: var(--sun-active); }
.shift-icon-side.moon-icon { color: var(--moon-active); }
.shift-icon-side.diennakts-icon {
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 30px;
  color: var(--accent);
  line-height: 1;
  display: inline-block;
}

.today-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.next-box {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: opacity 0.25s, max-height 0.25s, margin 0.25s;
  max-height: 150px;
  opacity: 1;
  overflow: hidden;
}
.next-box.hidden {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.next-names {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-top: 6px;
  text-transform: uppercase;
  display: block;
  line-height: 1.3;
  word-break: break-word;
  white-space: normal;
  max-width: 100%;
}

.shift-timer {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(191, 90, 242, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(191, 90, 242, 0.3);
  border-radius: 60px;
  padding: 6px 16px;
  margin-left: 20px;
}
.timer-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-sub);
  letter-spacing: 1px;
}
.lcd-main {
  font-family: 'Digital-7 Mono', monospace;
  background: var(--bg-lcd);
  color: var(--active-color);
  padding: 6px 16px;
  border-radius: 60px;
  box-shadow: inset 4px 4px 8px #000, inset -2px -2px 4px rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  position: relative;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 4px;
  min-width: 150px;
  text-align: center;
}
.lcd-main .ghost {
  position: absolute;
  top: 6px;
  left: 16px;
  right: 16px;
  color: var(--ghost-color);
  text-shadow: none;
  pointer-events: none;
  font-family: 'Digital-7 Mono', monospace;
  white-space: nowrap;
}
.lcd-main .val { position: relative; z-index: 2; }

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}
.date-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
#grafiks-dateTitle {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  margin: 0;
}
.today-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  padding: 4px 12px;
  border-radius: 30px;
  background: rgba(191, 90, 242, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(191, 90, 242, 0.4);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
#grafiks-dateTitle.is-today {
  padding-bottom: 6px;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.month-select {
  background: rgba(28, 28, 30, 0.8);
  backdrop-filter: blur(10px);
  color: white;
  border: 1px solid var(--accent);
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  text-transform: uppercase;
}
.scroll-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
  position: relative;
}
.arrow {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
  transition: 0.2s;
}
.arrow:hover { background: var(--accent); }
.scroller {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  flex-grow: 1;
  padding: 5px 2px;
  margin: 0 5px;
  gap: 6px;
}
.scroller::-webkit-scrollbar { display: none; }
.pill {
  min-width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-sub);
  flex-shrink: 0;
  transition: 0.2s;
  line-height: 1.2;
}
.pill .weekday {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  color: rgba(255,255,255,0.40);
  margin-bottom: 2px;
}
.pill.active {
  background: rgba(183,123,255,0.22);
  border-color: rgba(183,123,255,0.40);
  box-shadow: 0 0 0 1px rgba(183,123,255,0.20), 0 14px 30px rgba(183,123,255,0.22);
  transform: translateY(-1px) scale(1.04);
}
.pill.active .weekday { color: white; }

.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  overflow-y: auto;
  padding: 10px 2px 30px;
}
.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 16px;
  height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
  position: relative;
  cursor: pointer;
}
.card:hover {
  border-color: rgba(183,123,255,0.38);
  box-shadow: 0 26px 60px rgba(0,0,0,0.55);
  transform: translateY(-4px);
}
.card:active {
  background: rgba(183,123,255,0.10);
  box-shadow: 0 0 26px rgba(183,123,255,0.22);
  transform: scale(0.98);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-init {
  background: rgba(0,0,0,0.34) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  padding: 5px 10px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff !important;
}
.shift-icons { display: flex; gap: 6px; }
.shift-icon {
  font-size: 20px;
  opacity: 0.8;
  transition: 0.15s;
  color: #fff;
}
.shift-icon.static { cursor: default; pointer-events: none; opacity: 1; }
.shift-icon.sun-icon { color: var(--sun-active); }
.shift-icon.moon-icon { color: var(--moon-active); }
.shift-icon.diennakts-icon {
  font-size: 14px;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  padding: 2px 8px;
  border-radius: 30px;
  color: var(--accent);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-center {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-shift {
  font-weight: 800;
  font-size: 52px;
  color: var(--accent);
  letter-spacing: -2px;
  line-height: 1;
  text-shadow: 0 0 30px rgba(183,123,255,0.18);
  transition: transform 0.15s;
  transform-origin: center;
}
.card:hover .card-shift { transform: scale(1.05); }
.card-name-wrap {
  text-align: center;
  width: 100%;
}
.name-main {
  font-weight: 700;
  font-size: 15px;
  display: block;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.name-sub {
  font-weight: 500;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 2px;
  overflow-y: auto;
}
.list-row {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 14px 24px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: 0.15s;
}
.list-row:hover {
  background: rgba(191, 90, 242, 0.1);
  border-color: var(--accent);
}
.list-row:active {
  background: rgba(191, 90, 242, 0.2);
  box-shadow: 0 0 20px rgba(191, 90, 242, 0.5);
  transform: scale(0.99);
}
.list-row b {
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 90px);
  display: block;
}
.view-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  margin-right: 15px;
  opacity: 0.6;
  transition: 0.2s;
}
.view-btn:hover {
  color: var(--accent);
  opacity: 1;
}
#grafiks-loader {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  border-radius: 32px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 2px;
}

/* ----- WORKER MODAL – glassy ----- */
#worker-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  max-height: 80%;
  background: rgba(16,16,20,0.88);
  backdrop-filter: blur(calc(var(--glass-blur) * 1.5));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 32px;
  padding: 24px;
  box-shadow: var(--glass-shadow);
  z-index: 10000;
  display: none;
  flex-direction: column;
  color: white;
  font-family: 'Inter', sans-serif;
}
#worker-modal.open { display: flex; }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 12px;
}
.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}
.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}
.modal-close:hover { background: var(--accent); color: black; }
.modal-close:active {
  background: rgba(191, 90, 242, 0.5);
  box-shadow: 0 0 15px var(--accent);
}
.modal-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.worker-info {
  font-size: 13px;
  color: var(--text-sub);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: baseline;
}
.worker-info span { color: white; font-weight: 600; }
#modal-total-hours {
  font-size: 13px;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 600;
  background: rgba(191, 90, 242, 0.1);
  padding: 4px 12px;
  border-radius: 30px;
  display: inline-block;
}

.view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  justify-content: flex-end;
}
.toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 15px rgba(191, 90, 242, 0.6);
}
.toggle-btn:active {
  background: rgba(191, 90, 242, 0.5);
  box-shadow: 0 0 15px var(--accent);
}

.dates-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}
.date-item {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  transition: 0.15s;
  cursor: pointer;
}
.date-item:hover {
  background: rgba(191, 90, 242, 0.15);
  border-color: var(--accent);
}
.date-item:active {
  background: rgba(191, 90, 242, 0.3);
  box-shadow: 0 0 20px rgba(191, 90, 242, 0.6);
  transform: scale(0.99);
}
.date-item .date { font-weight: 600; color: white; }
.date-item .shift { font-weight: 700; color: var(--accent); }

.calendar-view-wrapper { display: none; }
.calendar-view-wrapper.show { display: block; }
.list-view-wrapper { display: block; }
.list-view-wrapper.hide { display: none; }

.calendar-container {
  width: 100%;
  background: rgba(28, 28, 30, 0.4);
  backdrop-filter: blur(20px);
  border-radius: 28px;
  box-shadow: var(--glass-shadow);
  padding: 20px;
  color: #eee;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 15px 0;
}
.current-date {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.calendar-nav { display: flex; gap: 10px; }
.cal-nav-btn {
  height: 36px;
  width: 36px;
  cursor: pointer;
  color: #ddd;
  text-align: center;
  line-height: 36px;
  font-size: 1.6rem;
  user-select: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Material Symbols Rounded';
  font-weight: 400;
}
.cal-nav-btn:hover {
  background: rgba(191, 90, 242, 0.3);
  color: white;
}
.calendar { width: 100%; }
.calendar ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.calendar .weeks { margin-bottom: 10px; }
.calendar li {
  width: calc(100% / 7);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}
.calendar .weeks li {
  font-weight: 600;
  cursor: default;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}
.calendar .days { margin-bottom: 0; }
.calendar .days li {
  position: relative;
  cursor: pointer;
  margin-top: 8px;
  margin-bottom: 8px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  min-height: 58px;
  border-radius: 20px;
  transition: background 0.2s;
}
.days li.inactive { color: rgba(255, 255, 255, 0.2); }
.days li.worked {
  color: #fff;
  background: rgba(191, 90, 242, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
.days li.worked::before { content: none; }
.days li:not(.worked):hover { background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(10px); }
.days li .shift-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 2px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: 30px;
  color: var(--accent);
  letter-spacing: 0.5px;
  line-height: 1.2;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.1);
}
.days li.worked .shift-label {
  background: rgba(0,0,0,0.6);
  color: #fff;
}

#modal-calendar-view .calendar-container { margin-top: 10px; }
#modal-calendar-view .current-date { color: #fff; }
#modal-calendar-view .cal-nav-btn { color: #ddd; }
#modal-calendar-view .cal-nav-btn:hover { background: rgba(191, 90, 242, 0.3); color: white; }
#modal-calendar-view .weeks li { color: rgba(255, 255, 255, 0.5); }
#modal-calendar-view .days li { color: rgba(255, 255, 255, 0.9); }
#modal-calendar-view .days li.inactive { color: rgba(255, 255, 255, 0.2); }
#modal-calendar-view .days li.worked { background: rgba(191, 90, 242, 0.3); color: white; }
#modal-calendar-view .days li .shift-label { background: rgba(0,0,0,0.5); color: var(--accent); }
#modal-calendar-view .days li.worked .shift-label { background: rgba(0,0,0,0.6); color: #fff; }
#modal-calendar-view .days li:not(.worked):hover { background: rgba(255, 255, 255, 0.08); }

/* ----- STATION OVERLAY (from stable) ----- */
#stationOverlay {
    position: fixed; bottom: 125px; right: 30px; width: 620px; height: 350px;
    background: #080808; border: 1px solid var(--radio-border); z-index: 2000;
    padding: 15px; display: none; grid-template-columns: repeat(5, 1fr); 
    grid-auto-rows: 100px; gap: 10px; overflow-y: auto; overflow-x: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,1); border-radius: 4px;
    font-family: 'Inter', sans-serif;
}
.station-tile {
    background: var(--panel); border: 1px solid #1a1a1a; width: 100%; height: 100px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; padding: 5px; text-align: center; transition: 0.1s;
    font: inherit; color: inherit; outline: none; -webkit-appearance: none; appearance: none; border-radius: 0;
}
.station-tile:hover { border-color: var(--radio-accent); background: #151515; }
.icon-box { height: 40px; width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.station-icon { font-size: 1.6rem; color: var(--radio-accent); display: inline-block; width: 1.6rem; text-align: center; }
.station-tile h3 { font-size: 0.52rem; text-transform: uppercase; color: #fff; font-weight: 800; width: 100%; line-height: 1.2; padding: 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Latvijas radio stations — teal/green accent */
.station-lv { border-color: rgba(0,210,180,0.25) !important; }
.station-lv .station-icon { color: #00d4b4 !important; }
.station-lv:hover { border-color: #00d4b4 !important; background: rgba(0,200,170,0.07) !important; }
.station-lv h3 { color: #a0fff4 !important; }
/* Separator between groups */
.station-separator {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 4px;
  pointer-events: none;
}
.station-separator span {
  font-size: 0.48rem; font-weight: 900; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(0,210,180,0.65);
  white-space: nowrap;
}
.station-separator::before, .station-separator::after {
  content: ''; flex: 1;
  height: 1px; background: rgba(0,210,180,0.20);
}

/* ----- RADIO (from stable) – fixed bottom bar ----- */
.bottom-console { 
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 110px; 
    background: #050505; 
    border-top: 1px solid var(--radio-border); 
    display: grid; 
    grid-template-columns: 280px 1fr 420px; 
    align-items: center; 
    padding: 0 30px; 
    z-index: 5000;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}
.tech-panel { background: #000; border: 1px solid #111; padding: 12px; border-radius: 2px; display: flex; flex-direction: column; justify-content: center; }

.header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
#timeDisp { font-family: monospace; color: var(--radio-accent); font-size: 0.8rem; opacity: 0.7; }

.branding { display: flex; align-items: center; gap: 10px; }
.led-core { 
    width: 7px; height: 7px; 
    background: var(--led-off); 
    border-radius: 50%; 
    position: relative;
    border: 1px solid #000;
}
.led-glow {
    position: absolute; inset: -5px;
    background: none;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}
.brand-text { font-family: monospace; font-size: 11px; color: var(--radio-accent); font-weight: 900; letter-spacing: 2px; opacity: 0.8; }

/* tiny Skin/Theme button (lives next to "RG RADIO") */
.skin-mini-btn{
  margin-left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(0,255,136,0.22);
  background: rgba(0,0,0,0.35);
  color: rgba(0,255,136,0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25) inset;
}
.skin-mini-btn:hover{ background: rgba(0,255,136,0.10); }
.skin-mini-btn:active{ transform: translateY(1px) scale(0.98); }
.skin-mini-btn i{ font-size: 12px; line-height: 1; }

#curStation { font-size: 1.1rem; font-weight: 900; text-transform: uppercase; margin: 2px 0; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity 0.3s; }

.meta-status { 
    font-family: monospace; font-size: 8px; color: #444; letter-spacing: 1px; margin-top: 4px; text-transform: uppercase; visibility: hidden; display: flex; flex-direction: column; gap: 1px;
}
.meta-status span { color: var(--radio-accent); opacity: 0.9; }
.meta-tag { color: #555; }

.eq-row { display: flex; gap: 4px; margin-top: 8px; }
.eq-btn { background: transparent; border: 1px solid #222; color: #444; font-size: 7px; padding: 2px 4px; cursor: pointer; border-radius: 2px; text-transform: uppercase; font-weight: 800; }
.eq-btn.active { border-color: var(--radio-accent); color: var(--radio-accent); background: rgba(0, 255, 136, 0.1); }

.eq-btn.more-btn{
    border-color: rgba(108, 59, 255, 0.55);
    color: rgba(220, 210, 255, 0.92);
    background: rgba(108, 59, 255, 0.10);
}
.eq-btn.more-btn:hover{
    background: rgba(108, 59, 255, 0.18);
}
.eq-btn.more-btn.active{
    border-color: #6c3bff;
    color: rgba(200, 180, 255, 0.98);
    background: rgba(108, 59, 255, 0.22);
}
.eq-wrap{ position: relative; }
.eq-row .preset-more{ display:none; }
#morePanel{
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 6px);
    display: none;
    padding: 6px;
    background: rgba(5,5,5,0.96);
    border: 1px solid rgba(108, 59, 255, 0.55);
    border-radius: 3px;
    box-shadow: 0 18px 55px rgba(0,0,0,0.85);
    z-index: 9999;
    gap: 4px;
    grid-template-columns: repeat(3, 1fr);
}
#morePanel.open{ display: grid; }
#morePanel .eq-btn{
    width: 100%;
    font-size: 6px;
    padding: 2px 3px;
    display: inline-flex;
    justify-content: center;
}

.monitor-frame { 
    height: 70px; margin: 0 20px; background: #010201; border: 2px solid #111; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.monitor-frame::after { 
    content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0px, transparent 1px, transparent 2px); pointer-events: none; z-index: 40; 
}

#vizLabel{
    position:absolute;
    top:8px;
    right:10px;
    z-index:60;
    font-family: monospace;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(0, 255, 136, 0.75);
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(0, 255, 136, 0.22);
    padding: 4px 8px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.55);
    pointer-events:none;
}
#vizCanvas { position: absolute; top:0; left:0; width: 100%; height: 100%; display: block; z-index: 10; mix-blend-mode: screen; }

#dolphin-bg {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 320px; height: 100%; object-fit: fill; z-index: 5; opacity: 0; transition: opacity 0.2s; filter: grayscale(1) brightness(0.6) sepia(1) saturate(5) hue-rotate(95deg);
}

#volumeOSD { position: absolute; width: 60%; height: 100%; left: 0; display: none; flex-direction: column; justify-content: center; align-items: flex-start; z-index: 50; padding-left: 15px; }
#osd-num { position: absolute; top: 10px; left: 15px; font-family: monospace; font-size: 18px; color: var(--radio-accent); font-weight: 900; }
#osd-segments { display: flex; gap: 2px; width: 100%; height: 10px; }
.seg { flex: 1; height: 100%; background: rgba(0, 255, 136, 0.05); border-radius: 1px; }
.seg.on { background: var(--radio-accent); box-shadow: none; }

.pixel-cat { position: absolute; right: 15px; bottom: 5px; height: 50px; z-index: 45; image-rendering: pixelated; filter: grayscale(1) brightness(0.5) sepia(1) saturate(100) hue-rotate(95deg); opacity: 0.9; cursor: pointer; transition: transform 0.1s; }
.pixel-cat:active { transform: scale(0.9); }

.control-panel { display: flex; align-items: center; justify-content: flex-end; gap: 25px; }
.station-btn { background: transparent; border: 1px solid #222; color: #fff; padding: 10px 14px; border-radius: 4px; font-size: 0.65rem; font-weight: 900; cursor: pointer; letter-spacing: 1px; }
.nav-cluster { display: flex; align-items: center; gap: 15px; }
.nav-btn { background: transparent; border: 1px solid #222; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.play-trigger { width: 56px; height: 56px; border-radius: 50%; background: var(--radio-accent); color: #000; border: none; font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.play-trigger i{ line-height: 1; display: block; }
/* visually center the play triangle */
.play-trigger i.fa-play{ transform: translateX(1px); }
.fader { width: 70px; accent-color: var(--radio-accent); cursor: pointer; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 4px; }

/* ============================================================
   MACSCAPE POLISH (visual only)
   ============================================================ */
:root{
  --ms-primary: var(--accent, #b77bff);
  --ms-secondary: #ff4f81;
  --ms-tertiary: #5ce1e6;
  --ms-glass: rgba(20,20,24,0.78);
  --ms-glass-border: rgba(255,255,255,0.10);
  --ms-glass-border-soft: rgba(255,255,255,0.08);
  --ms-shadow: 0 18px 60px rgba(0,0,0,0.55);
  --ms-shadow-soft: 0 10px 30px rgba(0,0,0,0.35);
  --ms-blur: 18px;
  --ms-blur-strong: 26px;
  --ms-noise: 0.10;
  --ms-grid: 0.16;
  --ms-orb: 0.55;
  --ms-motion: 1;
}

html, body{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#macscapeBg{
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: radial-gradient(circle at 20% 15%, rgba(163,71,255,0.16), transparent 55%),
              radial-gradient(circle at 80% 20%, rgba(255,79,129,0.12), transparent 60%),
              radial-gradient(circle at 50% 80%, rgba(92,225,230,0.12), transparent 65%),
              linear-gradient(180deg, #07070a 0%, #05060a 60%, #06070b 100%);
}
#macscapeBg .ms-grid{
  position:absolute; inset:0;
  opacity: var(--ms-grid);
  background-image:
    linear-gradient(rgba(163,71,255,0.20) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163,71,255,0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mix-blend-mode: screen;
  filter: blur(0.2px);
}
#macscapeBg .ms-orb{
  position:absolute;
  width: 520px; height: 520px;
  border-radius: 9999px;
  filter: blur(40px);
  opacity: calc(var(--ms-orb) * 0.9);
  will-change: transform;
  transform: translate3d(0,0,0);
}
#macscapeBg .orb1{
  left: 12%; top: 28%;
  background: radial-gradient(circle at 30% 30%, rgba(163,71,255,0.22), rgba(163,71,255,0.05) 35%, transparent 70%);
  animation: msFloat1 calc(22s / max(var(--ms-motion), 0.0001)) ease-in-out infinite;
}
#macscapeBg .orb2{
  right: 10%; top: 22%;
  width: 460px; height: 460px;
  background: radial-gradient(circle at 30% 30%, rgba(255,79,129,0.18), rgba(255,79,129,0.05) 35%, transparent 70%);
  animation: msFloat2 calc(26s / max(var(--ms-motion), 0.0001)) ease-in-out infinite;
}
#macscapeBg .orb3{
  left: 28%; bottom: 10%;
  width: 540px; height: 540px;
  background: radial-gradient(circle at 30% 30%, rgba(92,225,230,0.16), rgba(92,225,230,0.05) 40%, transparent 70%);
  animation: msFloat3 calc(28s / max(var(--ms-motion), 0.0001)) ease-in-out infinite;
}
#macscapeBg .ms-noise{
  position:absolute; inset:0;
  opacity: var(--ms-noise);
  pointer-events:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
@keyframes msFloat1{
  0%,100%{ transform: translate3d(calc(var(--mx, .5) * 20px), calc(var(--my, .5) * 16px), 0) scale(1); }
  50%    { transform: translate3d(calc(var(--mx, .5) * -18px), calc(var(--my, .5) * -14px), 0) scale(1.06); }
}
@keyframes msFloat2{
  0%,100%{ transform: translate3d(calc(var(--mx, .5) * -16px), calc(var(--my, .5) * 18px), 0) scale(1); }
  50%    { transform: translate3d(calc(var(--mx, .5) * 14px), calc(var(--my, .5) * -16px), 0) scale(1.05); }
}
@keyframes msFloat3{
  0%,100%{ transform: translate3d(calc(var(--mx, .5) * 10px), calc(var(--my, .5) * -18px), 0) scale(1); }
  50%    { transform: translate3d(calc(var(--mx, .5) * -12px), calc(var(--my, .5) * 16px), 0) scale(1.07); }
}
.mac-glass{
  background: var(--ms-glass) !important;
  border: 1px solid var(--ms-glass-border-soft) !important;
  backdrop-filter: blur(var(--ms-blur)) saturate(1.15);
  -webkit-backdrop-filter: blur(var(--ms-blur)) saturate(1.15);
  box-shadow: var(--ms-shadow-soft);
}
.tb-btn, .opt-close, .opt-reset, .search-box, .day-pill, .nav-btn, .play-trigger, .station-btn, .eq-btn, .worker-card, .shift-pill, .pill, button{
  transition: transform 180ms cubic-bezier(.2,.9,.2,1),
              background-color 180ms ease,
              border-color 180ms ease,
              box-shadow 220ms ease,
              opacity 180ms ease,
              filter 220ms ease;
}
.tb-btn:hover, .station-btn:hover, .eq-btn:hover, .nav-btn:hover, .play-trigger:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}
.tb-btn:active, .station-btn:active, .eq-btn:active, .nav-btn:active, .play-trigger:active{
  transform: translateY(0px) scale(0.98);
}
button:focus-visible, input:focus-visible, select:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.10), 0 0 0 5px color-mix(in srgb, var(--ms-primary) 55%, transparent);
}
*::-webkit-scrollbar{ width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.25);
}
*::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,0.18); }
@media (prefers-reduced-motion: reduce){
  :root{ --ms-motion: 0; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   RADIO WINDOW (draggable/resizable) – EQ BUTTONS TINY
   ============================================================ */
#radioWindow{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0 !important;
  top: auto !important;
  transform: none;
  width: 100%;
  min-width: 100%;
  height: 170px;
  min-height: 170px;
  max-height: 300px;
  z-index: 5600;
  background: var(--glass-bg, rgba(8,8,12,0.55));
  border: 1px solid var(--glass-border, rgba(255,255,255,0.12));
  border-radius: 24px 24px 0 0;
  backdrop-filter: blur(var(--glass-blur, 32px)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur, 32px)) saturate(180%);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.18) inset, 0 -20px 60px rgba(0,0,0,0.40);
  overflow: hidden;
  resize: none;
}
#radioWindow.hidden{ display:none !important; }
#radioWindow.minimized{
  height: 44px !important;
  min-height: 44px !important;
  resize: none;
}
.radio-win-header{
  height: 44px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: move;
  user-select: none;
}
.radio-win-left{ display:flex; align-items:center; gap: 10px; }
.radio-win-dots{ display:flex; gap: 8px; align-items:center; }
.radio-win-dot{ width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,0.45) inset; }
.radio-win-dot.close{ background:#ff5f56; }
.radio-win-dot.min{ background:#ffbd2e; }
.radio-win-dot.max{ background:#27c93f; }
.radio-win-title{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.70);
}
.radio-win-actions{ display:flex; gap: 8px; align-items:center; }
.radio-win-btn{
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.78);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
}
.radio-win-btn:hover{
  border-color: rgba(183,123,255,0.35);
  box-shadow: 0 0 0 1px rgba(183,123,255,0.18), 0 18px 40px rgba(183,123,255,0.12);
}
.radio-win-body{
  height: 100%;
  padding: 12px;
  padding-top: 18px;
}
.radio-drag-strip{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  cursor: move;
  user-select: none;
  z-index: 3;
}
.radio-drag-strip::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  width: 44px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
}
#radioWindow.minimized .radio-win-body{ display:none; }

/* convert stable fixed bar into window content */
#radioWindow .bottom-console{
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  height: 100% !important;
  background: transparent !important;
  border-top: none !important;
  padding: 0 10px !important;
  grid-template-columns: 270px minmax(180px, 1fr) minmax(280px, 432px) !important;
  gap: 16px !important;
}
#radioWindow .tech-panel{
  border-radius: 10px !important;
  background: rgba(0,0,0,0.55) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  overflow: visible !important;
  padding: 10px 10px 8px !important;
  height: auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}
#radioWindow .monitor-frame{
  height: 64px !important;
  margin: 0 18px 0 12px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  background: rgba(0,0,0,0.55) !important;
}
#radioWindow .control-panel{ gap: 14px !important; }
#radioWindow .tech-panel,
#radioWindow .monitor-frame,
#radioWindow .control-panel{ min-width: 0 !important; }

/* EQ pioneer buttons inside radio window — small chips, wrap into 2 rows */
#radioWindow .eq-pioneer {
  margin-top: 5px !important;
  padding: 3px !important;
  gap: 2px !important;
}
#radioWindow .epb {
  padding: 2px 6px 2px 4px !important;
  gap: 3px !important;
  border-radius: 3px !important;
}
#radioWindow .epb-label {
  font-size: 6.5px !important;
  letter-spacing: 0.5px !important;
}
#radioWindow .epb-led {
  width: 4px !important;
  height: 4px !important;
}
#morePanel{
  bottom: calc(100% + 8px) !important;
  top: auto !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99999 !important;
}
#radioWindow .radio-resize-se{
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 20px;
  height: 20px;
  cursor: se-resize;
  z-index: 120;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), rgba(255,255,255,0.00) 70%);
  border-radius: 6px;
  opacity: 0.55;
}
#radioWindow .radio-resize-se:hover{ opacity: 0.85; }

/* ============================================================
   DOCK & CALCULATOR – visible at start
   ============================================================ */
#msDock{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  height: var(--dock-h);
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 18px;
  background: rgba(20, 20, 24, 0.55);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  z-index: 9500;
}
#msDock .dock-app{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.86);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
#msDock .dock-app:hover{ transform: translateY(-2px); background: rgba(0,0,0,0.55); }
#msDock .dock-app.active{
  border-color: color-mix(in srgb, var(--ms-primary) 65%, rgba(255,255,255,0.14));
  box-shadow: 0 10px 24px rgba(0,0,0,0.35), 0 0 0 2px rgba(255,255,255,0.06) inset;
}
#msDock .dock-app .material-symbols-rounded{ font-size: 24px; }

.ms-window{
  position: fixed;
  right: 26px;
  top: 80px;                         /* below weather widget */
  width: 320px;
  height: 420px;
  border-radius: 18px;
  background: rgba(20, 20, 24, 0.55);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 22px 80px rgba(0,0,0,0.65);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  z-index: 9450;
  overflow: hidden;
}
.ms-window.hidden{ display:none; }
.ms-drag-strip{
  height: 16px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.10), rgba(255,255,255,0.00));
  cursor: grab;
}
.ms-drag-strip:active{ cursor: grabbing; }
.ms-window-body{ padding: 12px 12px 14px; height: calc(100% - 16px); display:flex; flex-direction: column; gap: 10px; }
.ms-resize-se{
  position:absolute; right: 6px; bottom: 6px;
  width: 18px; height: 18px; cursor: se-resize;
  border-radius: 6px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), rgba(255,255,255,0.00) 70%);
  opacity: 0.55;
}
.ms-resize-se:hover{ opacity: 0.85; }

/* Calculator UI */
.calc-top{ display:flex; align-items:center; justify-content: space-between; }
.calc-title{ font-weight: 900; letter-spacing: 0.6px; color: rgba(255,255,255,0.90); }
.calc-close{
  width: 34px; height: 34px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.85);
  display:grid; place-items:center;
  cursor:pointer;
}
.calc-display{
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 14px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 28px;
  color: rgba(255,255,255,0.95);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calc-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  flex: 1;
}
.cbtn{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.25);
  color: rgba(255,255,255,0.90);
  font-weight: 800;
  font-size: 16px;
  cursor:pointer;
  transition: transform 90ms ease, background 120ms ease;
}
.cbtn:hover{ background: rgba(0,0,0,0.35); }
.cbtn:active{ transform: scale(0.98); }
.cbtn.op{ background: rgba(183, 123, 255, 0.18); border-color: rgba(183, 123, 255, 0.35); }
.cbtn.eq{ background: rgba(0, 255, 136, 0.20); border-color: rgba(0, 255, 136, 0.35); }
.cbtn.zero{ grid-column: span 2; }

/* ============================================================
   HIDE TOP BAR & OPTIONS PANEL
   ============================================================ */
#topbar, #optionsPanel {
  display: none !important;
}

/* ═══ LIQUID GLASS RADIO WINDOW ═══ */
#radioWindow {
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-bottom: none !important;
  border-radius: 24px 24px 0 0 !important;
  backdrop-filter: blur(40px) saturate(200%) brightness(1.1) !important;
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.1) !important;
  box-shadow:
    0 -1px 0 rgba(255,255,255,0.25) inset,
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 -30px 80px rgba(0,0,0,0.35),
    0 0 0 0.5px rgba(255,255,255,0.12) !important;
}

/* Top shine strip */
#radioWindow::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6) 40%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.6) 60%, transparent);
  border-radius: 1px;
  pointer-events: none;
  z-index: 2;
}

/* Drag strip handle */
.radio-drag-strip {
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  cursor: move;
  z-index: 3;
}

/* Glass body */
#radioWindow .radio-win-body,
#radioWindow .bottom-console {
  background: transparent !important;
}

/* Tech panel glass */
#radioWindow .tech-panel {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 14px !important;
  backdrop-filter: blur(10px) !important;
}

/* Monitor frame glass */
#radioWindow .monitor-frame {
  background: rgba(0,0,0,0.3) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 12px !important;
}

/* EQ buttons glass */
#radioWindow .epb, #radioWindow .eq-btn {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 8px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: all .2s ease !important;
}
#radioWindow .epb:hover, #radioWindow .eq-btn:hover {
  background: rgba(255,255,255,0.10) !important;
  border-color: rgba(255,255,255,0.22) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 16px rgba(255,255,255,0.08) !important;
}
#radioWindow .epb.active, #radioWindow .eq-btn.active {
  background: rgba(183,123,255,0.18) !important;
  border-color: rgba(183,123,255,0.45) !important;
  box-shadow: none !important;
}

/* Play/prev/next buttons glass.
   ceqTriggerBtn (EQ+) is excluded: it's a text chip in the preset row, and
   this circular glass style made it look foreign and overflow the row. */
#radioWindow .ctrl-btn,
#radioWindow:not([data-radio-layout="pioneer"]) .radio-win-body button[id*="Btn"]:not(#radioIdleBtn):not(#playBtn):not(#ceqTriggerBtn):not(#themeBtn) {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 50% !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: all .2s cubic-bezier(.22,.68,0,1.2) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.15) inset !important;
}
#radioWindow .ctrl-btn:hover {
  background: rgba(255,255,255,0.14) !important;
  border-color: rgba(255,255,255,0.28) !important;
  transform: scale(1.08) !important;
  box-shadow: 0 4px 20px rgba(255,255,255,0.12), 0 1px 0 rgba(255,255,255,0.2) inset !important;
}
#radioWindow .ctrl-btn:active {
  transform: scale(0.94) !important;
}

/* Play button follows radio-accent color */
#radioWindow #playBtn {
  background: var(--radio-accent) !important;
  border: none !important;
  border-radius: 50% !important;
  color: #000 !important;
  transition: all .2s cubic-bezier(.22,.68,0,1.2) !important;
  box-shadow: 0 0 20px color-mix(in srgb, var(--radio-accent) 50%, transparent), 0 2px 8px rgba(0,0,0,0.4) !important;
}
#radioWindow #playBtn:hover {
  transform: scale(1.10) !important;
  box-shadow: 0 0 30px color-mix(in srgb, var(--radio-accent) 70%, transparent), 0 4px 16px rgba(0,0,0,0.4) !important;
  filter: brightness(1.1) !important;
}
#radioWindow #playBtn:active {
  transform: scale(0.94) !important;
}

/* ═══ MACOS DOCK — layout deferred to inline <style> in index.html ═══
   The #dockShelf + #bottomBtnBar pill is fully styled inline so that
   all dock rules live in one place and load-order conflicts are avoided.
   Only add here what cannot live inline (e.g. @keyframes already defined). */

/* ═══ RESPONSIVE — Radio console + Shell ═══ */

/* Tablet / medium (≤900px): compress middle column */
@media (max-width: 900px) {
  #radioWindow .bottom-console {
    grid-template-columns: 220px minmax(180px,1fr) minmax(220px,280px) !important;
    padding: 0 8px !important;
    gap: 10px !important;
  }
}

/* Small tablet / large phone landscape (≤680px): 2-col layout */
@media (max-width: 680px) {
  #radioWindow .bottom-console {
    grid-template-columns: 180px 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 6px 10px !important;
    padding: 0 8px !important;
    height: auto !important;
  }
  /* eq/preset panel spans full width */
  #radioWindow .bottom-console > :nth-child(3) {
    grid-column: 1 / -1;
  }
}

/* Phone portrait (≤480px): single column stacked */
@media (max-width: 480px) {
  :root {
    --rh: 210px !important;
  }
  #radioWindow .bottom-console {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    gap: 4px !important;
    padding: 4px 8px !important;
    height: auto !important;
    overflow-y: auto;
  }
  /* Hide less-critical panels on tiny screens */
  #radioWindow .tech-panel { display: none !important; }
  /* Make station row wrap */
  .station-row { flex-wrap: wrap !important; gap: 4px !important; }
}

/* Ensure calendarEmbed respects safe-area on phones */
#calendarEmbed {
  left: max(6px, env(safe-area-inset-left, 6px));
  right: max(6px, env(safe-area-inset-right, 6px));
}

/* Radio window also respects safe-area sides on narrow screens */
@media (max-width: 480px) {
  #radioWindow {
    left: env(safe-area-inset-left, 0px) !important;
    right: env(safe-area-inset-right, 0px) !important;
  }
}

/* Slow controls are portalled outside the transformed receiver. */
body > #slowFxPanel{z-index:100005!important;max-width:min(320px,calc(100vw - 16px))!important}
