:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --app-shell-width: 1380px;
  --line: #d9dee7;
  --muted: #637083;
  --surface-muted: #f7f9fb;
  background: #eef1f4;
  color: #1f2933;
}

body {
  margin: 0;
}

body.auth-loading .shell,
body.auth-loading .auth-page {
  display: none;
}

body.auth-required .shell {
  display: none;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-page[hidden] {
  display: none;
}

.login-card {
  display: grid;
  gap: 14px;
  width: min(460px, 100%);
  border: 1px solid #ccd4dd;
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(31, 41, 51, 0.14);
}

.login-card img {
  width: 132px;
  height: auto;
}

.login-card h1 {
  font-size: 26px;
}

.login-error {
  color: #ED0A3A;
  font-size: 14px;
}

.shell {
  width: min(var(--app-shell-width), calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  width: 128px;
  height: auto;
  display: block;
}

.topbar-status {
  min-width: 180px;
  flex: 1 1 auto;
}

.account-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 188px;
  flex: 0 0 auto;
}

.account-copy {
  display: grid;
  gap: 2px;
  text-align: right;
  line-height: 1.1;
}

.account-copy span {
  color: #8a96a3;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-copy strong {
  max-width: 170px;
  color: #233848;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #c8d3df;
  border-radius: 50%;
  background: #fff;
  color: #496172;
  font-size: 18px;
  line-height: 1;
}

.logout-button:hover:not(:disabled) {
  border-color: #012F46;
  color: #012F46;
}

.logout-button:disabled {
  color: #aab4bf;
  cursor: default;
  opacity: 0.72;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 19px;
}

.topbar p,
.muted {
  color: #687482;
  margin-top: 6px;
}

.tabs {
  display: inline-flex;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.tab,
button {
  appearance: none;
  border: 0;
  background: #fff;
  color: #1f2933;
  font: inherit;
  cursor: pointer;
}

.tab {
  padding: 10px 14px;
  border-right: 1px solid #b8c1cc;
}

.tab:last-child {
  border-right: 0;
}

.tab.active,
button[type="submit"],
.section-head button {
  background: #012F46;
  color: #fff;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metrics.customer-dashboard {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metrics article,
.panel,
.table-wrap {
  border: 1px solid #ccd4dd;
  border-radius: 8px;
  background: #fff;
}

.metrics article {
  padding: 14px;
}

.metrics span {
  display: block;
  color: #687482;
  font-size: 13px;
  margin-bottom: 8px;
}

.metrics strong {
  font-size: 28px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
}

.section-head.compact {
  justify-content: flex-start;
  align-items: center;
}

.section-head.compact button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.section-head.centered {
  justify-content: center;
}

.section-head button,
button[type="submit"] {
  border-radius: 7px;
  padding: 10px 14px;
}

.secondary {
  width: fit-content;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  padding: 8px 11px;
  margin-bottom: 10px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.actions button,
.form-actions button,
.modal-actions button,
.user-actions button,
.location-actions button,
.media-upload-actions button,
.campaign-actions button,
.row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.points-table {
  table-layout: fixed;
}

.points-table th:nth-child(1),
.points-table td:nth-child(1) {
  width: 210px;
}

.points-table th:nth-child(2),
.points-table td:nth-child(2) {
  width: 110px;
}

.points-table th:nth-child(4),
.points-table td:nth-child(4) {
  width: 150px;
}

.points-table th:nth-child(5),
.points-table td:nth-child(5) {
  width: 260px;
}

.points-table td {
  overflow-wrap: anywhere;
}

.points-table td:nth-child(5) {
  white-space: normal;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #e3e8ee;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #687482;
  font-size: 13px;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.track-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  background: #F2F6F8;
  color: #012F46;
  font-size: 13px;
}

.status.offline {
  background: #FFF1F4;
  color: #ED0A3A;
}

.danger {
  border: 1px solid #F29AAD;
  border-radius: 7px;
  padding: 8px 10px;
  color: #ED0A3A;
}

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

.clock-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.62fr) minmax(720px, 1.8fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.window-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.form-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin-bottom: 0;
}

.form-actions button:not(.secondary):not(.danger) {
  border-radius: 7px;
  background: #012F46;
  color: #fff;
  padding: 8px 14px;
}

.panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.panel.wide {
  margin-top: 16px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.watermark-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.watermark-file-status,
.watermark-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.watermark-file-card,
.watermark-status-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid #d7dfe7;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafb;
}

.watermark-file-card.ready {
  border-color: #8AA7B6;
}

.watermark-file-card.missing {
  border-color: #F29AAD;
}

.watermark-file-card span,
.watermark-status-grid span {
  color: #687482;
  font-size: 13px;
}

.watermark-status-grid strong {
  font-size: 22px;
}

.analytics-panel {
  display: grid;
  gap: 12px;
}

.analytics-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.analytics-card {
  border: 1px solid #ccd4dd;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.analytics-card span,
.analytics-list-row span,
.heat-row span,
.analytics-table small {
  display: block;
  color: #687482;
  font-size: 12px;
  margin-top: 4px;
}

.analytics-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.analytics-card.ok,
.analytics-badge.ok {
  border-color: #8AA7B6;
  background: #eefaf2;
  color: #012F46;
}

.analytics-card.attention,
.analytics-badge.attention {
  border-color: #d8bd68;
  background: #fff8df;
  color: #7a5a00;
}

.analytics-card.warn,
.analytics-badge.warn {
  border-color: #e58b9c;
  background: #fff1f4;
  color: #9f1239;
}

.analytics-card.offline,
.analytics-badge.offline {
  border-color: #c9d1dc;
  background: #f2f5f8;
  color: #5c6875;
}

.analytics-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #ccd4dd;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.analytics-scroll {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  border-bottom: 1px solid #e1e6ec;
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.analytics-table th {
  color: #687482;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.analytics-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.analytics-columns h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.analytics-list-row {
  border-bottom: 1px solid #e1e6ec;
  padding: 8px 0;
}

.analytics-heatmap {
  display: grid;
  gap: 8px;
}

.heat-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 2fr) 64px;
  align-items: center;
  gap: 12px;
}

.heat-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e6ec;
}

.heat-bar span {
  display: block;
  height: 100%;
  margin: 0;
  background: #012F46;
}

.heat-row em {
  color: #233848;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

label {
  display: grid;
  gap: 6px;
  color: #3a4652;
  font-size: 14px;
}

input,
select,
textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  padding: 9px 10px;
  font: inherit;
}

input.invalid {
  border-color: #ED0A3A;
  box-shadow: 0 0 0 2px rgba(155, 44, 44, 0.12);
}

input.valid {
  border-color: #012F46;
  box-shadow: 0 0 0 2px rgba(1, 47, 70, 0.12);
}

.field-hint {
  color: #687482;
  font-size: 12px;
}

.field-hint.error {
  color: #ED0A3A;
}

.field-hint.ok {
  color: #012F46;
}

textarea {
  resize: vertical;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.client-list {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-bottom: 16px;
}

.client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 1px solid #ccd4dd;
  border-radius: 8px;
  padding: 14px;
  text-align: left;
}

.client-row:hover {
  border-color: #012F46;
  background: #F2F6F8;
}

.client-row strong,
.client-row small,
.client-row-meta {
  display: block;
}

.client-row small,
.client-row-meta {
  color: #687482;
  font-size: 13px;
  margin-top: 4px;
}

.client-row-meta {
  text-align: right;
}

.client-detail[hidden] {
  display: none;
}


.client-settings-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 14px 0 8px;
}

.client-settings-header .icon-button {
  width: 38px;
  min-height: 34px;
  padding: 0;
  border-color: #b8c1cc;
  background: #fff;
  color: #012F46;
  font-size: 19px;
  line-height: 1;
}

.client-settings-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.client-settings-title h2 {
  margin: 0;
  color: #0d2230;
  font-size: 20px;
  line-height: 1.15;
}

.client-settings-title p {
  margin: 0;
  color: #687482;
  font-size: 13px;
  line-height: 1.25;
}

.client-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px 48px;
  padding: 3px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #F2F6F8;
  width: fit-content;
  max-width: calc(100% - 48px);
}

.client-settings-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #012F46;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.client-settings-tabs button.active {
  background: #012F46;
  color: #fff;
  box-shadow: 0 1px 2px rgba(1, 47, 70, 0.16);
}

.client-settings-section {
  display: none;
}

.client-settings-section.active {
  display: block;
}

.client-general-grid {
  display: grid;
  gap: 18px;
}

.section-head.compact.client-settings-section-head {
  justify-content: space-between;
  width: 100%;
  margin-bottom: 20px;
}

.client-settings-section-head > div {
  min-width: 0;
}

.client-settings-section-head h2,
.client-settings-section-head p {
  margin-top: 0;
}

.client-general-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.client-general-grid label,
.client-general-row label {
  display: grid;
  gap: 7px;
  align-content: start;
}

.client-general-row label > input,
.client-general-row label > select {
  width: 100%;
}

.client-general-span-2 {
  grid-column: span 2;
}

.client-general-grid .client-presenter-names {
  width: 100%;
}

.client-general-grid textarea {
  min-height: 132px;
  resize: vertical;
}

.client-generation-rebuild {
  align-content: start;
}

.client-generation-time {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) auto minmax(82px, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 68px;
  padding: 10px 14px 8px;
  border: 1px solid #cbd5dc;
  border-radius: 10px;
  background: #fff;
}

.client-generation-time > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.client-generation-time input {
  width: 100%;
  min-height: 34px;
  padding: 4px 8px;
  border: 0;
  border-bottom: 2px solid #d7e0e5;
  border-radius: 0;
  background: transparent;
  color: #132a39;
  font: 700 18px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}

.client-generation-time input:focus {
  border-bottom-color: #117d9e;
  outline: 0;
}

.client-generation-time b {
  padding-top: 7px;
  color: #607484;
  font-size: 20px;
}

.client-generation-time small {
  color: #718391;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

.setting-switch-control {
  box-sizing: border-box;
  width: 100%;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #cbd5dc;
  border-radius: 10px;
  background: #fff;
}

.setting-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  min-height: 38px;
  cursor: pointer;
}

.setting-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.setting-switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  border: 1px solid #b8c5ce;
  border-radius: 999px;
  background: #dce4e9;
  transition: background .16s ease, border-color .16s ease;
}

.setting-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(1, 47, 70, .22);
  transition: transform .16s ease;
}

.setting-switch input:checked + .setting-switch-track {
  border-color: #16846d;
  background: #16846d;
}

.setting-switch input:checked + .setting-switch-track::after {
  transform: translateX(18px);
}

.setting-switch input:focus-visible + .setting-switch-track {
  outline: 3px solid rgba(30, 110, 230, .22);
  outline-offset: 2px;
}

.setting-switch input:disabled + .setting-switch-track {
  cursor: default;
  opacity: .55;
}

.setting-switch strong {
  color: #344454;
  font-size: 12px;
}

.broadcast-settings-list {
  display: grid;
  gap: 14px;
}

.broadcast-setting-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid #d7e0e5;
  border-radius: 16px;
  background: #f7fafb;
}

.broadcast-setting-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.broadcast-setting-kicker {
  color: #6d8290;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.broadcast-setting-copy h3,
.broadcast-setting-copy p {
  margin: 0;
}

.broadcast-setting-copy h3 {
  color: #12364a;
  font-size: 17px;
}

.broadcast-setting-copy p {
  max-width: 780px;
  color: #647786;
  font-size: 13px;
  line-height: 1.45;
}

.broadcast-setting-switch {
  box-sizing: border-box;
  justify-content: center;
  min-width: 132px;
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #cbd5dc;
  border-radius: 12px;
  background: #fff;
}

.ad-window-empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed #b8c5ce;
  border-radius: 10px;
  background: #f7f9fb;
  color: #344454;
}

