:root {
  --bg: #2d2d2d;
  --panel: #101010;
  --panel-alt: #1b1b1b;
  --panel-soft: #151515;
  --line: #333333;
  --text: #f3f3f3;
  --muted: #a8a8a8;
  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, 0.14);
}

html {
  font-size: 14px;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: grid;
  grid-template-columns: 260px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #454545;
  background: #3a3a3a;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.brand-block {
  display: grid;
  gap: 0;
}

.brand-logo {
  display: block;
  width: 247px;
  max-width: 100%;
  height: auto;
  opacity: 1;
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.12));
}

.brand-title {
  font-size: 1.57rem;
  font-weight: 800;
  line-height: 1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: .84rem;
}

.topbar-center {
  text-align: center;
  font-weight: 700;
}

.topbar-radio {
  color: #f3f3f3;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.1;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.server-pill,
.user-pill {
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  color: var(--text);
  font-size: 1.08rem;
  white-space: nowrap;
}

.topbar-button,
.accent-button,
.secondary-button,
.danger-button,
.success-button {
  min-width: 120px;
  height: 40px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.topbar-button,
.secondary-button {
  background: #222;
  color: var(--text);
}

.compact-action {
  min-width: 104px;
  height: 36px;
}

.accent-button {
  background: var(--accent);
  color: #111;
}

.danger-button {
  border-color: #6f2c2c;
  background: #3b1a1a;
  color: #ffb3b3;
}

.success-button {
  border-color: #2f8f41;
  background: #2f8f41;
  color: #ffffff;
}

.success-banner {
  padding: 12px 14px;
  border: 1px solid #2f8f41;
  background: rgba(47, 143, 65, 0.16);
  color: #c7f0cf;
  font-weight: 700;
}

.warning-banner {
  padding: 12px 14px;
  border: 1px solid #a55a16;
  background: rgba(165, 90, 22, 0.18);
  color: #ffd6b0;
  font-weight: 700;
}

.page-body {
  max-width: 1640px;
  margin: 0 auto;
  padding: 18px 20px 24px;
}

.module-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid #454545;
  background: #323232;
  position: sticky;
  top: 0;
  z-index: 20;
}

.module-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #222;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

.submodule-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 52px;
  padding: 9px 16px;
  border-bottom: 1px solid #454545;
  background: #2f2f2f;
}

.submodule-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #1f1f1f;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: .96rem;
  box-shadow: inset 0 0 0 0 transparent;
}

.submodule-link:hover {
  border-color: rgba(255, 126, 22, 0.55);
  color: var(--accent);
}

.submodule-link.active-link {
  background: #26221f;
  border-color: rgba(255, 126, 22, 0.72);
  color: var(--accent);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.submodule-placeholder {
  color: var(--muted);
  font-size: .84rem;
}

.module-link:hover,
.module-link.active-link {
  background: var(--accent);
  color: #111;
}

.portal-shell,
.login-shell {
  max-width: 1640px;
  margin: 0 auto;
}

.portal-header,
.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.portal-header h1,
.login-header h1 {
  margin: 4px 0;
  font-size: 1.92rem;
  font-weight: 800;
}

.portal-header p,
.login-header p,
.muted {
  color: var(--muted);
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .74rem;
}

.status-badge {
  padding: 10px 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 122, 26, 0.35);
  color: #ffb277;
  font-weight: 700;
}

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

.pauta-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.pauta-classification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.classification-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - 265px);
}

.classification-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.classification-card-header h2 {
  margin: 0;
}

.catalog-header-form {
  display: grid;
  grid-template-columns: minmax(95px, 1fr) auto auto;
  gap: 5px;
  align-items: center;
  width: min(340px, 62%);
}

.catalog-header-form .form-control {
  height: 30px;
  min-height: 30px;
  padding: 3px 8px;
  font-size: .82rem;
}

.classification-scroll {
  max-height: calc(100vh - 390px);
  overflow-y: auto;
  scrollbar-width: none;
  padding-right: 2px;
}

