/* DigitalMedia Control Center · capa visual 2026 */
:root {
  --control-radius: 14px;
  --control-shadow: 0 12px 34px rgba(38, 34, 26, .07);
}

.app-shell { grid-template-columns: 252px minmax(0, 1fr); }

.sidebar { padding: 22px 14px; }
.sidebar .brand { padding: 2px 10px 22px; }
.sidebar nav { overflow-y: auto; padding-right: 3px; }
.nav-group-label {
  display: block;
  margin: 18px 12px 7px;
  color: #666860;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
}
.nav-group-label:first-child { margin-top: 0; }
.nav-item { min-height: 42px; }

.workspace { min-width: 0; }
.topbar {
  display: grid;
  grid-template-columns: minmax(190px, .75fr) minmax(260px, 1.15fr) auto auto;
  gap: 16px;
  height: 82px;
}
.topbar-title { min-width: 0; }
.topbar-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.global-search { position: relative; display: flex; align-items: center; min-width: 0; }
.global-search > span { position: absolute; left: 14px; z-index: 1; color: #97938a; font-size: 19px; }
.global-search input {
  width: 100%;
  height: 43px;
  border: 1px solid #ddd7cc;
  border-radius: 11px;
  padding: 0 58px 0 42px;
  background: #fffdf9;
  color: var(--text);
  outline: none;
}
.global-search input:focus { border-color: #ee9b87; box-shadow: 0 0 0 3px rgba(242, 92, 59, .1); }
.global-search kbd {
  position: absolute;
  right: 10px;
  border: 1px solid #ded8ce;
  border-radius: 6px;
  padding: 3px 6px;
  background: #f5f1ea;
  color: #88857d;
  font: 600 9px/1.2 "Inter", sans-serif;
}
.global-search-results {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  left: 0;
  z-index: 80;
  overflow: hidden;
  max-height: 390px;
  border: 1px solid #ddd7cc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(35, 31, 24, .18);
}
.global-search-result {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eee9e1;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
}
.global-search-result:hover { background: #fbf4ee; }
.global-search-result > span { display: grid; width: 34px; height: 34px; border-radius: 9px; place-items: center; background: #fff0ea; color: var(--accent); }
.global-search-result b, .global-search-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-search-result small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.global-search-result em { color: #969189; font: 700 8px "Inter", sans-serif; letter-spacing: .08em; }
.global-search-empty { padding: 24px; color: var(--muted); text-align: center; font-size: 11px; }

.alert-center-btn {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid #ddd7cc;
  border-radius: 11px;
  place-items: center;
  background: #fff;
  color: #756f66;
}
.alert-center-btn > span { font-weight: 900; }
.alert-center-btn b {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  min-width: 19px;
  height: 19px;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0 4px;
  place-items: center;
  background: var(--danger);
  color: #fff;
  font-size: 8px;
}
.alert-center-btn.clear b { background: var(--success); }

.content { max-width: 1600px; margin: 0 auto; padding: 34px clamp(22px, 3vw, 48px) 70px; }
.hero-row { align-items: center; }
.hero-row h1 { font-size: clamp(38px, 4.4vw, 62px); }

.ops-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  border: 1px solid #d8e4dc;
  border-radius: var(--control-radius);
  padding: 14px 18px;
  background: linear-gradient(100deg, #f3faf6, #fffdf8 62%);
  box-shadow: var(--control-shadow);
}
.ops-status-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ops-status-main > i { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 6px rgba(10,166,120,.1); }
.ops-status-main > i.alert { background: var(--danger); box-shadow: 0 0 0 6px rgba(216,71,88,.1); }
.ops-status-main b, .ops-status-main small { display: block; }
.ops-status-main b { color: #30322e; font-size: 12px; }
.ops-status-main small { margin-top: 3px; color: #88867e; font-size: 9px; }
.ops-status-bar dl { display: flex; margin: 0; }
.ops-status-bar dl div { min-width: 86px; border-left: 1px solid #e4dfd5; padding: 0 16px; text-align: center; }
.ops-status-bar dt { color: #928f87; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ops-status-bar dd { margin: 3px 0 0; color: var(--text); font: 700 18px "Space Grotesk", sans-serif; }

.metric-grid article { border-radius: var(--control-radius); box-shadow: var(--control-shadow); }
.action-center-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 12px; margin-top: 12px; }
.attention-panel, .quick-actions-panel { min-height: 238px; border-radius: var(--control-radius); box-shadow: var(--control-shadow); }
.operations-alerts { display: grid; gap: 8px; margin-top: 14px; padding: 0; text-align: left; }
.operation-alert {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid #ece5dc;
  border-radius: 10px;
  padding: 10px 11px;
  background: #fff;
}
.operation-alert > span { display: grid; width: 34px; height: 34px; border-radius: 9px; place-items: center; background: #fbecef; color: var(--danger); font-weight: 900; }
.operation-alert.pending > span { background: #fff3d9; color: #ad7207; }
.operation-alert b, .operation-alert small { display: block; }
.operation-alert b { font-size: 11px; }
.operation-alert small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.operation-alert button { white-space: nowrap; }
.operations-ok { display: flex; align-items: center; gap: 11px; border: 1px solid #d7eadf; border-radius: 10px; padding: 18px; background: #f4fbf7; color: #177a5d; }
.operations-ok span { display: grid; width: 32px; height: 32px; border-radius: 50%; place-items: center; background: #dff3e8; font-weight: 900; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.quick-actions button {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 9px;
  border: 1px solid #e6dfd5;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
}
.quick-actions button:hover { border-color: #eeb09f; transform: translateY(-1px); }
.quick-actions span { grid-row: 1 / 3; display: grid; width: 32px; height: 32px; border-radius: 8px; place-items: center; background: #fff0ea; color: var(--accent); }
.quick-actions b { align-self: end; font-size: 10px; }
.quick-actions small { align-self: start; color: var(--muted); font-size: 8px; }

.station-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fffdf8;
}
.station-search { position: relative; }
.station-search span { position: absolute; top: 9px; left: 11px; color: #969289; }
.station-search input, .station-toolbar select {
  width: 100%;
  height: 38px;
  border: 1px solid #ded8cd;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.station-search input { padding: 0 12px 0 34px; }
.station-toolbar select { padding: 0 10px; }
.station-toolbar > span { padding: 0 8px; color: var(--muted); font-size: 10px; white-space: nowrap; }

#stationCards.cards-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.station-card { display: flex; min-height: 420px; flex-direction: column; border-radius: var(--control-radius); box-shadow: var(--control-shadow); }
.station-card::before { width: 5px; }
.station-card.is-offline::before, .station-card.is-suspended::before { background: var(--danger); }
.station-card.is-autodj::before { background: var(--amber); }
.station-card h3 { margin-top: 14px; font-size: 20px; }
.station-card .station-client { margin-top: 5px; color: #8a877f; font-size: 10px; }
.station-health-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(10,166,120,.09); }
.station-card.is-offline .station-health-dot, .station-card.is-suspended .station-health-dot { background: var(--danger); box-shadow: 0 0 0 5px rgba(216,71,88,.09); }
.station-card.is-autodj .station-health-dot { background: var(--amber); box-shadow: 0 0 0 5px rgba(213,144,21,.09); }
.station-card .station-player { margin-top: 15px; }
.station-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.station-card dl div { display: block; padding: 10px 0; }
.station-card dt { margin-bottom: 4px; font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.station-card dd { font-size: 12px; font-weight: 700; }
.station-card .card-actions { align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid #ebe5dc; }
.station-card .card-actions .primary-btn { flex: 1; justify-content: center; }
.station-card .station-more-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.station-card .station-more-actions .secondary-btn { flex: 1 1 120px; }

.station-detail-dialog { width: min(820px, calc(100% - 30px)); }
.station-detail-mount { margin: 5px 0 0; color: var(--accent); font: 600 11px ui-monospace, monospace; }
.station-detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #e5ded4; border-radius: 12px; padding: 16px; background: #f8f4ed; }
.station-detail-hero h3, .station-detail-hero p { display: block; }
.station-detail-hero h3 { margin: 10px 0 0; font-size: 16px; }
.station-detail-hero p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.station-detail-hero audio { width: min(310px, 45%); }
.station-detail-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 12px; }
.station-detail-metrics div { border: 1px solid #e7e0d6; border-radius: 10px; padding: 12px; background: #fff; }
.station-detail-metrics span, .station-detail-metrics b { display: block; }
.station-detail-metrics span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.station-detail-metrics b { margin-top: 5px; font-size: 14px; }
.station-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.station-detail-grid section { border: 1px solid #e7e0d6; border-radius: 10px; padding: 14px; background: #fff; }
.station-detail-grid h4 { margin: 0 0 10px; font-size: 11px; }
.station-detail-grid dl { margin: 0; }
.station-detail-grid dl div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #eee9e2; padding: 8px 0; font-size: 9px; }
.station-detail-grid dt { color: var(--muted); }
.station-detail-grid dd { margin: 0; color: var(--text); font-weight: 700; text-align: right; }
.station-detail-actions { flex-wrap: wrap; }

dialog button:disabled, button:disabled { cursor: not-allowed; opacity: .55; }
.dialog-progress { display: flex; align-items: center; gap: 8px; margin: -10px 0 18px; color: var(--muted); font-size: 9px; }
.dialog-progress i { height: 4px; flex: 1; overflow: hidden; border-radius: 999px; background: #ece6dd; }
.dialog-progress i::after { content: ""; display: block; width: 62%; height: 100%; border-radius: inherit; background: var(--accent); }
.form-hint { grid-column: 1 / -1; margin: -2px 0 16px; border: 1px solid #e7e0d6; border-radius: 9px; padding: 10px 12px; background: #f8f4ed; color: #77746d; font-size: 10px; line-height: 1.5; }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: minmax(170px, .8fr) minmax(220px, 1fr) auto; }
  .user-chip { display: none; }
  .action-center-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .global-search { display: none; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .topbar-title { display: block !important; }
  .ops-status-bar { align-items: flex-start; flex-direction: column; }
  .ops-status-bar dl { width: 100%; }
  .ops-status-bar dl div { flex: 1; }
  .station-detail-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .content { padding: 24px 15px 60px; }
  .topbar { padding: 0 15px; }
  .topbar-title p { display: none; }
  .hero-row .section-actions { width: 100%; }
  .hero-row .section-actions button { flex: 1; }
  .ops-status-bar dl div { min-width: 0; padding: 0 8px; }
  .quick-actions { grid-template-columns: 1fr; }
  .operation-alert { grid-template-columns: 34px minmax(0, 1fr); }
  .operation-alert button { grid-column: 1 / -1; }
  .station-toolbar { grid-template-columns: 1fr; }
  #stationCards.cards-grid { grid-template-columns: 1fr; }
  .station-detail-grid { grid-template-columns: 1fr; }
  .station-detail-metrics { grid-template-columns: 1fr 1fr; }
  .station-detail-hero { align-items: stretch; flex-direction: column; }
  .station-detail-hero audio { width: 100%; }
}

@media (max-width: 430px) {
  .hero-row h1 { font-size: 38px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid article { min-height: 105px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .station-detail-metrics { grid-template-columns: 1fr; }
}