.ad-window-empty span {
  color: #687482;
  font-size: 13px;
}

@media (max-width: 900px) {
  .client-general-row {
    grid-template-columns: 1fr;
  }

  .client-general-span-2 {
    grid-column: auto;
  }

  .broadcast-setting-card {
    grid-template-columns: 1fr;
  }

  .broadcast-setting-switch {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .section-head.compact.client-settings-section-head {
    align-items: stretch;
  }

  .client-settings-section-head button {
    width: 100%;
  }
}

.schedule-exchange-manual {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(280px, 1fr);
  gap: 14px;
  align-items: end;
}

.schedule-exchange-list,
.schedule-version-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.schedule-exchange-row {
  display: grid;
  grid-template-columns: 92px minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft, #f7f9fb);
}

.schedule-exchange-row.export {
  grid-template-columns: 92px 120px repeat(3, minmax(150px, 1fr)) auto;
}

.schedule-version-row {
  display: grid;
  grid-template-columns: 120px 90px minmax(160px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.schedule-version-row.current {
  border-left: 4px solid var(--success, #2a9d62);
}

@media (max-width: 900px) {
  .schedule-exchange-manual,
  .schedule-exchange-row,
  .schedule-exchange-row.export,
  .schedule-version-row {
    grid-template-columns: 1fr;
  }
}

.client-settings-section .panel:first-child,
.client-settings-section .clock-layout:first-child {
  margin-top: 0;
}

.danger-zone {
  border-color: #F29AAD;
  background: #FFF1F4;
}

.danger-zone h2 {
  color: #ED0A3A;
}

.playlist-list,
.location-list,
.clock-category-library,
.clock-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.clock-category-library {
  align-content: start;
  height: 900px;
  min-height: 900px;
  max-height: 900px;
  overflow: auto;
  padding-right: 2px;
}

.clock-source-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.clock-source-toolbar .secondary {
  margin-bottom: 0;
}

.clock-source-toolbar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-field {
  display: grid;
  grid-template-columns: auto 160px;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.schedule-mode-field {
  margin-left: 0;
}

.schedule-mode-field select,
.inline-field select {
  min-height: 36px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  padding: 6px 32px 6px 10px;
  background: #fff;
  color: #1f2933;
  font: inherit;
}

#clockScheduleDateField[hidden],
#clearDateSchedule[hidden] {
  display: none;
}


.section-head.compact .secondary.active {
  border-color: #012F46;
  background: #F2F6F8;
  color: #012F46;
}

.clock-toolbar {
  display: grid;
  grid-template-columns: auto minmax(240px, 360px) minmax(40px, 1fr) auto auto;
  align-items: end;
  gap: 10px 12px;
  margin-bottom: 12px;
}

.clock-toolbar h2 {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  margin: 0 6px 0 0;
  font-size: 20px;
  line-height: 34px;
}

.clock-toolbar > .clock-select-field {
  grid-column: 2;
  grid-row: 1;
}

.clock-toolbar > #createClock {
  grid-column: 4;
  grid-row: 1;
}

.clock-toolbar > #saveClientPlaylist {
  grid-column: 5;
  grid-row: 1;
}

.clock-toolbar button {
  align-self: end;
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  margin-bottom: 0;
  white-space: nowrap;
}

.clock-select-field {
  display: grid;
  grid-template-rows: 14px 34px;
  gap: 3px;
  min-width: 0;
  margin: 0;
}

.clock-select-field span {
  color: #687482;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
}

.clock-select-field select {
  width: 100%;
  min-height: 34px;
  height: 34px;
  padding: 0 34px 0 10px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  background: #fff;
  color: #1f2933;
  font: inherit;
}

.clock-name-slot {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) minmax(150px, .8fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid #e3e8ee;
}

.clock-block-select,
.clock-block-name,
.clock-relay-url input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  background: #fff;
  color: #1f2933;
  font: inherit;
}

.clock-relay-url {
  grid-column: span 2;
  display: grid;
  gap: 3px;
  color: #526474;
  font-size: 11px;
  font-weight: 700;
}

.clock-add-block,
.clock-delete-block {
  min-height: 34px;
  padding: 0 12px;
}

.clock-name-slot .clock-name {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  background: #fff;
  color: #1f2933;
  font: inherit;
}

.clock-name-slot .clock-block-type {
  min-height: 34px;
  height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  background: #fff;
  color: #1f2933;
  font: inherit;
}

.clock-color-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: #344454;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.clock-color-option .clock-color {
  width: 38px;
  height: 30px;
  padding: 2px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.clock-color-option .clock-color:disabled {
  cursor: default;
  opacity: 0.65;
}

.clock-policy-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  white-space: nowrap;
  color: #344454;
  font-size: 12px;
  font-weight: 700;
}

.clock-duration-option {
  gap: 8px;
  height: 34px;
  padding-left: 10px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  background: #fff;
}

.clock-duration-option .clock-duration {
  width: 88px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #1f2933;
  font: inherit;
}

.clock-name-slot button {
  border: 1px solid #b8c1cc;
  border-radius: 7px;
}

.clock-name-slot .clock-policy-toggle {
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  border-color: #c7d0d9;
  background: #f2f5f7;
  color: #536271;
  font-size: 11px;
  font-weight: 800;
}

.clock-name-slot .clock-policy-toggle.active {
  border-color: #16846d;
  background: #e4f6f0;
  color: #075f4f;
}

.clock-policy-toggle .clock-toggle-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa6b2;
  box-shadow: 0 0 0 3px rgba(154, 166, 178, 0.16);
}

.clock-policy-toggle.active .clock-toggle-dot {
  background: #16846d;
  box-shadow: 0 0 0 3px rgba(22, 132, 109, 0.16);
}

.clock-name-slot .clock-delete-button {
  border-color: #efb7c0;
  background: #fff2f4;
  color: #b4233c;
}

.clock-name-slot .clock-delete-button:hover:not(:disabled) {
  border-color: #d92d4a;
  background: #ffe4e8;
}

@media (max-width: 1450px) {
  .clock-name-slot {
    grid-template-columns: minmax(0, 1fr);
  }
}

.clock-name-slot {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.clock-container-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  align-items: end;
  gap: 10px;
}

.clock-identity-field,
.clock-block-settings label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #526474;
  font-size: 11px;
  font-weight: 800;
}

.clock-container-duration {
  display: grid;
  gap: 1px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid #d5dde3;
  border-radius: 7px;
  background: #f7f9fb;
  color: #344454;
}

.clock-container-duration strong {
  font-size: 13px;
}

.clock-container-duration small {
  color: #7a8793;
  font-size: 9px;
}

.clock-blocks-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.clock-blocks-heading > div {
  display: grid;
  gap: 2px;
}

.clock-blocks-heading strong {
  color: #012f46;
  font-size: 14px;
}

.clock-blocks-heading span {
  color: #687482;
  font-size: 11px;
}

.clock-block-strip {
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  min-height: 82px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid #d5dde3;
  border-radius: 9px;
  background: #f2f5f7;
}

.section-head.compact .clock-name-slot .clock-block-tab {
  --block-background: #f1f3f5;
  --block-border: #c8d0d7;
  --block-accent: #7c8995;
  --block-foreground: #344454;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(25px, auto) auto;
  align-content: center;
  align-items: center;
  justify-content: stretch;
  gap: 3px;
  flex-grow: var(--block-share);
  flex-shrink: 1;
  flex-basis: 124px;
  min-width: 124px;
  height: auto;
  min-height: 70px;
  padding: 7px 9px;
  overflow: hidden;
  border: 1px solid var(--block-border);
  border-radius: 7px;
  background: var(--block-background);
  color: var(--block-foreground);
  text-align: left;
}