.classification-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.pauta-settings-col,
.pauta-settings-edit-grid {
  display: grid;
  gap: 16px;
  align-content: start;
}

.report-logo-panel {
  display: grid;
  gap: 10px;
}

.report-logo-preview-wrap {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.report-logo-preview {
  max-width: 260px;
  max-height: 120px;
  width: auto;
  height: auto;
  padding: 10px;
  border: 1px solid rgba(120, 120, 120, 0.28);
  background: rgba(18, 18, 18, 0.72);
  object-fit: contain;
}

.report-logo-file {
  font-size: .82rem;
}

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

.custom-file-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 36px;
  cursor: pointer;
}

.custom-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: .88rem;
}

.custom-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pauta-settings-edit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: span 2;
}

.pauta-settings-save-row {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.portal-card,
.login-card,
.user-list,
.editor-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.portal-card,
.login-card {
  padding: 18px;
}

.portal-card-wide {
  grid-column: span 2;
}

.portal-card h2,
.login-card h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 800;
}

.portal-highlight {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(255, 122, 26, 0.08);
  border: 1px solid rgba(255, 122, 26, 0.22);
}

.portal-highlight-label {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: 6px;
}

.portal-highlight strong {
  font-size: 1.15rem;
  color: #ffb277;
}

.portal-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

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

.portal-details dt {
  color: var(--muted);
  font-size: .74rem;
  margin-bottom: 4px;
}

.portal-details dd {
  margin: 0;
  font-weight: 700;
}

.status-green {
  color: #77e15b;
}

.status-red {
  color: #ff5c5c;
}

.status-muted {
  color: var(--muted);
}

.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.module-chip {
  padding: 10px 14px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
}

.support-block {
  display: grid;
  gap: 6px;
}

.support-block p {
  margin: 0;
}

.login-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 530px);
  gap: 18px;
  justify-content: center;
  align-items: center;
  align-content: center;
}

.login-card {
  max-width: 520px;
  margin: 0 auto;
}

.login-intro {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0;
  justify-items: center;
  width: 100%;
}

.login-subtitle {
  width: min(520px, 100%);
  margin: 0 auto 2px;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 800;
  text-align: left;
}

.operations-login-page {
  background:
    linear-gradient(180deg, rgba(16, 16, 16, 0.9), rgba(16, 16, 16, 0.93)),
    url('/branding/fondo-login.png') calc(50% + 96px) top / cover no-repeat,
    var(--bg);
}

.login-logo {
  display: block;
  width: min(328px, 100%);
  height: auto;
  margin: 4px auto 10px;
  opacity: 1;
  filter: drop-shadow(0 3px 10px rgba(255, 255, 255, 0.12));
}

.operations-login-page .login-header {
  width: 100%;
  display: block;
  justify-content: center;
  text-align: center;
  margin: 0 auto 10px;
}

