:root {
  color-scheme: light;
  font-family: var(--sfdn-font, Arial, sans-serif);
  background: #f3f6fa;
  color: #111820;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button {
  font: inherit;
}

.control-shell {
  min-height: 100vh;
  background: #f3f6fa;
  color: #111820;
}

.control-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #52606f;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.control-header h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
}
.header-actions{display:flex;align-items:end;gap:10px}.header-actions label{color:#52606f;font-size:12px;font-weight:800;text-transform:uppercase}.header-actions select{display:block;min-width:230px;height:40px;margin-top:4px;border:1px solid #bac8d3;border-radius:6px;background:#fff}.admin-link{display:grid;place-items:center;height:40px;padding:0 14px;border-radius:6px;color:#fff;background:#17202a;text-decoration:none;font-weight:800}

.icon-button {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #1f6feb;
  font-weight: 900;
  cursor: pointer;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.status-band > div {
  padding: 16px;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  background: #fff;
}

.status-band span,
.mode-button small {
  display: block;
  color: #667789;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-band strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.live-audio-controls {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.audio-band{width:100%;margin:-8px 0 22px;padding:16px;border:1px solid #d8e0e8;border-radius:8px;background:#fff}.audio-band>span{display:block;color:#667789;font-size:14px;font-weight:700;text-transform:uppercase}.audio-band .live-audio-controls{grid-template-columns:110px minmax(0,1fr)}.audio-band input[type="range"]{height:38px;cursor:pointer}

.audio-toggle {
  min-width: 76px;
  height: 38px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #17202a;
  font-weight: 900;
  cursor: pointer;
}

.live-audio-controls input {
  width: 100%;
  accent-color: #1f6feb;
}
.language-controls{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:8px}.language-controls button{height:38px;border:1px solid #bac8d3;border-radius:6px;background:#eef3f7;color:#263746;font-weight:900;cursor:pointer}.language-controls button[data-active="true"]{border-color:#1f6feb;background:#1f6feb;color:#fff;box-shadow:0 0 0 3px rgba(31,111,235,.15)}
.rotation-panel{display:flex;flex-direction:column}.rotation-panel[hidden]{display:none}.rotation-toggle{height:38px;margin-top:8px;border:0;border-radius:6px;background:#1f6feb;color:#fff;font-weight:900;cursor:pointer}.rotation-toggle[data-paused="true"]{background:#d97706}.rotation-panel small{margin-top:6px;color:#667789;font-weight:700}.rotation-panel small[data-paused="true"]{color:#b45309}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.document-control{margin:0 0 22px;padding:18px;border:2px solid #1f6feb;border-radius:10px;background:#fff;box-shadow:0 8px 24px rgba(31,111,235,.10)}
.document-control>header{display:flex;align-items:center;justify-content:space-between;gap:16px}.document-control h2{margin:0;font-size:24px}.document-control>p{margin:8px 0 16px;color:#52606f}
.document-status{padding:7px 10px;border-radius:999px;background:#eef3f7;color:#52606f;font-size:13px;font-weight:900}.document-status[data-live="true"]{background:#dcfce7;color:#167447}
.document-picker{display:flex;gap:10px}.document-picker input{flex:1;padding:10px;border:1px solid #bac8d3;border-radius:6px}.document-picker button,.document-actions button{min-height:40px;padding:0 15px;border:0;border-radius:6px;background:#1f6feb;color:#fff;font-weight:900;cursor:pointer}
.document-notice{margin-top:12px;padding:11px 13px;border:1px solid #f4c95d;border-radius:6px;background:#fff8dc;color:#7a5200;font-weight:800}.document-notice[hidden]{display:none}
.mosaic-control{margin:0 0 22px;padding:18px;border:2px solid #7848ff;border-radius:10px;background:#fff;box-shadow:0 8px 24px rgba(120,72,255,.11)}.mosaic-control>header{display:flex;align-items:center;justify-content:space-between}.mosaic-control h2{margin:0;font-size:24px}.mosaic-control>p{margin:8px 0 16px;color:#52606f}.mosaic-editor{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.mosaic-zone-editor{padding:12px;border:1px solid #d8e0e8;border-radius:8px;background:#f8fafc}.mosaic-zone-editor>strong{display:flex;justify-content:space-between;gap:8px;margin-bottom:9px}.mosaic-zone-editor>strong small{color:#667789}.mosaic-zone-editor input[type="text"],.mosaic-zone-editor input[type="url"],.mosaic-zone-editor select,.mosaic-zone-editor input[type="file"]{width:100%;min-height:38px;margin:4px 0;padding:7px;border:1px solid #bac8d3;border-radius:5px;background:#fff}.mosaic-zone-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.mosaic-zone-actions button{min-height:36px;padding:0 10px;border:0;border-radius:5px;background:#7848ff;color:#fff;font-weight:800;cursor:pointer}.mosaic-zone-actions button[data-mosaic-action="clear"]{background:#52606f}.mosaic-audio{display:flex;align-items:center;gap:6px;margin-top:6px;color:#52606f;font-size:13px;font-weight:700}@media(max-width:900px){.mosaic-editor{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.mosaic-editor{grid-template-columns:1fr}}
.tool-panel[hidden]{display:none}.tool-panel-actions{display:flex;align-items:center;gap:8px}.tool-panel-actions button{width:36px;height:36px;border:0;border-radius:6px;background:#e7edf3;color:#263746;font-size:24px;font-weight:900;cursor:pointer}.mosaic-editor.single{grid-template-columns:minmax(0,1fr)}
.screen-preview header small[data-online="false"]{color:#1859b4}.screen-preview header small[data-online="true"]{color:#08783e}.preview-placeholder small{display:block;margin-top:8px;font-size:12px}.tool-mode-card .mode-button span{font-size:16px}
.document-ready>strong,.document-ready>small{display:block}.document-ready>small{margin-top:4px;color:#667789}.document-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px}.document-actions label{display:flex;align-items:center;gap:6px;color:#52606f;font-weight:700}.document-actions input{width:68px;height:40px;border:1px solid #bac8d3;border-radius:6px}.document-actions .danger{background:#1859b4}.document-actions button:disabled{opacity:.42;cursor:not-allowed}.document-error{margin-top:12px;padding:10px;border-radius:6px;background:#f2f7fe;color:#1859b4;font-weight:700}

.mode-card {
  min-height: 116px;
  border: 2px solid #d8e0e8;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.mode-button {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  width: 100%;
  min-height: 100px;
  padding: 18px;
  border: 0;
  border-radius: 8px;
  color: #111820;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.screen-preview{margin:0 0 22px;border:1px solid #c8d4df;border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 8px 24px rgba(28,48,68,.08)}
.screen-preview>header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #d8e0e8}.screen-preview>header span{display:block;color:#667789;font-size:11px;font-weight:800;text-transform:uppercase}.screen-preview>header strong{display:block;margin-top:2px;font-size:15px}.screen-preview>header small{color:#14834f;font-weight:900;text-transform:uppercase}.screen-preview>header small:before{display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:#20b96b;box-shadow:0 0 7px #20b96b;content:""}.screen-preview-stage{position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;background:#020913}.screen-preview-stage iframe{position:absolute;top:0;left:0;width:200%;height:200%;border:0;pointer-events:none;transform:scale(.5);transform-origin:0 0}.preview-placeholder{display:grid;height:100%;place-items:center;color:#aebdca;background:#17202a}
.dashboard-card-controls{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-top:1px solid #d8e0e8;background:#f7f9fb}.dashboard-card-controls>button,.visualization-buttons button{height:28px;border:1px solid #b8c6d2;border-radius:5px;background:#fff;color:#263746;font-size:12px;font-weight:800;cursor:pointer}.dashboard-card-controls>button{padding:0 10px}.dashboard-card-controls>button[data-paused="true"]{border-color:#d97706;background:#fff7ed;color:#b45309}.dashboard-card-controls button:disabled{opacity:.38;cursor:not-allowed}.visualization-buttons{display:flex;gap:5px}.visualization-buttons button{width:30px}.visualization-buttons button[data-active="true"]{border-color:#1f6feb;background:#1f6feb;color:#fff}

.mode-button span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  color: #fff;
  background: #17202a;
  font-weight: 900;
}

.mode-button strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.15;
}

.mode-card[data-active="true"] {
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.18);
}

.mode-card[data-active="true"] .mode-button span {
  background: #1f6feb;
}

@media (max-width: 700px) {
  .status-band {
    grid-template-columns: 1fr;
  }

  .control-layout {
    width: min(100% - 22px, 1180px);
    padding-top: 18px;
  }
  .control-header{align-items:flex-start}.header-actions{flex-wrap:wrap;justify-content:flex-end}.header-actions label{width:100%}.header-actions select{min-width:180px;width:100%}
  .document-picker{flex-direction:column}
}

.dashboard-scope-controls { padding: 0 16px 16px; }
.dashboard-scope-controls label { display: grid; gap: 8px; font-weight: 600; }
.dashboard-scope-controls select { width: 100%; padding: 10px; border-radius: 8px; background: #152334; color: white; border: 1px solid #53677e; }
.dashboard-scope-controls small { display: block; margin-top: 8px; }

.dashboard-card-controls{flex-wrap:wrap}.visualization-buttons{margin-left:auto}

/* Keep all seven views visible in narrow dashboard cards. */
.dashboard-card-controls .visualization-buttons{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;flex:1 0 100%;width:100%;min-width:0;margin-left:0}
.dashboard-card-controls .visualization-buttons button{width:100%;min-width:0;padding:0}
/* Header and selected player tools */
.control-header { align-items: center; flex-wrap: wrap; padding: 20px 0; margin-bottom: 16px; border-bottom: 1px solid #d7e0e7; }
.control-brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.control-brand > img { width: 140px; height: auto; object-fit: contain; }
.control-brand > div { border-left: 1px solid #cad4dd; padding-left: 20px; }
.control-header .control-brand h1 { font-size: 19px; line-height: 1.3; max-width: 290px; }
.control-brand p { margin: 5px 0 0; font-size: 12px; letter-spacing: 2px; color: #52606f; }
.control-header .header-actions { align-items: center; gap: 22px; flex-wrap: wrap; }
.control-header .sfdn-user-card { flex-wrap: nowrap; }
.control-header .sfdn-user-card > div { min-width: 0; }
.control-header .sfdn-user-card small { font-size: 11px; overflow-wrap: anywhere; }
.control-toolbar { display: flex; align-items: end; gap: 20px; margin-bottom: 16px; }
.control-screen-picker { display: grid; gap: 7px; flex: 1; min-width: 0; color: #52606f; font-size: 12px; font-weight: 700; }
.control-screen-picker select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #bac8d3; border-radius: 6px; font: 14px var(--sfdn-font); background: white; color: #172a40; }
.control-toolbar nav { display: flex; align-items: center; gap: 10px; }
.control-toolbar .admin-link { height: 42px; font-size: 13px; white-space: nowrap; }
.control-toolbar .icon-button { width: 42px; height: 42px; display: grid; place-items: center; }
.control-toolbar svg { width: 22px; height: 22px; }
.connected-players { padding: 16px 20px; border: 1px solid #d3dde7; border-radius: 8px; background: #fff; margin-bottom: 18px; }
.connected-players > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.connected-players h2 { font-size: 14px; margin: 0; }
.connected-players button { padding: 8px 12px; border: 1px solid #bdcbd7; border-radius: 5px; background: #edf2f6; color: #183b59; cursor: pointer; font-size: 12px; }
.connected-players button:disabled { opacity: .5; cursor: default; }
.connected-player { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 14px; margin-top: 12px; border-top: 1px solid #e5ebf0; font-size: 13px; }
.connected-player small { display: block; color: #52606f; margin-top: 5px; font-size: 12px; }
.player-connection { color: #647583; }.player-connection[data-online=true] { color: #128255; }
.player-update-state { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
[data-player-action-status] { font-size: 13px; color: #128255; }[data-player-action-status][data-error=true] { color: #2660b1; }
@media(max-width:760px) { .control-brand { gap: 12px; }.control-brand > img { width: 105px; }.control-brand > div { padding-left: 12px; }.control-header .control-brand h1 { font-size: 17px; }.control-header .header-actions { justify-content: space-between; width: 100%; }.control-header .header-actions .ui-language { width: auto; }.control-header .sfdn-user-card { flex-wrap: wrap; }.control-toolbar { flex-direction: column; align-items: stretch; }.control-toolbar nav { flex-wrap: wrap; }.connected-players > header { flex-wrap: wrap; } }
.control-header .sfdn-user-card strong, .control-header .sfdn-user-card small { display: block; }
.control-header .sfdn-user-card button { padding: 9px 14px; border: 0; border-radius: 6px; background: #183b59; color: white; cursor: pointer; font-size: 12px; white-space: nowrap; }
@media(max-width:760px) { .control-header .sfdn-user-card { display: grid !important; grid-template-columns: 44px minmax(0,1fr); width: 100%; }.control-header .sfdn-user-card button { grid-column: 2; justify-self: start; } }