.clock-name-slot .clock-block-tab > span,
.clock-name-slot .clock-block-tab > small {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  color: color-mix(in srgb, var(--block-foreground) 72%, #fff);
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock-name-slot .clock-block-tab > strong {
  display: -webkit-box;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.clock-name-slot .clock-block-tab.selected {
  border-color: var(--block-accent);
  box-shadow: inset 0 -3px 0 var(--block-accent);
}

.section-head.compact .clock-name-slot .clock-block-tab.type-music {
  --block-background: #edf5fa;
  --block-border: #b8cedd;
  --block-accent: #6f9dbb;
  --block-foreground: #294a60;
}

.section-head.compact .clock-name-slot .clock-block-tab.type-program {
  --block-background: #f2eef8;
  --block-border: #cfc2df;
  --block-accent: #947cb4;
  --block-foreground: #514264;
}

.section-head.compact .clock-name-slot .clock-block-tab.type-advertising {
  --block-background: #fbf0e7;
  --block-border: #dfc6b2;
  --block-accent: #bd8964;
  --block-foreground: #674936;
}

.section-head.compact .clock-name-slot .clock-block-tab.type-news {
  --block-background: #eef5ec;
  --block-border: #bfd1b9;
  --block-accent: #7b9f72;
  --block-foreground: #3f583a;
}

.section-head.compact .clock-name-slot .clock-block-tab.type-relay {
  --block-background: #eaf5f3;
  --block-border: #b5d3ce;
  --block-accent: #69a49b;
  --block-foreground: #365c57;
}

.section-head.compact .clock-name-slot .clock-block-tab.type-none {
  --block-background: #f1f2f4;
  --block-border: #c9ced4;
  --block-accent: #87919b;
  --block-foreground: #46515c;
}

.clock-name-slot .clock-block-tab.fixed {
  border-style: dashed;
}

.clock-name-slot .clock-block-tab.fixed.selected {
  border-color: var(--block-accent);
  box-shadow: inset 0 -3px 0 var(--block-accent);
}

.clock-block-settings {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(140px, .75fr) auto minmax(190px, .9fr) minmax(190px, .9fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d5dde3;
  border-radius: 9px;
  background: #fff;
}

.clock-block-settings.fixed {
  border-color: #e5c77f;
  background: #fffaf0;
}

.clock-block-settings-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e7ebef;
}

.clock-block-settings-title > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.clock-block-settings-title strong {
  color: #012f46;
  font-size: 13px;
}

.clock-block-settings-title span,
.clock-block-settings-title small {
  color: #687482;
  font-size: 10px;
}

.clock-block-settings .clock-duration-option {
  display: grid;
  gap: 4px;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.clock-block-settings .clock-duration-option .clock-duration {
  width: 100px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  background: #fff;
}

.clock-block-settings .clock-relay-url {
  grid-column: span 2;
}

@media (max-width: 1500px) {
  .clock-block-settings {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 900px) {
  .clock-container-row,
  .clock-block-settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .clock-block-settings-title,
  .clock-block-settings .clock-relay-url {
    grid-column: 1;
  }
}


.clock-list-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
}

.clock-list-item span {
  color: #687482;
  font-size: 13px;
}

.clock-list-item.selected {
  border-color: #012F46;
  background: #F2F6F8;
  box-shadow: 0 0 0 2px rgba(1, 47, 70, 0.12);
}

.clock-editor {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.clock-ad-overlays {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #f0cf86;
  border-radius: 8px;
  background: #fff8e8;
  font-size: 12px;
}

.clock-ad-overlay {
  padding: 4px 7px;
  border: 1px solid #dfb75e;
  border-radius: 999px;
  background: #fff;
  color: #6d4a00;
  font-weight: 800;
}

.clock-fixed-range {
  align-self: center;
  color: #687482;
  font-size: 12px;
  font-weight: 700;
}

.clock-editor-body {
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(320px, 1.22fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.clock-order-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.clock-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border-bottom: 1px solid #d9e0e7;
  background: #F2F6F8;
  color: #012F46;
}

.clock-order-head span {
  color: #687482;
  font-size: 12px;
  font-weight: 700;
}

.hour-schedule {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.clock-schedule-grid {
  display: grid;
  grid-template-columns: 74px repeat(7, minmax(120px, 1fr));
  gap: 0;
  overflow-x: auto;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  background: #d9e0e7;
}

.clock-schedule-grid.date-mode {
  grid-template-columns: 74px minmax(220px, 1fr);
}

.clock-schedule-corner,
.clock-schedule-head,
.clock-schedule-hour {
  display: grid;
  align-items: center;
  min-height: 32px;
  padding: 5px 8px;
  background: #f7f9fb;
  color: #5f6c7a;
  font-size: 12px;
  font-weight: 700;
}

.clock-schedule-head {
  justify-content: center;
  text-align: center;
  font-size: 13px;
}

.clock-schedule-hour {
  justify-content: end;
  border-top: 1px solid #d9e0e7;
}

.clock-schedule-cell {
  --clock-color: #ffffff;
  display: grid;
  gap: 1px;
  min-height: 32px;
  border: 0;
  border-top: 1px solid #d9e0e7;
  border-left: 1px solid #d9e0e7;
  padding: 3px 6px;
  background: #fff;
  background: color-mix(in srgb, var(--clock-color) 22%, #ffffff);
  text-align: left;
  user-select: none;
  touch-action: none;
}

.clock-schedule-cell span {
  color: #8a96a3;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.clock-schedule-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #172635;
  font-size: 12px;
  line-height: 1.1;
}

.clock-schedule-cell:hover {
  background: #f8fafc;
  background: color-mix(in srgb, var(--clock-color) 30%, #ffffff);
}

.clock-schedule-cell.selected {
  position: relative;
  z-index: 1;
  background: #F2F6F8;
  background: color-mix(in srgb, var(--clock-color) 36%, #ffffff);
  box-shadow: inset 0 0 0 2px #012F46;
}

.clock-schedule-grid.selecting,
.clock-schedule-grid.selecting .clock-schedule-cell {
  cursor: crosshair;
  user-select: none;
}

.hour-slot {
  display: grid;
  gap: 8px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  text-align: left;
}

.hour-slot span {
  color: #687482;
  font-size: 13px;
  font-weight: 700;
}

.hour-slot strong {
  min-height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hour-slot:hover {
  border-color: #9fb0c2;
  background: #f8fafc;
}

.hour-slot.selected {
  border-color: #012F46;
  box-shadow: 0 0 0 2px rgba(1, 47, 70, 0.14);
  background: #F2F6F8;
}

.clock-category,
.clock-card {
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  background: #fff;
}

.clock-category {
  cursor: grab;
  padding: 8px 9px;
}

.clock-category.archive-source {
  border-color: #d2b36a;
  background: #fff8e3;
}

.clock-category.folder-labeled,
.clock-item.folder-labeled,
.media-row.folder.folder-labeled,
.media-tree-row.folder-labeled {
  background: rgba(var(--folder-label-rgb), 0.13);
  box-shadow: inset 4px 0 0 var(--folder-label-color);
}

.clock-category.folder-labeled,
.clock-item.folder-labeled,
.media-row.folder.folder-labeled {
  border-color: rgba(var(--folder-label-rgb), 0.45);
}

.clock-category.folder-labeled:hover,
.media-row.folder.folder-labeled:hover {
  background: rgba(var(--folder-label-rgb), 0.2);
}

.clock-category:active {
  cursor: grabbing;
}

.clock-category strong,
.clock-category small {
  display: block;
}

.clock-category small,
.clock-foot,
.clock-empty {
  color: #687482;
  font-size: 12px;
  margin-top: 2px;
}

.clock-card {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.clock-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.clock-head .clock-name {
  min-height: 34px;
  padding: 7px 10px;
}

.clock-head button,
.clock-name-slot button,
.clock-item button {
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  padding: 8px 10px;
}

.clock-item button {
  display: inline-grid;
  place-items: center;
  width: 22px;
  min-height: 22px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

.clock-dropzone {
  --clock-insert-color: #0a7898;
  display: grid;
  align-content: start;
  gap: 2px;
  height: 790px;
  min-height: 790px;
  max-height: 790px;
  overflow: auto;
  border: 1px dashed #b8c1cc;
  border-radius: 0;
  padding: 6px;
  background: #fafbfc;
}

.clock-item {
  position: relative;
}

.clock-item.clock-insert-before::before,
.clock-item.clock-insert-after::after {
  content: "";
  position: absolute;
  z-index: 5;
  left: 4px;
  right: 4px;
  height: 3px;
  border-radius: 999px;
  background: var(--clock-insert-color);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(10, 120, 152, 0.25);
  pointer-events: none;
}

.clock-item.clock-insert-before::before {
  top: -3px;
}

.clock-item.clock-insert-after::after {
  bottom: -3px;
}

.clock-dropzone.clock-insert-empty {
  box-shadow: inset 0 0 0 3px var(--clock-insert-color);
}

.clock-wheel-panel {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(130px, 0.8fr);
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.clock-wheel-stage {
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  transition: box-shadow 0.16s ease, background 0.16s ease;
}

.clock-wheel-stage.drop-target,
.clock-dropzone.drop-target {
  background: #F2F6F8;
  box-shadow: 0 0 0 3px rgba(1, 47, 70, 0.18);
}

.clock-wheel {
  display: block;
  width: 100%;
  height: 100%;
}

.clock-wheel-base {
  fill: #F2F6F8;
  stroke: #8AA7B6;
  stroke-width: 1.2;
}

.clock-wheel-empty {
  fill: #F7F9FB;
  stroke: #cfd8e3;
  stroke-width: 0.8;
}

.clock-wheel-segment {
  stroke: #012F46;
  stroke-width: 0.8;
  cursor: default;
}

.clock-wheel-segment:hover {
  filter: brightness(1.04);
  stroke-width: 1.6;
}

.clock-wheel-tick {
  stroke: #012F46;
  stroke-width: 0.9;
  opacity: 0.35;
}

.clock-wheel-hole {
  fill: #fff;
  stroke: #8AA7B6;
  stroke-width: 1;
}

.clock-wheel-label {
  fill: #0d2230;
  font-size: 7px;
  font-weight: 700;
  pointer-events: none;
}

.clock-wheel-center {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 34%;
  text-align: center;
  pointer-events: none;
}

.clock-wheel-center strong {
  color: #012F46;
  font-size: 18px;
  line-height: 1;
}

.clock-wheel-center span {
  color: #687482;
  font-size: 11px;
  line-height: 1.15;
}

.clock-wheel-meta {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
}

.clock-wheel-meta strong {
  color: #012F46;
  font-size: 17px;
}

.clock-wheel-meta span {
  color: #1f2933;
  font-weight: 700;
}

.clock-wheel-meta small {
  color: #687482;
  line-height: 1.35;
}

.clock-wheel-panel.overfull {
  border-color: #F29AAD;
  background: #FFF1F4;
}

.clock-wheel-panel.complete {
  border-color: #8AA7B6;
  background: #F2F6F8;
}


.clock-item {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 18px 58px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 5px;
  height: 24px;
  min-height: 24px;
  border: 1px solid #d9e0e7;
  border-radius: 5px;
  background: #fff;
  padding: 1px 4px;
}

.clock-item[draggable="true"] {
  cursor: grab;
}

.clock-item.dragging {
  opacity: 0.55;
}

.clock-item-start {
  color: #687482;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.clock-item-number {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #F2F6F8;
  color: #012F46;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.clock-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.1;
}

.clock-item strong small {
  display: inline;
  color: #687482;
  font-size: 11px;
  font-weight: 700;
  margin-left: 5px;
}

.clock-context-menu {
  position: fixed;
  z-index: 30;
  display: grid;
  gap: 4px;
  min-width: 210px;
  max-width: 280px;
  padding: 6px;
  border: 1px solid #b8c1cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(31, 41, 51, 0.18);
}

.clock-context-menu[hidden] {
  display: none;
}

.clock-context-menu button {
  width: 100%;
  border-radius: 6px;
  padding: 9px 10px;
  text-align: left;
}

.clock-context-menu button:hover {
  background: #F2F6F8;
}

.clock-context-menu .clock-context-color {
  border-left: 5px solid var(--clock-color, #ffffff);
}

.clock-block-context-menu .danger-text {
  border-color: #efb3b8;
  color: #b4232f;
}

.clock-block-context-menu .danger-text:hover {
  background: #fff0f1;
}

.playlist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 10px;
}

.playlist-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.playlist-row input {
  width: auto;
}

.playlist-row small {
  display: block;
  color: #687482;
  margin-top: 3px;
}

.row-actions {
  display: flex;
  gap: 5px;
}

.row-actions button {
  width: 34px;
  height: 32px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
}

.row-actions button:disabled {
  color: #9aa5b1;
  cursor: default;
}

.location-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding: 4px 2px 0;
  color: #687482;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.location-group-header:first-child {
  margin-top: 0;
}

.location-group-header.test {
  margin-top: 14px;
  border-top: 1px dashed #d9bf58;
  padding-top: 12px;
  color: #7a5f00;
}

.location-card {
  display: grid;
  gap: 0;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.location-card.test-location {
  border-color: #efd777;
  background: #fff9df;
}

.location-card.test-location .location-row {
  background: #fff9df;
}

.location-row {
  display: grid;
  grid-template-columns: 32px minmax(140px, 1.15fr) 64px 78px 66px minmax(118px, 0.9fr) 68px 76px minmax(120px, 0.9fr) 70px minmax(248px, 248px);
  gap: 8px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 14px;
}

.location-name-cell,
.location-name,
.location-id,
.location-version,
.location-now-playing,
.location-cache-count,
.location-folder-size,
.location-activity,
.power-state {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-name-cell {
  display: grid;
  gap: 2px;
}

.location-name-cell .location-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-complex {
  color: #506b7b;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-id {
  color: #3a4652;
  font-variant-numeric: tabular-nums;
}

.location-version,
.location-now-playing,
.location-cache-count,
.location-folder-size,
.location-activity {
  display: grid;
  gap: 1px;
}

.location-version span,
.location-now-playing span,
.location-cache-count span,
.location-folder-size span,
.location-activity span {
  color: #687482;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.location-version strong,
.location-now-playing strong,
.location-cache-count strong,
.location-folder-size strong,
.location-activity strong,
.location-activity em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}

.location-version strong,
.location-now-playing strong,
.location-cache-count strong,
.location-folder-size strong,
.location-activity strong {
  font-size: 13px;
}

.location-activity em {
  color: #687482;
  font-size: 12px;
  font-style: normal;
}

.location-activity.online strong {
  color: #012F46;
}

.location-activity.offline strong {
  color: #ED0A3A;
}

.power-state {
  color: #012F46;
  font-size: 13px;
}

.power-state.off {
  color: #ED0A3A;
}

.expand-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  padding: 0;
  line-height: 1;
}

.expand-button {
  font-size: 24px;
  transition: transform 0.15s ease;
}

.location-card.expanded .expand-button {
  transform: rotate(90deg);
}

.danger-icon {
  color: #ED0A3A;
}

.location-row .status {
  min-height: 22px;
  padding: 0 8px;
  font-size: 12px;
}

.location-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  overflow: hidden;
}

.location-actions button {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 13px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.location-actions .icon-button {
  width: 32px;
  padding: 0;
}

.point-playlist-row td {
  background: #F2F6F8;
}

.point-playlist {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  max-width: 100%;
  border: 1px solid #ccd4dd;
  border-radius: 8px;
  background: #fff;
  margin: 0 10px 10px 54px;
  padding: 12px;
  overflow-wrap: anywhere;
}

.schedule-editor-open {
  margin-left: auto;
}

.schedule-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #dce4eb;
}

.schedule-editor-toolbar {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-editor-toolbar > div:first-child {
  display: grid;
  gap: 2px;
  margin-right: auto;
}

.schedule-editor-toolbar small,
.schedule-editor-notice {
  color: #687482;
  font-size: 12px;
}

.schedule-editor-toolbar label {
  display: grid;
  gap: 4px;
  color: #526171;
  font-size: 11px;
  font-weight: 700;
}

.schedule-editor-toolbar input,
.schedule-editor-toolbar button,
.schedule-editor-toolbar select {
  min-height: 34px;
}

.schedule-source {
  align-self: center;
  border: 1px solid #bdc9d3;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f2f6f8;
  color: #435464;
  font-size: 12px;
  font-weight: 800;
}

.schedule-source.manual {
  border-color: #8dcdbb;
  background: #e9f8f1;
  color: #087455;
}

.schedule-editor-notice {
  border-radius: 7px;
  padding: 8px 10px;
  background: #f2f6f8;
}

.schedule-editor-layout {
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(620px, 1fr) minmax(240px, 280px);
  gap: 10px;
  min-width: 0;
  min-height: 470px;
}

.schedule-block-list,
.schedule-item-editor,
.schedule-media-picker {
  min-width: 0;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  background: #f8fafb;
}

.schedule-block-list {
  display: grid;
  align-content: start;
  gap: 4px;
  max-height: 680px;
  padding: 6px;
  overflow: auto;
}

.schedule-block-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 2px 8px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 7px 8px;
  background: transparent;
  color: #223446;
  text-align: left;
}

.schedule-block-card:hover {
  background: #edf3f6;
}

.schedule-block-card.active {
  border-color: #1f789c;
  background: #e4f2f7;
  box-shadow: inset 3px 0 #1f789c;
}

.schedule-block-card time {
  grid-row: 1 / span 2;
  color: #073b53;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  white-space: nowrap;
}

.schedule-block-card span {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  font-weight: 800;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.schedule-block-card small {
  overflow: hidden;
  color: #718090;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-item-editor {
  padding: 8px;
  overflow: hidden;
}

.schedule-block-properties {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px minmax(170px, 0.7fr);
  gap: 8px;
  margin-bottom: 8px;
}

.schedule-block-properties label {
  display: grid;
  gap: 4px;
  color: #526171;
  font-size: 11px;
  font-weight: 800;
}

.schedule-block-properties input,
.schedule-block-properties select,
.schedule-media-search input,
.schedule-media-search select {
  min-width: 0;
  min-height: 34px;
  border: 1px solid #c6d1da;
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
}

.schedule-item-table {
  max-height: 615px;
  border: 1px solid #d9e1e8;
  border-radius: 7px;
  overflow: auto;
  background: #fff;
}

.schedule-item-head,
.schedule-item-row {
  display: grid;
  grid-template-columns: 30px minmax(220px, 1fr) 76px 62px minmax(220px, 270px);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
}

.schedule-item-head {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid #cdd7df;
  background: #eaf0f4;
  color: #526171;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.schedule-item-row {
  border-bottom: 1px solid #edf1f4;
  font-size: 12px;
}

.schedule-item-row:hover {
  background: #f5fafc;
}

.schedule-item-row > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.schedule-item-row strong,
.schedule-item-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-item-row small {
  color: #7a8794;
}

.schedule-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.schedule-item-actions button {
  flex: 0 0 28px;
  min-width: 28px;
  min-height: 26px;
  padding: 2px 6px;
}

.schedule-item-actions select {
  flex: 1 1 150px;
  min-width: 0;
  max-width: none;
  min-height: 26px;
  padding: 2px 6px;
}

.schedule-media-picker {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 9px;
}

.schedule-media-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.schedule-media-search select {
  grid-column: 1 / -1;
}

.schedule-media-results {
  display: grid;
  align-content: start;
  gap: 3px;
  max-height: 380px;
  overflow: auto;
}

.schedule-media-results > button {
  display: grid;
  gap: 2px;
  border: 1px solid #dce3e9;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff;
  color: #203548;
  text-align: left;
}

.schedule-media-results > button:hover {
  border-color: #4d93ae;
  background: #edf7fa;
}

.schedule-media-results span,
.schedule-media-results small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-media-results small {
  color: #72808d;
}

.schedule-history {
  border-top: 1px solid #dce3e9;
  padding-top: 8px;
}

.schedule-history summary {
  cursor: pointer;
  color: #405568;
  font-size: 12px;
  font-weight: 800;
}

.schedule-history > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #edf1f4;
  font-size: 11px;
}

.schedule-history button {
  padding: 4px 7px;
}

.schedule-editor-empty {
  padding: 14px;
  color: #748290;
  text-align: center;
}

.schedule-editor-empty.error {
  border-radius: 7px;
  background: #fff0f2;
  color: #a6283d;
}

@media (max-width: 1180px) {
  .schedule-editor-layout {
    grid-template-columns: minmax(230px, 260px) minmax(560px, 1fr);
  }

  .schedule-media-picker {
    grid-column: 1 / -1;
  }

  .schedule-media-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 250px;
  }
}

@media (max-width: 780px) {
  .point-playlist {
    margin-left: 0;
  }

  .schedule-editor-layout {
    display: block;
  }

  .schedule-block-list {
    display: flex;
    max-height: none;
    margin-bottom: 8px;
    overflow-x: auto;
  }

  .schedule-block-card {
    flex: 0 0 190px;
  }

  .schedule-item-editor,
  .schedule-media-picker {
    margin-bottom: 8px;
  }

  .schedule-block-properties {
    grid-template-columns: 1fr;
  }

  .schedule-media-results {
    grid-template-columns: 1fr;
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 41, 51, 0.34);
}

.modal[hidden] {
  display: none;
}

.modal-dialog {
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  border: 1px solid #ccd4dd;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(31, 41, 51, 0.22);
}

.action-confirm-dialog {
  box-sizing: border-box;
  width: min(480px, 100%);
  border-color: #e5c8ce;
  border-radius: 14px;
  padding: 20px;
}

.action-confirm-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-confirm-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff0f3;
  color: #c52343;
  font-size: 22px;
  font-weight: 800;
}

.action-confirm-target {
  display: grid;
  gap: 4px;
  border: 1px solid #dce3e9;
  border-radius: 9px;
  padding: 12px 14px;
  background: #f7f9fa;
}

.action-confirm-target strong {
  color: #012f46;
  font-size: 16px;
}

.action-confirm-target span {
  color: #687482;
  font-size: 12px;
}

.action-confirm-warning {
  border-left: 3px solid #e05570;
  padding: 4px 0 4px 11px;
  color: #71404a;
  font-size: 13px;
  line-height: 1.4;
}

.modal-actions .danger-primary {
  min-height: 38px;
  border: 1px solid #d72b4d;
  border-radius: 7px;
  padding: 8px 15px;
  background: #d72b4d;
  color: #fff;
  font-weight: 700;
}

.modal-actions .danger-primary:hover {
  border-color: #b71f3d;
  background: #b71f3d;
}

.user-dialog {
  width: min(840px, 100%);
}

.user-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
}

.password-row .icon-button {
  width: 38px;
  height: 38px;
}

.location-test-toggle {
  width: 100%;
  border: 1px solid #d9bf58;
  border-radius: 7px;
  padding: 9px 12px;
  color: #7a5f00;
  background: #fff9df;
  font-weight: 700;
}

.location-test-toggle.active {
  border-color: #b99200;
  background: #ffeaa0;
  color: #4c3b00;
}

.location-volume-control {
  display: grid;
  gap: 8px;
  border: 1px solid #d8e0e8;
  border-radius: 7px;
  padding: 10px 12px;
  background: #f8fafc;
}

.location-volume-control[hidden] {
  display: none;
}

.location-volume-head,
.location-volume-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.location-volume-head span {
  font-weight: 700;
  color: #1f2933;
}

.location-volume-head strong {
  font-variant-numeric: tabular-nums;
  color: #0f766e;
}

.location-volume-control input[type="range"] {
  width: 100%;
  accent-color: #0f766e;
}

.location-volume-scale {
  color: #6b7280;
  font-size: 12px;
}

.role-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.role-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid #ccd4dd;
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
}

.role-choice input {
  width: auto;
}

.users-table,
.permission-matrix {
  overflow: auto;
}

.users-table table,
.permission-matrix table {
  min-width: 1100px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.role-pill,
.client-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 12px;
  padding: 0 8px;
  font-size: 12px;
}

.role-pill {
  background: #fde9ef;
  color: #b4234d;
}

.client-pill {
  background: #eef3f6;
  color: #233848;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-actions .secondary {
  margin-bottom: 0;
}

.permission-matrix th,
.permission-matrix td {
  min-width: 138px;
}

.permission-matrix th:first-child,
.permission-matrix td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 320px;
  background: #fff;
}

.permission-matrix td:first-child small {
  display: block;
  max-width: 340px;
  margin-top: 5px;
  color: #687482;
  line-height: 1.35;
}

.permission-toggle {
  min-width: 64px;
  border: 1px solid;
  border-radius: 14px;
  padding: 8px 14px;
  font-weight: 700;
}

.permission-toggle.yes {
  border-color: #8AA7B6;
  background: #E8F0F4;
  color: #012F46;
}

.permission-toggle.no {
  border-color: #efbec8;
  background: #fde8ed;
  color: #b4234d;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-actions {
  justify-content: flex-end;
}

.point-playlist-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.point-playlist-head small {
  color: #687482;
}

.now-grid,
.playlist-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.now-grid > div,
.playlist-columns > div {
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 10px;
}

.now-grid strong,
.now-grid span,
.playlist-columns strong {
  display: block;
}

.now-grid span {
  color: #3a4652;
  margin-top: 5px;
}

.playlist-columns ol {
  margin: 8px 0 0;
  padding-left: 20px;
}

.playlist-columns li {
  margin-bottom: 5px;
  color: #3a4652;
}

.playback-history {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #e3e8ee;
}

.playback-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.playback-history-head > div {
  display: grid;
  gap: 4px;
}

.playback-history-head strong {
  font-size: 17px;
}

.playback-history-head small,
.playback-history-table small {
  color: #687482;
}

.playback-history-head .link-button {
  flex: 0 0 auto;
}

.playback-history-controls {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(110px, 140px) minmax(110px, 140px) auto;
  gap: 10px;
  align-items: end;
}

.playback-history-controls label {
  display: grid;
  gap: 6px;
}

.playback-history-controls input,
.playback-history-controls button {
  min-height: 40px;
  margin: 0;
}

.playback-history-controls button {
  justify-self: start;
  min-width: 110px;
}

.playback-history-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
}

.playback-history-table {
  width: 100%;
  min-width: 620px;
}

.playback-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #F2F6F8;
}

.playback-history-table th,
.playback-history-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.playback-history-table th:first-child,
.playback-history-table td:first-child {
  width: 110px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.playback-history-table th:last-child,
.playback-history-table td:last-child {
  width: 190px;
}

.playback-history-table td strong,
.playback-history-table td small,
.playback-history-table td span {
  display: block;
}

.playback-history-table td small {
  margin-top: 3px;
}

.playback-history-empty {
  padding: 22px;
  border: 1px dashed #ccd4dd;
  border-radius: 10px;
  color: #687482;
  text-align: center;
}

.playback-history-empty.error {
  border-color: #F29AAD;
  color: #ED0A3A;
}

@media (max-width: 720px) {
  .playback-history-head {
    align-items: stretch;
    flex-direction: column;
  }

  .playback-history-head .link-button {
    align-self: flex-start;
  }

  .playback-history-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playback-history-controls label:first-child,
  .playback-history-controls button {
    grid-column: 1 / -1;
  }

  .playback-history-controls button {
    width: 100%;
  }

  .playback-history-table {
    min-width: 0;
  }

  .playback-history-table thead {
    display: none;
  }

  .playback-history-table tbody {
    display: grid;
  }

  .playback-history-table tr {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 12px;
    border-bottom: 1px solid #e3e8ee;
  }

  .playback-history-table tr:last-child {
    border-bottom: 0;
  }

  .playback-history-table td,
  .playback-history-table td:first-child,
  .playback-history-table td:last-child {
    width: auto;
    padding: 0;
    border: 0;
  }

  .playback-history-table td:first-child {
    grid-row: 1 / span 2;
  }

  .playback-history-table td:last-child {
    grid-column: 2;
    margin-top: 4px;
  }
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.category-card {
  border: 1px solid #ccd4dd;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.category-card strong,
.category-card span {
  display: block;
}

.category-card span {
  color: #687482;
  margin-top: 5px;
  font-size: 13px;
}

.card {
  border: 1px solid #ccd4dd;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.card p {
  color: #687482;
  margin-top: 4px;
}

.media-browser {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 560px;
  border: 1px solid #ccd4dd;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.media-sidebar {
  display: grid;
  align-content: start;
  gap: 4px;
  border-right: 1px solid #e3e8ee;
  background: #f8fafc;
  padding: 10px;
}

.media-roots {
  display: grid;
  gap: 4px;
}

.media-kind {
  border-radius: 7px;
  padding: 10px 12px;
  text-align: left;
  background: transparent;
}

.media-kind.archive-kind {
  border: 1px solid #d2b36a;
  background: #fff8e3;
  color: #5f4700;
  font-weight: 700;
  margin-bottom: 8px;
}

.media-kind.trash-kind {
  border: 1px solid #c6ccd4;
  background: #f1f3f5;
  color: #3a4652;
  font-weight: 700;
  margin-top: 8px;
}

.media-kind.active,
.media-kind:hover {
  background: #E8F0F4;
  color: #012F46;
}

.media-kind.active {
  box-shadow: inset 4px 0 0 #012F46, inset 0 0 0 1px #8AA7B6;
  font-weight: 800;
}

.media-kind.archive-kind.active,
.media-kind.archive-kind:hover {
  background: #fff0ba;
  color: #4c3900;
}

.media-kind.trash-kind.active,
.media-kind.trash-kind:hover {
  background: #e4e8ed;
  color: #1f2933;
}

.rotation-rules-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(520px, 1.5fr);
  gap: 16px;
  align-items: start;
}

.rotation-rule-list,
.rotation-source-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.rotation-rule-row {
  display: grid;
  gap: 4px;
  border: 1px solid #d9e0e7;
  border-radius: 8px;
  padding: 11px;
  text-align: left;
}

.rotation-rule-row.selected {
  border-color: #012F46;
  background: #F2F6F8;
}

.rotation-rule-row span,
.rotation-source-row small {
  color: #687482;
  font-size: 13px;
}

.rotation-window-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rotation-assigned-rules {
  display: grid;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.rotation-rule-table-head,
.rotation-rule-param-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
}

.rotation-rule-table-head {
  background: #f2f4f6;
  color: #3a4652;
  font-size: 13px;
  font-weight: 700;
}

.rotation-rule-table-head span,
.rotation-rule-param-row span {
  min-width: 0;
  padding: 8px 10px;
  border-right: 1px solid #d4dbe3;
}

.rotation-rule-table-head span:last-child {
  border-right: 0;
}

.rotation-rule-param-row {
  gap: 0;
  border-top: 1px solid #d4dbe3;
  color: #1f2933;
  font-size: 14px;
}

.rotation-rule-param-row input {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 0;
  padding: 0 10px;
  font: inherit;
}

.rotation-transition-settings {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #d9e0e7;
  border-radius: 10px;
  background: #f8fafb;
}

.rotation-transition-head,
.rotation-transition-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rotation-transition-head p,
.rotation-transition-settings details p {
  margin: 4px 0 0;
}

.rotation-transition-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rotation-transition-options label {
  display: grid;
  gap: 5px;
  color: #425466;
  font-size: 13px;
  font-weight: 700;
}

.rotation-transition-settings details {
  border-top: 1px solid #d9e0e7;
  padding-top: 10px;
}

.rotation-transition-settings summary {
  cursor: pointer;
  color: #012f46;
  font-weight: 800;
}

.rotation-transition-subhead {
  margin-top: 10px;
}

.rotation-key-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin-top: 10px;
}

.rotation-key-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.rotation-key-row input {
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  font-size: 13px;
}

.rotation-tempo-bands {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.rotation-tempo-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 90px 90px minmax(180px, 1.4fr);
  align-items: end;
  gap: 8px;
}

.rotation-tempo-row label {
  display: grid;
  gap: 3px;
  color: #687482;
  font-size: 12px;
}

.rotation-tempo-row input,
.rotation-tempo-row select {
  width: 100%;
  min-height: 36px;
  padding: 5px 8px;
}

.rotation-tempo-row select {
  min-height: 78px;
}

@media (max-width: 980px) {
  .rotation-transition-options,
  .rotation-key-matrix {
    grid-template-columns: 1fr;
  }

  .rotation-tempo-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.rotation-source-list {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 8px;
}

.rotation-source-list[hidden] {
  display: none;
}

.rotation-source-note,
.field-hint {
  color: #687482;
  font-size: 13px;
  line-height: 1.35;
}

.rotation-source-note {
  margin: 6px 0 8px;
}

.rotation-source-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid #edf1f5;
  border-radius: 7px;
  padding: 9px;
}

.rotation-source-row.disabled {
  opacity: 0.58;
}

.rotation-source-row strong,
.rotation-source-row small {
  display: block;
}

#mediaNewFolderSide {
  margin-top: 10px;
  width: 100%;
}


.media-tree {
  display: grid;
  gap: 3px;
}

.media-tree-item {
  display: grid;
  gap: 2px;
}

.media-tree-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding-left: calc(var(--level, 0) * 15px);
  border-radius: 7px;
}

.media-tree-row.active {
  background: #E8F0F4;
  box-shadow: inset 4px 0 0 #012F46, inset 0 0 0 1px #8AA7B6;
}

.media-tree-row.folder-labeled.active {
  background: rgba(var(--folder-label-rgb), 0.22);
  box-shadow: inset 4px 0 0 var(--folder-label-color), inset 0 0 0 1px rgba(var(--folder-label-rgb), 0.52);
}

.media-tree-row.active .media-tree-toggle,
.media-tree-row.active .media-tree-label {
  color: #012F46;
  font-weight: 800;
}

.media-tree-row.drop-target {
  background: #E8F0F4;
  box-shadow: inset 0 0 0 2px #012F46;
}

.media-tree-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #496172;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.media-tree-toggle:hover {
  color: #012F46;
}

.media-tree-label {
  min-width: 0;
  width: 100%;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-tree-empty {
  padding: 4px 8px 6px calc(22px + var(--level, 0) * 14px);
  color: #8a96a3;
  font-size: 12px;
}

.media-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
}

.media-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e3e8ee;
  padding: 12px;
}

.media-toolbar .actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  overflow-x: visible;
  padding-bottom: 0;
}

.media-toolbar > div:first-child {
  min-width: 190px;
}

.media-search {
  display: grid;
  gap: 4px;
  flex: 1 1 260px;
  max-width: 380px;
  min-width: 220px;
}

.media-search span {
  color: #687482;
  font-size: 12px;
  font-weight: 700;
}

.media-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  padding: 8px 11px;
  background: #fff;
}

.media-search input:focus {
  border-color: #012F46;
  box-shadow: 0 0 0 3px rgba(1, 47, 70, 0.12);
  outline: none;
}


.media-filterbar {
  display: flex;
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid #e3e8ee;
  padding: 8px 12px 10px;
  background: #F2F6F8;
  overflow: hidden;
}

.media-search-toggle {
  flex: 0 0 auto;
  align-self: end;
  width: 38px;
  min-width: 38px;
  height: 38px;
  margin-top: 20px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.media-search {
  display: grid;
  gap: 4px;
  flex: 0 0 0;
  min-width: 0;
  max-width: 0;
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
  transition: flex-basis 180ms ease, max-width 180ms ease, opacity 160ms ease, transform 180ms ease;
}

.media-filterbar.search-open .media-search {
  flex-basis: calc(100% - 48px);
  max-width: calc(100% - 48px);
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.media-filter-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 160ms ease, transform 180ms ease, max-width 180ms ease;
}

.media-filter-controls > button {
  align-self: end;
  min-height: 38px;
  margin-top: 20px;
}

.media-filterbar.search-open .media-filter-controls {
  max-width: 0;
  opacity: 0;
  transform: translateX(12px);
  pointer-events: none;
  overflow: hidden;
}

.media-filter-field {
  display: grid;
  grid-template-rows: 16px 38px;
  align-items: end;
  gap: 4px;
  min-width: 118px;
}

.media-filter-field span,
.media-pages span,
.media-search span {
  color: #687482;
  font-size: 12px;
  font-weight: 700;
}

.media-search input,
.media-filter-field input,
.media-filter-field select {
  width: 100%;
  height: 38px;
  min-height: 38px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  background: #fff;
  padding: 8px 10px;
  line-height: 20px;
}

.media-search input:focus,
.media-filter-field input:focus,
.media-filter-field select:focus {
  border-color: #012F46;
  box-shadow: 0 0 0 3px rgba(1, 47, 70, 0.12);
  outline: none;
}

.media-pages {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e3e8ee;
  padding: 9px 12px;
  background: #fff;
}

.media-pages .icon-only {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.media-toolbar .actions button {
  flex: 0 0 auto;
  margin-bottom: 0;
  white-space: nowrap;
}

.media-toolbar .icon-only {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.media-toolbar .text-icon {
  width: 54px;
  min-width: 54px;
  font-size: 13px;
  font-weight: 700;
}

.media-toolbar .wide-icon {
  font-size: 22px;
}

.media-upload-button {
  min-height: 38px;
  border: 1px solid #012F46;
  border-radius: 7px;
  background: #012F46;
  color: #fff;
  padding: 0 16px;
}

.media-upload-button.dragging {
  background: #ED0A3A;
  border-color: #ED0A3A;
  box-shadow: 0 0 0 3px rgba(237, 10, 58, 0.18);
}

.media-upload-button:disabled {
  border-color: #b8c1cc;
  background: #e5ebf0;
  color: #687482;
}

.media-toolbar strong,
.media-toolbar span {
  display: block;
}

.media-dropzone {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  background: #fff;
}

.media-dropzone.dragging {
  box-shadow: inset 0 0 0 3px rgba(1, 47, 70, 0.24);
  background: #F2F6F8;
}

.media-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  border-bottom: 1px solid #eef2f5;
  padding: 8px 12px;
  color: #687482;
}

.media-breadcrumbs button {
  border-radius: 6px;
  padding: 4px 7px;
  color: #012F46;
}

.media-list {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow: auto;
  outline: none;
}

.media-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--media-columns, 28px minmax(320px, 1fr) 72px 58px 70px 76px 70px 104px 92px 92px);
  gap: 10px;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px solid #dbe2ea;
  padding: 0 12px;
  background: #f8fafc;
}

.media-table-head button {
  min-width: 0;
  border: 0;
  padding: 0;
  color: #556273;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-table-head button:hover,
.media-table-head button.active {
  color: #012F46;
}

.media-table-head button span {
  margin-left: 4px;
}

.media-row {
  display: grid;
  grid-template-columns: var(--media-columns, 28px minmax(320px, 1fr) 72px 58px 70px 76px 70px 104px 92px 92px);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid #eef2f5;
  padding: 0 12px;
  text-align: left;
}

.media-row:hover {
  background: #f8fafc;
}

.media-row.selected {
  background: #F2F6F8;
  box-shadow: inset 3px 0 0 #012F46;
}

.media-row.folder.folder-labeled.selected {
  background: rgba(var(--folder-label-rgb), 0.22);
  box-shadow: inset 4px 0 0 var(--folder-label-color), inset 0 0 0 1px rgba(var(--folder-label-rgb), 0.5);
}

.media-row.drop-target {
  background: #E8F0F4;
  box-shadow: inset 0 0 0 2px #012F46;
}

.media-icon,
.media-duration,
.media-bpm,
.media-camelot,
.media-key,
.media-size,
.media-uploader,
.media-date,
.media-modified {
  color: #687482;
  font-size: 13px;
}

.media-camelot,
.media-key,
.media-uploader,
.media-date,
.media-modified,
.media-size,
.media-duration,
.media-bpm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-icon {
  position: relative;
  width: 18px;
  height: 18px;
}

.media-row.folder .media-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 5px;
  width: 16px;
  height: 11px;
  border-radius: 2px;
  background: #8AA7B6;
}

.media-row.folder .media-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 8px;
  height: 5px;
  border-radius: 2px 2px 0 0;
  background: #8AA7B6;
}