.operations-login-page .login-header > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.operations-login-page .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.operations-login-page .form-label {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.operations-login-page .compact-control {
  height: 44px;
  font-size: 1.16rem;
}

.operations-login-page .accent-button {
  min-width: 150px;
  height: 46px;
  font-size: 1.14rem;
}

.operations-login-page .login-form-shell,
.operations-login-page .login-subtitle {
  width: min(360px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.operations-login-page .login-form-shell .editor-section {
  padding: 14px;
}

.operations-login-page .login-form-shell form {
  display: grid;
  gap: 10px;
}

.operations-login-page .login-form-shell .mb-2 {
  margin: 0 !important;
}

.operations-login-page .login-form-shell .form-label {
  display: block;
}

.operations-login-page .login-form-shell .form-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.operations-login-page .login-form-shell .button-row {
  justify-content: center;
  margin-top: 8px;
}

.form-label {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 3px;
  font-size: .82rem;
}

.form-control,
.form-select {
  height: 44px;
  border-radius: 0;
  border: 1px solid #555;
  background: #202020;
  color: var(--text);
}

textarea.form-control {
  height: auto;
  min-height: 150px;
  resize: vertical;
  line-height: 1.45;
}

.mention-textarea {
  min-height: 210px;
}

.compact-control {
  height: 36px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.compact-pin {
  max-width: 150px;
}

.form-control::placeholder {
  color: #7f7f7f;
}

.form-control:focus,
.form-select:focus {
  background: #202020;
  color: var(--text);
  border-color: var(--accent);
  box-shadow: none;
}

.editor-shell .form-control,
.editor-shell .form-select,
.editor-shell select {
  background-color: #202020 !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text);
  color-scheme: dark;
}

.editor-shell option {
  background: #1c1c1c !important;
  color: var(--text) !important;
}

.editor-shell input:-webkit-autofill,
.editor-shell input:-webkit-autofill:hover,
.editor-shell input:-webkit-autofill:focus,
.editor-shell textarea:-webkit-autofill,
.editor-shell select:-webkit-autofill {
  -webkit-text-fill-color: var(--text) !important;
  box-shadow: 0 0 0 1000px #202020 inset !important;
  transition: background-color 9999s ease-in-out 0s;
}

select.form-control,
select.form-select,
.form-select {
  background-color: #202020;
  color: var(--text);
}

select.form-control option,
select.form-select option,
.form-select option {
  background: #1c1c1c;
  color: var(--text);
}

.input-group-text {
  border-radius: 0;
  border: 1px solid #555;
  background: #272727;
  color: var(--text);
}

.validation-summary-errors,
.field-validation-error {
  color: #ff8686;
}

.button-row {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.inline-delete-form {
  margin: 0;
}

.split-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
}

.user-list {
  padding: 14px;
  min-height: calc(100vh - 180px);
}

.user-list-header,
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.user-list-header h2,
.editor-header h2 {
  margin: 0;
  font-size: 1.07rem;
  font-weight: 800;
}

.user-items {
  display: grid;
  gap: 4px;
  align-content: start;
}

.compact-user-items {
  gap: 3px;
}

.catalog-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #171717;
}

.catalog-item.selected {
  border-color: var(--accent);
  background: rgba(255, 122, 26, 0.08);
}

.catalog-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mini-action {
  min-width: 54px;
  height: 30px;
  padding: 0 10px;
  font-size: .75rem;
}

.catalog-inline-form {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.catalog-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.compact-client-form {
  display: grid;
  gap: 4px;
}

.client-row-table {
  display: grid;
  gap: 1px;
}

.client-row-head,
.client-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.1fr) 150px 140px 140px minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
}

.client-row-head {
  padding: 6px 8px;
  background: #1a1a1a;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
}

.client-row {
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: #171717;
  color: var(--text);
  text-decoration: none;
  font-size: .89rem;
  min-height: 28px;
}

.client-row:hover,
.client-row.selected {
  border-color: var(--accent);
  background: rgba(255, 122, 26, 0.08);
}

.client-col-name,
.client-col-address,
.client-col-category,
.client-col-type,
.client-col-agency,
.client-col-folder {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-item {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #171717;
  color: var(--text);
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease;
}

.user-item:hover,
.user-item.selected {
  border-color: var(--accent);
  background: #202020;
}

.user-item-title {
  font-weight: 800;
  line-height: 1.25;
}

.user-item-subtitle,
.user-item-meta {
  color: var(--muted);
  font-size: .82rem;
}

.editor-shell {
  padding: 18px;
}

.editor-empty-photo {
  min-height: calc(100vh - 220px);
  background:
    linear-gradient(180deg, rgba(16, 16, 16, 0.82), rgba(16, 16, 16, 0.9)),
    url('/branding/fondo-login.png') calc(50% - 8px) top / cover no-repeat;
  border: 1px solid var(--line);
}

.soft-photo-shell {
  background:
    linear-gradient(180deg, rgba(16, 16, 16, 0.84), rgba(16, 16, 16, 0.9)),
    url('/branding/fondo-login.png') calc(50% - 8px) top / cover no-repeat,
    var(--panel);
}

.remote-connections-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.remote-editor-column {
  min-height: calc(100vh - 210px);
}

.remote-button-row {
  justify-content: flex-start;
}

.remote-url-note {
  margin: -2px 0 12px;
  padding: 10px 11px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 122, 26, .08);
  color: #d8d8d8;
  font-size: .86rem;
  line-height: 1.35;
}

.remote-url-note strong {
  color: var(--accent);
}

.remote-url-examples {
  margin-top: 6px;
  color: var(--muted);
}

.remote-url-examples span {
  color: #f1f1f1;
  white-space: nowrap;
}

.remote-list-column {
  min-height: calc(100vh - 210px);
  border: 1px solid var(--line);
  padding: 14px;
}

.remote-connection-items {
  display: grid;
  gap: 3px;
  align-content: start;
}

.remote-connection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 12px;
  align-items: center;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(18, 18, 18, .86);
  color: var(--text);
  text-decoration: none;
}

.remote-connection-row:nth-child(even) {
  background: rgba(42, 42, 42, .82);
}

.remote-connection-row:hover,
.remote-connection-row.selected {
  border-color: var(--accent);
  background: rgba(255, 122, 26, .12);
}

.remote-connection-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.remote-connection-main strong,
.remote-connection-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-connection-main small {
  color: var(--muted);
  font-size: .84rem;
}

.remote-connection-status {
  text-align: right;
  font-size: .82rem;
  font-weight: 800;
}

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

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

.userslive-grid .music-access-section {
  grid-column: span 1;
}

.userslive-grid .audio-access-section {
  grid-column: span 2;
}

.editor-section {
  border: 1px solid var(--line);
  padding: 14px 14px 12px;
  background: var(--panel-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.editor-section h3 {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: .92rem;
  font-weight: 800;
}

.editor-section h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: .84rem;
  font-weight: 800;
}

.checkbox-grid {
  display: grid;
  gap: 2px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 2px 8px;
  background: #1b1b1b;
  border: 1px solid transparent;
}

.compact-row {
  min-height: 24px;
  padding: 1px 7px;
}

.check-row input[type="checkbox"] {
  accent-color: var(--accent);
}

.check-row label {
  margin: 0;
  flex: 1;
}

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

.folder-group {
  margin-bottom: 8px;
}

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

.folder-block {
  display: grid;
  gap: 1px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 2px;
}

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

.summary-item {
  border: 1px solid var(--line);
  background: #141414;
  padding: 14px;
}

.summary-item h3 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.soft-pill {
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: #1b1b1b;
  color: var(--text);
  font-size: .82rem;
}

.color-bar {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  vertical-align: middle;
}

.empty-state {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed #494949;
  background: #171717;
  color: var(--muted);
}

.section-note {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: .82rem;
}

.commercial-empty-shell {
  display: grid;
}

.commercial-empty-overlay {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 8px;
  min-height: calc(100vh - 265px);
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(14, 14, 14, 0.22), rgba(14, 14, 14, 0.46));
}

.commercial-history-panel {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: rgba(18, 18, 18, 0.72);
  border: 1px solid rgba(120, 120, 120, 0.28);
  backdrop-filter: blur(2px);
  overflow-x: auto;
}

.commercial-history-panel h3 {
  margin: 0 0 4px;
}

.commercial-history-list {
  display: grid;
  gap: 2px;
}

.commercial-history-head {
  display: grid;
  grid-template-columns: 108px minmax(145px, .95fr) minmax(112px, .7fr) 82px minmax(178px, .85fr) 50px minmax(330px, 1.85fr) 82px;
  gap: 7px;
  align-items: center;
  min-width: 100%;
}

.commercial-history-head {
  min-height: 28px;
  padding: 0 10px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.mention-history-head,
.mention-history-link {
  grid-template-columns: 108px minmax(180px, 1fr) minmax(210px, 1fr) minmax(180px, 1fr) 92px;
}

.commercial-history-row {
  min-height: 30px;
  padding: 4px 10px;
  background: rgba(16, 16, 16, 0.88);
  color: var(--text);
  border: 1px solid transparent;
  font-size: .93rem;
  align-items: center;
}

.commercial-history-row:nth-child(even) {
  background: rgba(28, 28, 28, 0.9);
}

.commercial-history-row:hover {
  border-color: var(--accent);
  background: rgba(37, 37, 37, 0.94);
}

.commercial-history-link {
  display: grid;
  grid-template-columns: 108px minmax(145px, .95fr) minmax(112px, .7fr) 82px minmax(178px, .85fr) 50px minmax(330px, 1.85fr) 82px;
  gap: 7px;
  align-items: center;
  min-width: 0;
  color: inherit;
}

.commercial-history-date,
.commercial-history-category,
.commercial-history-priority,
.commercial-history-spots,
.commercial-history-status {
  white-space: nowrap;
}

.commercial-history-client,
.commercial-history-category,
.commercial-history-range,
.commercial-history-audio {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-history-audio {
  color: #cfd6dd;
  font-size: .9rem;
}

.commercial-history-version-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  background: rgba(255, 126, 22, 0.18);
  color: var(--accent);
  font-size: .76rem;
  font-weight: 800;
}

.commercial-empty-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
  margin: 0;
  padding: 0;
}

.commercial-empty-photo {
  background:
    linear-gradient(180deg, rgba(16, 16, 16, 0.78), rgba(16, 16, 16, 0.86)),
    url('/branding/fondo-login.png') calc(50% - 8px) top / cover no-repeat;
}

.pauta-report-photo {
  min-height: calc(100vh - 220px);
}

.pauta-report-search {
  display: grid;
  gap: 8px;
}

.pauta-report-search-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(18, 18, 18, 0.72);
  border: 1px solid rgba(120, 120, 120, 0.28);
  backdrop-filter: blur(2px);
}