.media-row.access-restricted .media-name::after {
  content: " / access";
  color: #9a6a13;
  font-size: 12px;
  font-weight: 700;
}

.media-row.file .media-icon::before {
  content: "\266A";
  position: absolute;
  left: 2px;
  top: -1px;
  color: #687482;
  font-size: 18px;
  line-height: 18px;
}

.media-row.search-result {
  min-height: 52px;
}

.media-name {
  min-width: 0;
  font-size: 13px;
  color: #1f2933;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-row.search-result .media-name {
  display: grid;
  gap: 2px;
}

.media-row.search-result .media-name small {
  min-width: 0;
  color: #687482;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-empty {
  padding: 28px 12px;
  color: #687482;
  text-align: center;
}

.media-upload-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: grid;
  gap: 10px;
  width: min(430px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 44px));
  border: 1px solid #b8c1cc;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 20px 58px rgba(31, 41, 51, 0.22);
}

.media-upload-panel[hidden] {
  display: none;
}

.media-upload-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.media-upload-head strong,
.media-upload-head span {
  display: block;
  min-width: 0;
}

.media-upload-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.media-upload-actions .secondary {
  margin-bottom: 0;
  padding: 8px 10px;
}

.media-upload-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 7px;
  background: #e5ebf0;
}

.media-upload-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #012F46;
  transition: width 0.16s ease;
}

.media-upload-list {
  display: grid;
  gap: 4px;
  overflow: auto;
  padding-right: 2px;
}

.media-upload-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(86px, auto);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid #edf1f5;
  border-radius: 7px;
  padding: 6px 8px;
  background: #fbfcfd;
}

.media-upload-row.done {
  border-color: #8AA7B6;
  background: #F2F6F8;
}

.media-upload-row.failed {
  border-color: #f1c0c9;
  background: #fff5f7;
}

.media-upload-row.cancelled {
  opacity: 0.72;
}

.media-upload-status {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e5ebf0;
  color: #496172;
  font-size: 11px;
  font-weight: 700;
}

.media-upload-row.uploading .media-upload-status {
  border: 2px solid #cbd6df;
  border-top-color: #012F46;
  background: transparent;
  animation: media-upload-spin 0.9s linear infinite;
}

.media-upload-row.done .media-upload-status {
  background: #012F46;
  color: #fff;
}

.media-upload-row.failed .media-upload-status {
  background: #b4234d;
  color: #fff;
}

.media-upload-name,
.media-upload-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-upload-name {
  color: #1f2933;
  font-weight: 700;
}

.media-upload-meta {
  color: #687482;
  font-size: 12px;
  text-align: right;
}

.media-upload-row.failed .media-upload-meta,
.media-upload-scan-error {
  color: #ED0A3A;
}