.pauta-report-search-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) 150px 150px 180px 120px;
  gap: 10px;
  align-items: center;
}

.pauta-report-search-row {
  display: grid;
  grid-template-columns: minmax(0, 420px) 120px;
  gap: 10px;
  align-items: center;
  width: max-content;
  max-width: 100%;
}

.pauta-report-panel {
  gap: 7px;
}

.pauta-report-head,
.pauta-report-link {
  grid-template-columns: 132px minmax(180px, 1.15fr) minmax(120px, .78fr) minmax(215px, 1.16fr) 92px 112px 136px 142px;
}

.pauta-report-row {
  min-height: 34px;
  padding: 3px 8px;
  border-color: rgba(255, 255, 255, .04);
  box-shadow: inset 3px 0 0 rgba(255, 122, 26, .18);
}

.pauta-report-select {
  text-decoration: none;
}

.pauta-report-select.selected {
  background: rgba(255, 122, 26, 0.16);
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

.pauta-report-client {
  font-weight: 800;
  color: #ffffff;
}

.pauta-report-order {
  color: #d6dde2;
}

.pauta-report-count {
  justify-self: center;
  min-width: 34px;
  padding: 2px 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .06);
  text-align: center;
  font-weight: 800;
}

.pauta-report-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 8px;
  border-radius: 2px;
  background: rgba(190, 190, 190, .12);
  color: #e6e6e6;
  font-weight: 800;
  font-size: .82rem;
}