.media-upload-scan-error {
  border: 1px solid #f1c0c9;
  border-radius: 7px;
  background: #fff5f7;
  padding: 8px;
  font-size: 13px;
}

@keyframes media-upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.media-player-dialog {
  width: min(680px, 100%);
}

.media-name-dialog {
  width: min(480px, 100%);
}

.media-access-dialog {
  width: min(620px, 100%);
}

.media-access-help {
  color: #687482;
  font-size: 13px;
}

.media-access-users {
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 8px;
  background: #f8fafc;
}

.media-access-user {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  padding: 8px;
}

.media-access-user:hover {
  background: #F2F6F8;
}

.media-access-user input {
  width: auto;
}

.media-access-user span,
.media-access-user strong,
.media-access-user small {
  display: block;
  min-width: 0;
}

.media-access-user small {
  color: #687482;
}

.media-player-dialog {
  width: min(680px, 100%);
}

.media-player-body video {
  display: block;
  width: 100%;
  max-height: 70vh;
}

.custom-audio-player {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid #d7dfe7;
  border-radius: 8px;
  background: linear-gradient(135deg, #F2F6F8 0%, #fff 58%, #FFF1F4 100%);
}

.custom-audio-player audio {
  display: none;
}

.custom-player-visual {
  --progress: 0deg;
  display: grid;
  place-items: center;
  width: 132px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#ED0A3A var(--progress), #E8F0F4 0deg);
  box-shadow: 0 14px 28px rgba(1, 47, 70, 0.18);
}

.custom-player-toggle {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  background: #012F46;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.custom-player-toggle:hover {
  background: #0A405D;
}

.custom-player-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.custom-player-track {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.custom-player-track strong,
.custom-player-track span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-player-track strong {
  color: #17212b;
  font-size: 18px;
}

.custom-player-track span,
.custom-player-footer {
  color: #687482;
  font-size: 13px;
}

.custom-player-seek {
  width: 100%;
  accent-color: #ED0A3A;
}

.custom-player-footer {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
}

.custom-player-footer span:last-child {
  text-align: right;
}

.custom-player-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.custom-player-controls button {
  min-width: 54px;
  padding: 7px 10px;
}

.tap-tempo-panel {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d7dfe7;
  border-radius: 8px;
  background: #F2F6F8;
}

.tap-tempo-button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  padding: 0;
  background: #012F46;
  color: #fff;
  box-shadow: 0 6px 16px rgba(1, 47, 70, 0.2);
}

.tap-tempo-button strong {
  font-size: 24px;
  line-height: 1;
}

.tap-tempo-button span {
  font-size: 12px;
  opacity: 0.86;
}

.tap-tempo-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tap-tempo-meta span {
  color: #687482;
  font-size: 13px;
}

.media-player-error {
  margin: 12px 0 0;
  color: #a3332d;
  font-size: 13px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.checkbox-line input {
  width: auto;
}

.media-info-readonly {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 12px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.media-info-readonly span {
  color: #687482;
}

.media-info-readonly strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inline-bpm-input {
  width: 120px;
  min-height: 32px;
  padding: 5px 8px;
}

.inline-bpm-input.invalid {
  border-color: #b4234d;
  box-shadow: 0 0 0 2px rgba(180, 35, 77, 0.1);
}

.inline-bpm-input.saving {
  opacity: 0.65;
}

.inline-bpm-input.saved {
  border-color: #012F46;
}

.audio-analysis-readonly {
  background: #F2F6F8;
}

.media-context-menu {
  position: fixed;
  z-index: 60;
  display: grid;
  gap: 4px;
  min-width: 190px;
  max-width: min(260px, calc(100vw - 16px));
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #b8c1cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(31, 41, 51, 0.18);
}

.media-context-menu[hidden] {
  display: none;
}

.media-context-menu button {
  width: 100%;
  border-radius: 6px;
  padding: 9px 10px;
  text-align: left;
}

.media-context-menu button:hover {
  background: #F2F6F8;
}

.media-folder-color-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 7px;
  align-items: center;
  border-top: 1px solid #e3e8ee;
  margin-top: 4px;
  padding: 8px 4px 3px;
  overflow: hidden;
}

.media-folder-color-title {
  grid-column: 1 / -1;
  color: #687482;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.media-folder-color-swatches {
  display: grid;
  grid-template-columns: repeat(6, 22px);
  gap: 5px;
  min-width: 0;
}

.media-folder-color-swatches button {
  width: 22px;
  min-width: 22px;
  height: 22px;
  border: 1px solid rgba(31, 41, 51, 0.22);
  border-radius: 999px;
  padding: 0;
  background: var(--swatch-color);
}

.media-folder-color-swatches button.active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #012F46;
}

.media-folder-color-custom {
  grid-column: 1;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #3a4652;
  font-size: 13px;
}

.media-folder-color-custom input[type="color"] {
  width: 34px;
  height: 30px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  padding: 2px;
  background: #fff;
}

.media-folder-color-clear {
  grid-column: 2;
  width: 68px;
  min-width: 68px;
  height: 30px;
  padding: 0;
  text-align: center;
  font-size: 12px;
}

code {
  font-family: Consolas, monospace;
}

@media (max-width: 1320px) {
  .analytics-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clock-layout {
    grid-template-columns: 1fr;
  }

  .hour-schedule {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .location-row {
    grid-template-columns: 34px minmax(180px, 1fr) 82px 92px 100px;
  }

  .location-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .topbar,
  .grid,
  .clock-layout,
  .window-grid,
  .contact-form,
  .user-form-grid,
  .now-grid,
  .playlist-columns,
  .hour-schedule,
  .watermark-grid,
  .watermark-file-status,
  .watermark-status-grid,
  .analytics-columns,
  .media-browser {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analytics-cards {
    grid-template-columns: 1fr;
  }

  .heat-row {
    grid-template-columns: 1fr;
  }

  .heat-row em {
    text-align: left;
  }

  .brand img {
    width: 112px;
  }

  .account-menu {
    justify-content: space-between;
    width: 100%;
    min-width: 0;
  }

  .account-copy {
    text-align: left;
  }

  .account-copy strong {
    max-width: calc(100vw - 96px);
  }

  .media-sidebar {
    display: flex;
    border-right: 0;
    border-bottom: 1px solid #e3e8ee;
    overflow-x: auto;
  }

  .media-table-head,
  .media-row {
    grid-template-columns: 28px minmax(120px, 1fr) 76px;
  }

  .tap-tempo-panel {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .tap-tempo-panel button:not(.tap-tempo-button) {
    grid-column: 1 / -1;
  }

  .media-table-head button:nth-of-type(n + 3) {
    display: none;
  }

  .media-upload-panel {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
    max-height: min(480px, calc(100vh - 20px));
  }

  .media-upload-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .media-upload-meta {
    grid-column: 2;
    text-align: left;
  }

  .media-size,
  .media-bpm,
  .media-camelot,
  .media-key,
  .media-uploader,
  .media-date,
  .media-modified {
    display: none;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tab {
    border-right: 0;
    border-bottom: 1px solid #b8c1cc;
  }

  .location-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .location-row .status,
  .location-id,
  .location-version,
  .location-now-playing,
  .location-cache-count,
  .location-folder-size,
  .location-activity,
  .power-state,
  .location-actions {
    grid-column: 2;
  }

  .location-actions {
    align-items: stretch;
  }

  .location-actions button {
    width: 100%;
  }

  .point-playlist {
    margin-left: 10px;
  }
}

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.campaign-grid label,
.ad-window-row label {
  display: grid;
  gap: 6px;
  color: #687482;
  font-size: 13px;
}

.campaign-grid input,
.campaign-grid select,
.ad-window-row input {
  min-height: 38px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  padding: 0 10px;
  font: inherit;
  color: #1f2933;
}

.campaign-locations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.location-picker {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid #ccd4dd;
  border-radius: 7px;
  padding: 10px;
  text-align: left;
}

.location-picker span,
.campaign-card small,
.campaign-slot-table small {
  color: #687482;
  font-size: 12px;
}

.location-picker.selected,
.slot-toggle.selected {
  border-color: #012F46;
  background: #F2F6F8;
  color: #012F46;
}

.campaign-upload {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 92px;
  margin-top: 14px;
  border: 2px dashed #b8c1cc;
  border-radius: 8px;
  background: #f8fafb;
  cursor: pointer;
}

.campaign-upload.dragging {
  border-color: #012F46;
  background: #F2F6F8;
}

.campaign-slots {
  margin-top: 14px;
  overflow: auto;
}

.campaign-slot-table {
  width: max-content;
  min-width: 520px;
  border-collapse: collapse;
  border: 1px solid #d5dde7;
  table-layout: fixed;
}

.campaign-slot-table th:first-child,
.campaign-slot-table td:first-child {
  width: 72px;
}

.campaign-slot-table th,
.campaign-slot-table td {
  min-width: 46px;
  border: 1px solid #d5dde7;
  text-align: center;
  padding: 0;
  height: 30px;
}

.campaign-slot-table th {
  background: #f8fafb;
  color: #5c6675;
  font-weight: 700;
}

.campaign-slot-table th small {
  display: block;
  margin-top: 3px;
}

.slot-toggle {
  width: 100%;
  height: 30px;
  border: 0;
  border-radius: 0;
  background: #fff;
  display: grid;
  place-items: center;
}

.slot-toggle span {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: transparent;
}

.slot-toggle.selected {
  background: #f8dce2;
}

.slot-toggle.selected span {
  background: #f50b3f;
  box-shadow: 0 0 0 2px #ff6b88;
}

.campaign-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.campaign-ad-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.campaign-ad-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #e3e8ee;
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
}

.campaign-ad-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-slot-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.campaign-slot-templates button {
  min-height: 32px;
  padding: 0 10px;
}

.campaign-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e3e8ee;
  border-radius: 7px;
  padding: 10px;
}

.campaign-card > div:first-child {
  display: grid;
  gap: 4px;
  align-self: center;
}

.campaign-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
}

.campaign-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-height: 36px;
  margin-bottom: 0;
}

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

.ad-window-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) minmax(130px, 170px) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #d8e0e7;
  border-radius: 10px;
  background: #f8fafb;
}

.ad-window-hours {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(24, minmax(30px, 1fr));
  gap: 3px;
}

.ad-window-hour {
  display: grid !important;
  place-items: center;
  min-height: 30px;
  border: 1px solid #ccd4dd;
  border-radius: 5px;
  background: #fff;
  color: #657685 !important;
  cursor: pointer;
}

.ad-window-hour input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ad-window-hour.selected {
  border-color: #0a5977;
  background: #dceef5;
  color: #012f46 !important;
}

.ad-hour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}

.ad-hour {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid #ccd4dd;
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  color: #1f2933;
  font-weight: 700;
  cursor: pointer;
}

.ad-hour input {
  width: 16px;
  height: 16px;
}

.ad-hour.selected {
  border-color: #012F46;
  background: #F2F6F8;
  color: #012F46;
}

@media (max-width: 700px) {
  .ad-window-row {
    grid-template-columns: 1fr;
  }

  .ad-window-hours {
    grid-template-columns: repeat(8, 1fr);
  }

  .campaign-card {
    grid-template-columns: 1fr;
  }

  .campaign-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.playback-warning {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #f2b8a0;
  border-radius: 6px;
  background: #fff4ef;
  color: #8a2d12;
  font-size: 13px;
  line-height: 1.35;
}

.playback-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.playback-metrics span {
  padding: 5px 8px;
  border: 1px solid var(--border-color, #d9dee7);
  border-radius: 6px;
  background: #f8fafc;
  font-size: 12px;
  color: #465264;
}

.playlist-columns.compact {
  margin-top: 10px;
}


@media (max-width: 720px) {
  .custom-audio-player {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .custom-player-main {
    width: 100%;
  }
}


/* 20260612 media search responsive */
@media (max-width: 960px) {
  .media-toolbar {
    flex-wrap: wrap;
  }

  .media-search {
    flex-basis: 100%;
    max-width: none;
    min-width: 0;
    order: 3;
  }
}

/* 20260612 media filter alignment guard
   Keep media filter controls on one visual baseline. Do not replace this with
   older toolbar CSS from local copies: /opt/store-playout/server is the source of truth. */
.media-filterbar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: end;
  column-gap: 10px;
  row-gap: 0;
  min-height: 66px;
}

.media-filterbar.search-open {
  grid-template-columns: 38px minmax(0, 1fr);
}

.media-filter-controls {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: end;
  justify-content: start;
  gap: 10px;
  min-width: 0;
  height: 58px;
}

.media-filterbar.search-open .media-filter-controls {
  max-width: 0;
  width: 0;
}

.media-filter-field {
  display: grid;
  grid-template-rows: 16px 38px;
  align-items: stretch;
  gap: 4px;
  height: 58px;
  min-width: 118px;
}

.media-filter-field span,
.media-search span {
  display: flex;
  align-items: flex-start;
  height: 16px;
  line-height: 14px;
}

.media-search {
  align-self: end;
  height: 58px;
}

.media-filterbar.search-open .media-search {
  flex-basis: auto;
  max-width: none;
}

.media-search-toggle,
.media-filter-controls > button,
.media-filter-field input,
.media-filter-field select,
.media-search input {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
}

.media-search-toggle,
.media-filter-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}

.media-search-toggle {
  grid-column: 1;
}

.media-filter-controls,
.media-search {
  grid-column: 2;
}

.media-filter-controls > button {
  padding-top: 0;
  padding-bottom: 0;
}

/* 20260612 point clock scope */
#clockScopeSelect {
  min-width: 220px;
}

#resetPointClockScope {
  white-space: nowrap;
}

/* 20260612 media browser polish: compact tree, color menu, filter alignment */
.media-sidebar {
  gap: 3px;
  padding: 8px 6px;
}

.media-roots,
.media-tree,
.media-tree-item {
  gap: 1px;
}

.media-tree-row {
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 3px;
  min-height: 28px;
  padding-left: calc(var(--level, 0) * 12px);
  border-radius: 6px;
}

.media-tree-toggle {
  width: 22px;
  min-width: 22px;
  height: 28px;
  font-size: 13px;
}

.media-kind,
.media-tree-label {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 14px;
  line-height: 18px;
}

.media-kind.archive-kind,
.media-kind.trash-kind {
  margin-top: 5px;
  margin-bottom: 4px;
}

#mediaNewFolderSide {
  min-height: 34px;
  margin-top: 8px;
  padding: 0 10px;
}

.media-context-menu {
  min-width: 230px;
  max-width: min(250px, calc(100vw - 16px));
  overflow-x: hidden;
}

.media-context-menu > button {
  min-height: 34px;
  padding: 7px 10px;
}

.media-filterbar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  min-height: 86px;
  padding: 12px;
  overflow: visible;
}

.media-filter-controls {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: end;
  justify-content: start;
  gap: 10px;
  height: 58px;
  min-width: 0;
}

.media-filter-field {
  display: grid;
  grid-template-rows: 16px 38px;
  gap: 4px;
  align-items: stretch;
  height: 58px;
  min-width: 136px;
}

.media-filter-field:first-child {
  min-width: 118px;
}

.media-filter-field span,
.media-search span {
  display: flex;
  align-items: flex-start;
  height: 16px;
  line-height: 14px;
}

.media-search-toggle,
.media-filter-controls > button,
.media-filter-field input,
.media-filter-field select,
.media-search input {
  box-sizing: border-box;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  margin: 0;
}

.media-search-toggle,
.media-filter-controls > button {
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.media-search-toggle {
  grid-column: 1;
  grid-row: 1;
}

.media-filter-controls,
.media-search {
  grid-column: 2;
  grid-row: 1;
}

.media-search {
  align-self: end;
  height: 58px;
}

.media-filterbar.search-open .media-search {
  flex-basis: auto;
  max-width: none;
}

.media-filterbar.search-open .media-filter-controls {
  max-width: 0;
  width: 0;
}





.credentials-economy-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.credentials-economy-block h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.credentials-economy-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.credentials-economy-features {
  display: grid;
  gap: 8px;
}
.credentials-economy-feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
.credentials-economy-feature small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}
.credentials-economy-feature.disabled {
  opacity: .62;
  background: #f8fafc;
}
@media (max-width: 720px) {
  .credentials-economy-dates { grid-template-columns: 1fr; }
}

/* 20260618 client economy */
.economy-summary-panel .panel-title-row { align-items: center; }
.economy-title-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 12px;
}
.economy-period-fields {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.economy-period-fields .inline-field { min-width: 150px; }
.economy-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.economy-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.economy-metrics span,
.economy-tariff-row label span,
.economy-point-row label span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.economy-metrics strong { display: block; font-size: 18px; }
.economy-result-table th,
.economy-result-table td { vertical-align: top; }
.economy-invoice-table th:first-child,
.economy-invoice-table td:first-child {
  width: 56px;
  text-align: center;
}
.economy-invoice-table th:nth-child(3),
.economy-invoice-table td:nth-child(3),
.economy-invoice-table th:nth-child(5),
.economy-invoice-table td:nth-child(5),
.economy-invoice-table th:last-child,
.economy-invoice-table td:last-child {
  width: 128px;
  text-align: right;
}
.economy-invoice-table th:nth-child(4),
.economy-invoice-table td:nth-child(4) { width: 92px; }
.economy-invoice-table td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.25;
}
.economy-tariff-head,
.economy-tariff-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(280px, 2fr) minmax(105px, .65fr) minmax(160px, 1.05fr) minmax(170px, 1.05fr) minmax(145px, .95fr) 68px;
  gap: 12px;
  align-items: start;
}
.economy-tariff-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0 6px 10px;
  border-bottom: 1px solid var(--line);
}
.economy-tariff-head > span:last-child { text-align: center; }
.economy-tariff-row {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  transition: background-color .15s ease;
}
.economy-tariff-row:last-child { border-bottom: 0; }
.economy-tariff-row:hover { background: #f8fafc; }
.economy-tariff-row > label { min-width: 0; }
.economy-tariff-row > label > span { display: none; }
.economy-tariff-row input,
.economy-tariff-row textarea,
.economy-tariff-row select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  line-height: 1.35;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.economy-tariff-row input:hover,
.economy-tariff-row textarea:hover,
.economy-tariff-row select:hover { border-color: var(--line); background: #fff; }
.economy-tariff-row input:focus,
.economy-tariff-row textarea:focus,
.economy-tariff-row select:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
  outline: none;
}
.economy-tariff-row textarea {
  display: block;
  resize: none;
  overflow: hidden;
}
.economy-tariff-row input:disabled,
.economy-tariff-row textarea:disabled,
.economy-tariff-row select:disabled { opacity: 1; color: inherit; }
.economy-point-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  margin-bottom: 10px;
}
.economy-point-row input { width: 100%; }
.economy-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}
.economy-row-actions .checkbox-line { margin: 0; }
.economy-row-actions .economy-tariff-active { width: 16px; min-height: 16px; height: 16px; padding: 0; }
.economy-row-actions .icon-button { width: 30px; min-width: 30px; height: 30px; padding: 0; }
.economy-active-label { display: none !important; }
.economy-points { display: grid; gap: 8px; }
.economy-point-row {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) 160px 160px 120px;
  gap: 12px;
  align-items: center;
  margin-bottom: 0;
}
.economy-point-row small,
.economy-point-amount { display: block; color: var(--muted); }
.economy-point-amount { text-align: right; font-weight: 700; }
.economy-audio-production-panel .section-head.compact { align-items: flex-start; }
.economy-audio-production-panel .section-head.compact > div { max-width: 820px; }
.economy-audio-production-panel .section-head.compact p { margin: 5px 0 0; }
.economy-audio-production-head,
.economy-audio-production-row {
  display: grid;
  grid-template-columns: 160px minmax(190px, 1fr) 110px 140px minmax(180px, 1.2fr) 120px 44px;
  gap: 10px;
  align-items: center;
}
.economy-audio-production-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px 8px;
}
.economy-audio-production-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  margin-bottom: 10px;
}
.economy-audio-production-row label span {
  display: none;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.economy-audio-production-row input,
.economy-audio-production-row select { width: 100%; }
.economy-audio-production-sum { text-align: right; }
@media (max-width: 1180px) {
  .economy-title-row,
  .economy-tariff-head { display: block; }
  .economy-title-row > * { margin-bottom: 10px; }
  .economy-tariff-head { display: none; }
  .economy-tariff-row,
  .economy-point-row,
  .economy-audio-production-row,
  .economy-metrics { grid-template-columns: 1fr; }
  .economy-audio-production-head { display: none; }
  .economy-tariff-row { padding: 12px 0; gap: 8px; }
  .economy-tariff-row > label > span { display: block; }
  .economy-row-actions { justify-content: flex-start; }
  .economy-active-label { display: inline !important; margin: 0 !important; color: inherit !important; font-size: inherit !important; }
  .economy-audio-production-row label span { display: block; }
  .economy-audio-production-sum { text-align: left; }
  .economy-period-fields { align-items: stretch; }
  .economy-period-fields .inline-field { flex: 1 1 150px; }
  .economy-point-amount { text-align: left; }
}


.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}