.pauta-report-status.status-activa {
  background: rgba(90, 232, 57, .14);
  color: #85ff62;
}

.pauta-report-status.status-finalizada {
  background: rgba(255, 122, 26, .15);
  color: var(--accent);
}

.pauta-report-status.status-cancelada {
  background: rgba(255, 67, 67, .16);
  color: #ff7373;
}

.pauta-report-detail-panel {
  gap: 12px;
}

.pauta-report-detail-highlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.pauta-report-detail-title {
  min-width: 0;
}

.pauta-report-download-pdf {
  justify-self: end;
  margin-top: 0;
  text-decoration: none;
  white-space: nowrap;
}

.pauta-report-detail-grid {
  display: grid;
  gap: 12px;
}

.pauta-report-detail-block {
  display: grid;
  gap: 8px;
}

.pauta-report-detail-block h4 {
  margin: 0;
  color: var(--accent);
  font-size: .92rem;
}

.pauta-report-summary-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  font-size: .98rem;
}

.pauta-report-programmed-summary {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .18);
}

.pauta-report-programmed-summary strong {
  color: var(--text);
  font-size: 1rem;
}

.pauta-report-programmed-summary pre {
  margin: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: .96rem;
  line-height: 1.48;
  white-space: pre-wrap;
}

.commercial-editor {
  display: grid;
  gap: 12px;
}