.app-release-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}

.release-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.release-card strong,
.release-card span,
.release-list strong,
.release-list span {
  display: block;
}

.release-card span,
.release-list span,
.release-notes li,
.knowledge-links a {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.link-button {
  text-decoration: none;
  white-space: nowrap;
}

.release-notes h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.release-notes ul {
  margin: 0;
  padding-left: 18px;
}

.release-history summary {
  cursor: pointer;
  font-weight: 700;
}

.release-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.release-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.knowledge-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.knowledge-links a {
  font-weight: 700;
}

.os-build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.os-build-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.os-build-grid input,
.os-build-grid select {
  width: 100%;
}

.os-build-tabs {
  margin: 0 0 16px;
}

.linux-distro-upload,
.os-build-settings {
  margin-top: 16px;
}

@media (max-width: 720px) {
  .release-card,
  .release-list div {
    align-items: flex-start;
    flex-direction: column;
  }
}


.settings-section-tabs {
  margin: 0 0 16px;
}

[data-settings-panel][hidden] {
  display: none;
}


.audio-order-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.audio-order-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}
.audio-order-card.create {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
}
.audio-order-card.create strong {
  font-size: 38px;
  line-height: 1;
}
.audio-order-card.new {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, .25);
}
.audio-order-status {
  color: var(--muted);
  font-size: 12px;
}
.audio-order-card small,
.audio-order-card em {
  color: var(--muted);
  font-style: normal;
}
.audio-order-editor {
  display: grid;
  gap: 14px;
}
.audio-order-editor textarea,
.audio-order-editor input,
.audio-order-editor select { width: 100%; }
.audio-order-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
}
.audio-order-upload {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  display: grid;
  gap: 12px;
}
.audio-order-upload audio { width: 100%; }
.audio-order-review {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.audio-order-reject {
  display: grid;
  gap: 8px;
  min-width: min(420px, 100%);
}
@media (max-width: 720px) {
  .audio-order-grid { grid-template-columns: 1fr; }
}

.audio-order-chronometrics {
  margin-top: -6px;
  padding: 10px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  font-weight: 700;
}
.audio-order-chronometrics.empty {
  color: #667085;
  font-weight: 600;
}

.audio-order-field {
  position: relative;
  display: grid;
  gap: 6px;
}
.audio-order-field[hidden] {
  display: none;
}
.audio-order-select-button,
.audio-order-field input[type="text"],
.audio-order-price input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #b8c1cc;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.audio-order-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  text-align: left;
}
.audio-order-select-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #334155;
  border-bottom: 2px solid #334155;
  transform: rotate(45deg) translateY(-2px);
  flex: 0 0 auto;
}
.audio-order-select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid #b8c1cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}
.audio-order-select-menu[hidden] {
  display: none;
}
.audio-order-select-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
}
.audio-order-select-menu button:hover,
.audio-order-select-menu button[aria-selected="true"] {
  background: #eaf2f6;
}
.audio-order-price {
  max-width: 360px;
}
.audio-order-price input {
  padding: 8px 12px;
}
.audio-order-price span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.audio-order-file-input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.audio-order-dropzone {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px dashed #9aa8b8;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.audio-order-dropzone strong {
  color: var(--text);
  font-size: 16px;
}
.audio-order-dropzone span {
  color: var(--muted);
}
.audio-order-dropzone.dragover,
.audio-order-dropzone.has-file {
  border-color: #012F46;
  background: #eef6f9;
}
#audioOrderUploadForm {
  display: grid;
  gap: 14px;
}
#audioOrderUploadSubmit {
  justify-self: start;
}

.location-row .status.partner {
  color: #365314;
  background: #ecfccb;
}
.location-card.partner-equipment .location-version,
.location-card.partner-equipment .location-now-playing,
.location-card.partner-equipment .location-cache-count,
.location-card.partner-equipment .location-folder-size,
.location-card.partner-equipment .location-activity,
.location-card.partner-equipment .power-state,
.location-card.partner-equipment .location-actions [data-power] {
  display: none;
}
.location-partner-note {
  grid-column: 5 / 11;
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid #c7dcc7;
  border-radius: 8px;
  background: #edf7ed;
  color: #24533a;
  font-weight: 800;
  text-align: center;
}
.location-partner-toggle {
  width: 100%;
  border-color: #b8c1cc;
  background: #fff;
  color: var(--text);
}
.location-partner-toggle.active {
  border-color: #7aa377;
  background: #edf7ed;
  color: #24533a;
}
@media (max-width: 1320px) {
  .location-partner-note { grid-column: 2 / -1; }
}
@media (max-width: 760px) {
  .location-partner-note {
    grid-column: 2;
    justify-items: start;
    padding: 10px 12px;
    text-align: left;
  }
}

.audio-order-date-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}
.audio-order-date-control input[type="text"] {
  width: 100%;
}
.audio-order-date-control .icon-button {
  width: 38px;
  height: 38px;
  font-size: 17px;
}
.audio-order-date-native {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px !important;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.media-delete-usage-dialog {
  width: min(720px, calc(100vw - 32px));
}
.media-delete-usage-list {
  display: grid;
  gap: 10px;
  max-height: min(46vh, 420px);
  overflow: auto;
}
.media-delete-usage-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted, #f5f8fa);
}
.media-delete-usage-item strong,
.media-delete-usage-item small {
  display: block;
}
.media-delete-usage-item small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.media-delete-usage-item a {
  white-space: nowrap;
}
.media-delete-force-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff1f2;
  color: #9f1239;
  font-weight: 700;
}
@media (max-width: 620px) {
  .media-delete-usage-item {
    grid-template-columns: 1fr;
  }
  .media-delete-usage-item a {
    justify-self: start;
  }
}

.music-catalog-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.music-catalog-stats article {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface, #fff);
}
.music-catalog-stats span {
  color: var(--muted);
  font-size: 12px;
}
.music-catalog-stats strong {
  font-size: 24px;
}
.music-catalog-panel {
  display: grid;
  gap: 14px;
}
.music-catalog-toolbar {
  display: grid;
  grid-template-columns: auto minmax(240px, 520px);
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.music-catalog-toolbar .segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #edf3f6;
}
.music-catalog-toolbar .segmented button {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.music-catalog-toolbar .segmented button.active {
  background: var(--navy);
  color: #fff;
}
.music-catalog-list {
  display: grid;
  gap: 8px;
}
.music-catalog-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.music-catalog-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 16px;
  cursor: pointer;
}
.music-catalog-row summary span {
  color: var(--muted);
  font-size: 13px;
}
.music-catalog-examples {
  display: grid;
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}
.music-catalog-examples > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, .6fr);
  gap: 4px 18px;
  padding: 10px 16px;
  background: #f8fafb;
}
.music-catalog-examples small {
  grid-column: 1 / -1;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.music-catalog-pager {
  display: flex;
  justify-content: center;
  gap: 14px;
  align-items: center;
}
@media (max-width: 900px) {
  .music-catalog-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
  .music-catalog-toolbar {
    grid-template-columns: 1fr;
  }
}
.audiocore-distribution-card,.audiocore-release-card{grid-template-columns:1fr;align-items:flex-start}
.audiocore-distribution-form{display:grid;gap:14px;min-width:0;width:100%}
.audiocore-module-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:8px;margin-top:8px}
.audiocore-module-grid label{display:flex;align-items:flex-start;gap:8px;padding:10px;border:1px solid var(--line,#d7e3e8);border-radius:10px;background:#fff}
.audiocore-module-grid label.unsupported{opacity:.58;background:#f3f6f7}
.audiocore-module-grid input{width:auto;margin-top:3px}
.audiocore-module-grid small{display:block;color:var(--muted,#67808c)}
.audiocore-license-actions,.audiocore-install-row,.audiocore-release-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;align-items:end}
.audiocore-license-actions{display:flex;flex-wrap:wrap;justify-content:flex-end}
.audiocore-license-actions button{width:auto}
.audiocore-primary-action{display:inline-flex;align-items:center;justify-content:center;min-height:38px;border-radius:7px;background:#012F46;color:#fff;padding:8px 14px;font-weight:700}
.audiocore-primary-action:hover:not(:disabled){background:#064863}
.audiocore-primary-action:disabled{cursor:default;opacity:.58}
.audiocore-result{display:block;white-space:pre-wrap;overflow-wrap:anywhere;padding:10px 12px;border-radius:10px;background:#eef5f7;min-height:42px}
.audiocore-result:empty{display:none}
.audiocore-link-list{display:grid;gap:8px}
.audiocore-link-row{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--line,#d7e3e8);border-radius:10px;background:#fff}
.audiocore-link-row small{display:block;color:var(--muted,#67808c)}
.audiocore-link-row.expired{opacity:.58}
.audiocore-empty{grid-column:1/-1;margin:0;padding:14px;border:1px dashed var(--line,#d7e3e8);border-radius:10px;color:var(--muted,#67808c);background:#fff}
.audiocore-activation-reveal{display:grid;gap:10px;padding:14px;border:1px solid #8fc7b4;border-radius:12px;background:#eefaf6}
.audiocore-activation-reveal[hidden]{display:none}
.audiocore-activation-reveal code{display:block;padding:12px;border-radius:8px;background:#fff;font:700 18px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em;overflow-wrap:anywhere;user-select:all}
.audiocore-artifact-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.audiocore-artifact-fields label{display:grid;gap:6px}
.audiocore-artifact-fields small,.audiocore-platform-note,.audiocore-artifact-line{color:var(--muted,#67808c);font-size:12px}
.audiocore-platform-note{margin:0;padding:10px 12px;border-left:3px solid #4f7d91;background:#eef5f7}
.audiocore-artifact-line{margin-top:4px;overflow-wrap:anywhere}
.audiocore-distribution-card[aria-busy="true"] .audiocore-distribution-form{opacity:.7}
@media(max-width:760px){.audiocore-link-row,.audiocore-artifact-fields{grid-template-columns:1fr}.audiocore-license-actions{justify-content:stretch}.audiocore-license-actions button{width:100%}}