.commercial-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.commercial-tab {
  position: relative;
  min-width: 148px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #242424;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}


.commercial-tab:hover {
  border-color: rgba(255, 126, 22, 0.45);
  color: var(--accent);
}

.commercial-tab.active {
  background: #2a2521;
  border-color: rgba(255, 126, 22, 0.62);
  color: var(--accent);
}

.commercial-tab.active::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--accent);
}

.streaming-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.commercial-panel {
  display: none;
}

.commercial-panel.active {
  display: block;
}

.streaming-shell-photo {
  min-height: calc(100vh - 290px);
}

.streaming-panel {
  display: none;
  background: rgba(16, 16, 16, 0.82);
  border: 1px solid rgba(120, 120, 120, 0.28);
  backdrop-filter: blur(2px);
}

.streaming-panel.active {
  display: block;
}

.streaming-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.streaming-panel-header h3 {
  margin: 0;
}

.stream-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 20, 20, 0.88);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.stream-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  background: #777;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.stream-status-on.stream-status-badge {
  border-color: rgba(77, 255, 83, 0.38);
  color: #58ff5d;
}

.stream-status-on.stream-status-dot {
  background: #58ff5d;
  box-shadow: 0 0 9px rgba(88, 255, 93, 0.7);
}

.stream-status-warn.stream-status-badge {
  border-color: rgba(255, 126, 22, 0.42);
  color: var(--accent);
}

.stream-status-warn.stream-status-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 126, 22, 0.6);
}

.stream-status-error.stream-status-badge {
  border-color: rgba(255, 70, 70, 0.44);
  color: #ff5d5d;
}

.stream-status-error.stream-status-dot {
  background: #ff4545;
  box-shadow: 0 0 8px rgba(255, 69, 69, 0.58);
}

.stream-status-off.stream-status-badge {
  color: #9da6ad;
}

.stream-status-off.stream-status-dot {
  background: #737373;
}

.stream-status-detail {
  min-height: 22px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commercial-audio-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 150px;
  gap: 12px;
  align-items: end;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: #151515;
}

.commercial-audio-main,
.commercial-audio-actions,
.commercial-audio-percentage {
  min-width: 0;
}

.commercial-audio-actions {
  display: flex;
  gap: 8px;
}

.commercial-upload-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.commercial-upload-name {
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.commercial-file-picker {
  display: none;
}

.commercial-summary-box {
  display: block;
  height: 360px !important;
  min-height: 360px;
  resize: vertical;
  line-height: 1.45;
  white-space: pre-wrap;
}

.commercial-matrix-shell {
  border: 1px solid var(--line);
  background: #131313;
  padding: 12px;
}

.commercial-matrix-status {
  margin-bottom: 10px;
  color: #9be25c;
  font-size: .82rem;
  font-weight: 700;
}

.commercial-matrix-grid {
  display: grid;
  gap: 1px;
  background: #d7d7d7;
  border: 1px solid #d7d7d7;
}

.commercial-matrix-header,
.commercial-matrix-hour,
.commercial-matrix-cell {
  min-height: 22px;
  display: grid;
  place-items: center;
  color: #101010;
  font-size: .76rem;
  font-weight: 800;
}

.commercial-matrix-header {
  background: #ffffff;
}

.commercial-matrix-hour {
  background: #f0f0f0;
}

.commercial-matrix-cell {
  background: #ffffff;
  cursor: pointer;
}

.commercial-matrix-cell:hover {
  background: #ffe0c6;
}

.commercial-matrix-cell.selected {
  background: var(--accent);
}

.commercial-matrix-cell.disabled {
  background: #e1e1e1;
  cursor: default;
}

.pauta-audit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.pauta-audit-column {
  display: grid;
  gap: 8px;
  align-content: start;
}

.pauta-audit-block {
  border: 1px solid var(--line);
  background: #171717;
  min-height: 44px;
}

.pauta-audit-title {
  padding: 6px 10px 4px;
  color: var(--accent);
  font-size: .9rem;
}

.pauta-audit-time {
  font-weight: 800;
}

.pauta-audit-count {
  color: var(--muted);
  font-weight: 500;
}

.pauta-audit-copy {
  display: grid;
  gap: 2px;
  padding: 0 10px 8px;
}

.pauta-audit-line {
  color: var(--text);
  font-size: .82rem;
  line-height: 1.2;
}

.matrix-head,
.matrix-hour,
.matrix-cell {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111;
  font-size: .8rem;
}

.matrix-head,
.matrix-hour {
  font-weight: 700;
}

.matrix-cell {
  border: 0;
  cursor: pointer;
  transition: background-color .14s ease;
}

.matrix-cell:hover {
  background: #f1f1f1;
}

.matrix-cell.active {
  background: var(--accent);
}

.matrix-cell.disabled {
  background: #ececec;
  cursor: default;
}

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

.single-line-days {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.single-line-days .check-row {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 1px 0;
  background: transparent;
}

.single-line-days .check-row label {
  font-size: .92rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.journey-subtitle {
  color: var(--accent);
  font-size: .82rem;
  font-weight: 700;
}

.folder-selection.is-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

.pin-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pin-saved-state {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pin-saved-mask {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #555;
  background: #202020;
  color: var(--text);
  letter-spacing: .08em;
}

.pin-visibility-row {
  min-width: 92px;
  justify-content: center;
  white-space: nowrap;
}

.automation-shell {
  display: grid;
  gap: 14px;
}

.automation-subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.automation-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
}

.automation-sidebar,
.automation-main {
  min-width: 0;
}

.automation-main {
  display: grid;
}

.automation-panel {
  min-width: 0;
}

.automation-add-row {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 8px;
  margin-bottom: 10px;
}

.automation-mode-list {
  display: grid;
  gap: 4px;
}

.automation-mode-item {
  display: grid;
  grid-template-columns: 6px 1fr;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: #171717;
  color: var(--text);
  text-align: left;
}

.automation-mode-item.selected {
  border-color: var(--accent);
  background: #202020;
}

.automation-mode-accent {
  width: 6px;
  min-height: 100%;
}

.automation-mode-copy {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
}

.automation-mode-copy strong {
  font-size: .9rem;
  line-height: 1.2;
}

.automation-mode-copy small {
  color: var(--muted);
  font-size: .78rem;
}

.automation-definition-grid {
  grid-template-columns: 1.1fr 1fr;
}

.automation-map-layout {
  grid-template-columns: 360px minmax(0, 1fr);
}

.automation-mode-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.automation-inline-actions {
  justify-content: flex-start;
  margin-top: -4px;
  margin-bottom: 10px;
}

.automation-color-chip {
  width: 14px;
  height: 48px;
  border: 1px solid var(--line);
  background: #fff;
}

.automation-mode-name {
  font-size: 1rem;
  font-weight: 800;
}

.automation-folder-block {
  max-height: 420px;
}

.automation-schedule-list {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.automation-schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #171717;
}

.automation-schedule-item small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
}

.automation-map-grid {
  display: grid;
  grid-template-columns: 68px repeat(7, minmax(90px, 1fr));
  border: 1px solid var(--line);
  overflow: hidden;
}

.automation-map-cell {
  min-height: 28px;
  padding: 6px 7px;
  border-right: 1px solid #d4d4d4;
  border-bottom: 1px solid #d4d4d4;
  font-size: .76rem;
}

.automation-map-cell.header {
  background: #e8e8e8;
  color: #202020;
  font-weight: 800;
  text-align: center;
}

.automation-map-cell.time {
  background: #efefef;
  color: #202020;
  font-weight: 700;
  text-align: center;
}

.automation-map-cell.body {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.automation-map-cell.conflict {
  background: #ff9b9b !important;
  color: #2b0a0a !important;
  font-weight: 800;
  text-align: center;
}

.automation-toggle {
  padding-right: 12px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.single-column-stats {
  grid-template-columns: 1fr;
}

.stats-box {
  border: 1px solid var(--line);
  background: #161616;
  padding: 12px 14px;
}

.log-list {
  display: grid;
  gap: 6px;
}

.log-table {
  display: grid;
  gap: 1px;
}

.log-table-head,
.log-table-row {
  display: grid;
  grid-template-columns: 110px minmax(220px, 1.3fr) 150px 120px minmax(280px, 2fr);
  gap: 10px;
  align-items: center;
}

.log-table-head {
  padding: 4px 7px;
  background: #1a1a1a;
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 800;
  font-size: .79rem;
  line-height: 1;
}

.log-table-row {
  padding: 2px 7px;
  border: 1px solid var(--line);
  background: #171717;
  min-height: 21px;
}

.log-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #171717;
}

.log-time {
  color: var(--accent);
  font-weight: 800;
  font-size: .88rem;
}

.log-body {
  min-width: 0;
}

.log-title {
  font-weight: 800;
  color: var(--text);
  margin-bottom: 2px;
}

.log-meta,
.log-path {
  color: var(--muted);
  font-size: .8rem;
}

.log-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-col-time {
  color: var(--accent);
  font-weight: 800;
  font-size: .78rem;
  line-height: 1;
}

.log-col-title {
  color: var(--text);
  font-weight: 700;
  font-size: .78rem;
  line-height: 1;
}

.log-col-kind,
.log-col-mode,
.log-col-path {
  color: var(--muted);
  font-size: .77rem;
  line-height: 1;
}

.log-col-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-col-time,
.log-col-title,
.log-col-kind,
.log-col-mode,
.log-col-path {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.access-table {
  display: grid;
  gap: 1px;
}

.access-table-head,
.access-table-row {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1.3fr) 130px 110px 110px minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
}

.access-table-head {
  padding: 7px 9px;
  background: #1a1a1a;
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 800;
  font-size: .82rem;
}

.access-table-row {
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: #171717;
  min-height: 30px;
}

.access-col-time {
  color: var(--accent);
  font-weight: 800;
  font-size: .82rem;
}

.access-col-user {
  color: var(--text);
  font-weight: 700;
  font-size: .82rem;
}

.access-col-login,
.access-col-event,
.access-col-mode,
.access-col-detail {
  color: var(--muted);
  font-size: .81rem;
}

.access-col-time,
.access-col-user,
.access-col-login,
.access-col-event,
.access-col-mode,
.access-col-detail {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-label {
  color: var(--muted);
  font-size: .74rem;
  margin-bottom: 4px;
}

.stats-value {
  font-size: 1.07rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .topbar,
  .portal-grid,
  .pauta-settings-grid,
  .pauta-settings-edit-grid,
  .portal-details,
  .split-layout,
  .editor-grid,
  .userslive-grid,
  .automation-layout,
  .automation-definition-grid,
  .automation-map-layout,
  .inline-grid,
  .audio-folder-grid,
  .stats-strip {
    grid-template-columns: 1fr;
  }

  .portal-card-wide {
    grid-column: span 1;
  }

  .userslive-grid .audio-access-section,
  .userslive-grid .music-access-section {
    grid-column: span 1;
  }
}
