/* Şafak Net radio desk: a flat, task-first layout. Login and admin are separate. */
html[data-theme] .app-shell {
  --simple-bg: #101112;
  --simple-panel: #1b1c1e;
  --simple-panel-alt: #242527;
  --simple-line: #36383a;
  --simple-text: #f5f5f3;
  --simple-muted: #b8bab9;
  --simple-quiet: #8f9292;
  --simple-action: #f2f2ef;
  --simple-action-text: #171819;
  color: var(--simple-text);
  background: var(--simple-bg);
}

html[data-theme="light"] .app-shell {
  --simple-bg: #f2f2f0;
  --simple-panel: #fff;
  --simple-panel-alt: #f7f7f5;
  --simple-line: #d8d9d6;
  --simple-text: #1b1d1e;
  --simple-muted: #55595a;
  --simple-quiet: #727677;
  --simple-action: #222426;
  --simple-action-text: #fff;
}

html[data-theme] .app-shell .topbar {
  min-height: 68px;
  padding-inline: clamp(16px, 2vw, 30px);
  background: var(--simple-panel);
  border-bottom: 1px solid var(--simple-line);
  box-shadow: none;
}
html[data-theme] .app-shell .compact-brand strong { letter-spacing: .035em; font-size: 17px; }
html[data-theme] .app-shell .compact-brand strong span { color: var(--simple-text); }
html[data-theme] .app-shell .compact-brand small { color: var(--simple-quiet); letter-spacing: .03em; }
html[data-theme] .app-shell .top-profile-avatar { box-shadow: none; border: 1px solid var(--simple-line); }
html[data-theme] .app-shell .network-state { background: var(--simple-panel-alt); border: 1px solid var(--simple-line); }
html[data-theme] .app-shell .network-state small { color: var(--simple-quiet); }
html[data-theme] .app-shell :is(.management-button, .logout-button) { background: transparent; border: 1px solid var(--simple-line); color: var(--simple-text); box-shadow: none; }
html[data-theme] .app-shell :is(.management-button, .logout-button):hover { background: var(--simple-panel-alt); }

html[data-theme] .app-shell .workspace {
  gap: 0;
  padding: 0;
  background: var(--simple-bg);
}
html[data-theme] .app-shell :is(.channel-rack, .member-rack) {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--simple-panel);
}
html[data-theme] .app-shell .channel-rack { border-right: 1px solid var(--simple-line); }
html[data-theme] .app-shell .member-rack { border-left: 1px solid var(--simple-line); }
html[data-theme] .app-shell .rack-header { margin-bottom: 10px; }
html[data-theme] .app-shell .rack-header h2 { font-size: 19px; font-weight: 780; }
html[data-theme] .app-shell .rack-header .micro-label { color: var(--simple-quiet); font-size: 9px; }
html[data-theme] .app-shell .channel-search input,
html[data-theme] .app-shell .directory-search input { background: var(--simple-panel-alt); border: 1px solid var(--simple-line); color: var(--simple-text); }
html[data-theme] .app-shell .channel-filters { background: transparent; border: 0; padding: 8px 2px; gap: 4px; }
html[data-theme] .app-shell .channel-filters button { border: 0; border-radius: 8px; color: var(--simple-muted); min-height: 36px; padding: 7px 10px; }
html[data-theme] .app-shell .channel-filters button.is-active { color: var(--simple-text); background: var(--simple-panel-alt); }
html[data-theme] .app-shell .channel-row { margin: 2px 0; border: 0; }
html[data-theme] .app-shell .channel-row .channel-card { min-height: 62px; padding: 10px 32px 10px 9px; border: 1px solid transparent; border-radius: 10px; background: transparent; }
html[data-theme] .app-shell .channel-row .channel-card:hover { background: var(--simple-panel-alt); }
html[data-theme] .app-shell .channel-card.is-active { background: var(--simple-panel-alt); border-color: var(--simple-line); box-shadow: inset 3px 0 var(--simple-action); }
html[data-theme] .app-shell .channel-card .channel-copy strong { font-size: 13px; font-weight: 740; color: var(--simple-text); }
html[data-theme] .app-shell .channel-card .channel-copy small { font-size: 10px; color: var(--simple-quiet); letter-spacing: 0; }
html[data-theme] .app-shell .channel-star { color: var(--simple-quiet); }
html[data-theme] .app-shell .channel-star[aria-pressed="true"] { color: var(--simple-text); }
html[data-theme] .app-shell .rack-legend { color: var(--simple-quiet); }
html[data-theme] .app-shell .settings-button { min-height: 56px; background: var(--simple-panel-alt); border: 1px solid var(--simple-line); border-radius: 10px; }
html[data-theme] .app-shell .rack-download-link { color: var(--simple-muted); }

html[data-theme] .app-shell .radio-console {
  max-width: none;
  align-items: stretch;
  justify-content: flex-start;
  gap: 18px;
  padding: clamp(24px, 3.5vw, 48px) clamp(20px, 4vw, 64px) 52px;
  background: var(--simple-bg);
}
html[data-theme] .app-shell .radio-console > * { max-width: 870px; width: 100%; margin-inline: auto; }
html[data-theme] .app-shell .console-heading { min-height: 0; align-items: center; padding: 0 0 6px; border: 0; gap: 18px; }
html[data-theme] .app-shell .console-heading h1 { margin: 6px 0 0; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.05; font-weight: 800; letter-spacing: -.055em; color: var(--simple-text); }
html[data-theme] .app-shell .console-heading .micro-label { color: var(--simple-quiet); letter-spacing: .09em; }
html[data-theme] .app-shell .console-subtitle { display: block; color: var(--simple-muted); font-size: 13px; margin-top: 7px; }
html[data-theme] .app-shell .desk-summary { gap: 8px; }
html[data-theme] .app-shell .desk-summary > div { min-width: 100px; padding: 8px 11px; border: 1px solid var(--simple-line); border-radius: 10px; background: var(--simple-panel); }
html[data-theme] .app-shell .desk-summary span { color: var(--simple-quiet); font-size: 10px; letter-spacing: 0; }
html[data-theme] .app-shell .desk-summary strong { color: var(--simple-text); font-size: 17px; }

html[data-theme] .app-shell .radio-hardware {
  border: 1px solid var(--simple-line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--simple-panel);
  box-shadow: none;
}
html[data-theme] .app-shell .radio-topline { display: flex; justify-content: space-between; height: 44px; padding: 0 24px; border-bottom: 1px solid var(--simple-line); background: transparent; }
html[data-theme] .app-shell .radio-device-label,
html[data-theme] .app-shell .radio-device-mark { color: var(--simple-muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
html[data-theme] .app-shell .speaker-grill { display: none; }
html[data-theme] .app-shell .radio-face { display: grid; grid-template-columns: minmax(0, 1fr) 154px; grid-template-rows: auto auto auto auto auto; gap: 14px; padding: 24px; }
html[data-theme] .app-shell .screen-bezel { grid-column: 1; grid-row: 1; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme] .app-shell .lcd-screen { min-height: 184px; padding: 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme] .app-shell .lcd-scanline { display: none; }
html[data-theme] .app-shell .lcd-head { color: var(--simple-quiet); }
html[data-theme] .app-shell .lcd-icons > b { border-color: var(--simple-line); color: var(--simple-muted); background: var(--simple-panel-alt); }
html[data-theme] .app-shell .frequency-line { margin: 10px 0 3px; }
html[data-theme] .app-shell .frequency { color: var(--simple-text); font-size: clamp(39px, 4.4vw, 62px); font-weight: 780; letter-spacing: -.055em; text-shadow: none; }
html[data-theme] .app-shell .frequency-unit { color: var(--simple-quiet); }
html[data-theme] .app-shell .channel-readout { margin-bottom: 12px; }
html[data-theme] .app-shell .channel-readout strong { color: var(--simple-text); font-size: 15px; font-weight: 750; }
html[data-theme] .app-shell .speaker-card { border: 1px solid var(--simple-line); border-radius: 10px; background: var(--simple-panel-alt); box-shadow: none; }
html[data-theme] .app-shell .speaker-card strong { color: var(--simple-text); }
html[data-theme] .app-shell .speaker-card small { color: var(--simple-muted); }
html[data-theme] .app-shell .desktop-radio-controls { display: contents; }
html[data-theme] .app-shell .channel-crown-panel { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 10px; border: 1px solid var(--simple-line); border-radius: 12px; background: var(--simple-panel-alt); box-shadow: none; text-align: center; }
html[data-theme] .app-shell .channel-crown-panel > small { color: var(--simple-quiet); letter-spacing: .04em; font-size: 9px; }
html[data-theme] .app-shell .channel-crown-panel > div strong { color: var(--simple-text); font-size: 11px; }
html[data-theme] .app-shell .channel-crown-panel > div small { color: var(--simple-quiet); font-size: 9px; margin-top: 3px; }
html[data-theme] .app-shell .channel-crown { width: 64px; height: 64px; border: 4px solid var(--simple-line); background: var(--simple-panel); color: var(--simple-text); box-shadow: none; cursor: ns-resize; }
html[data-theme] .app-shell .channel-crown::before { inset: 7px; background: var(--simple-panel-alt); box-shadow: none; }
html[data-theme] .app-shell .channel-crown span { height: 9px; top: 5px; background: var(--simple-text); transform-origin: 50% 24px; }
html[data-theme] .app-shell .channel-crown b { font-size: 15px; color: var(--simple-text); }
html[data-theme] .app-shell .channel-crown:disabled { opacity: .48; filter: none; }

html[data-theme] .app-shell .ptt-cluster { grid-column: 1 / -1; grid-row: 2; min-height: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 11px; margin: 0; padding: 16px 0 4px; border: 0; border-top: 1px solid var(--simple-line); border-radius: 0; background: transparent; box-shadow: none; }
html[data-theme] .app-shell .ptt-cluster::before { display: none; }
html[data-theme] .app-shell .ptt-status-line { justify-content: flex-start; color: var(--simple-muted); font-size: 12px; text-transform: none; letter-spacing: 0; }
html[data-theme] .app-shell .ptt-status-line strong { font-weight: 700; }
html[data-theme] .app-shell .ptt-button { width: 100%; height: 88px; aspect-ratio: auto; margin: 0; padding: 0 20px; border: 0; outline: 0; border-radius: 12px; color: var(--simple-action-text); background: var(--simple-action); box-shadow: none; transform: none; }
html[data-theme] .app-shell .ptt-button:not(:disabled):hover { filter: brightness(.92); background: var(--simple-action); }
html[data-theme] .app-shell .ptt-button.is-held { color: #fff; background: #216d50; box-shadow: 0 0 0 3px #65c79a55; transform: scale(.99); }
html[data-theme] .app-shell .ptt-button:disabled { opacity: .46; filter: none; }
html[data-theme] .app-shell .ptt-button__inner { flex-direction: row; gap: 16px; }
html[data-theme] .app-shell .ptt-button__inner > .ui-icon { width: 25px; height: 25px; }
html[data-theme] .app-shell .ptt-button__inner > span { text-align: left; }
html[data-theme] .app-shell .ptt-button__inner b { font-size: 23px; font-weight: 800; }
html[data-theme] .app-shell .ptt-button__inner small { color: inherit; opacity: .8; font-size: 11px; font-weight: 650; letter-spacing: 0; text-transform: none; }
html[data-theme] .app-shell .keyboard-hint { margin: 0; justify-content: flex-start; color: var(--simple-quiet); font-size: 11px; }
html[data-theme] .app-shell .keyboard-hint kbd { color: var(--simple-text); border: 1px solid var(--simple-line); background: var(--simple-panel-alt); border-radius: 5px; }
html[data-theme] .app-shell .keyboard-hint button { color: var(--simple-text); }
html[data-theme] .app-shell .radio-message { grid-column: 1 / -1; grid-row: 3; margin: 0; padding: 6px 0 0; }
html[data-theme] .app-shell .radio-message p,
html[data-theme] .app-shell .audio-health { color: var(--simple-muted); font-size: 11px; }
html[data-theme] .app-shell .audio-health { grid-column: 1 / -1; grid-row: 4; margin: 0; }
html[data-theme] .app-shell .sos-control { grid-column: 1 / -1; grid-row: 5; margin: 0; }
html[data-theme] .app-shell .radio-footer { display: none; }

html[data-theme] .app-shell .status-dock,
html[data-theme] .app-shell .quick-status { border: 1px solid var(--simple-line); border-radius: 12px; background: var(--simple-panel); box-shadow: none; }
html[data-theme] .app-shell .status-dock { padding: 12px 16px; min-height: 60px; }
html[data-theme] .app-shell .status-dock small,
html[data-theme] .app-shell .quick-status-heading small { color: var(--simple-quiet); }
html[data-theme] .app-shell .status-dock strong { color: var(--simple-text); }
html[data-theme] .app-shell .status-dock button { color: var(--simple-text); background: var(--simple-panel-alt); border: 1px solid var(--simple-line); border-radius: 8px; }
html[data-theme] .app-shell .quick-status { padding: 16px; }
html[data-theme] .app-shell .quick-status-heading strong { font-size: 14px; color: var(--simple-text); }
html[data-theme] .app-shell .quick-status-buttons button { min-height: 54px; padding: 9px 12px; border: 1px solid var(--simple-line); border-radius: 8px; background: var(--simple-panel-alt); color: var(--simple-text); font-size: 11px; text-align: left; }
html[data-theme] .app-shell .quick-status-buttons button:hover { border-color: var(--simple-muted); background: var(--simple-panel-alt); }
html[data-theme] .app-shell .quick-status-buttons b { color: var(--simple-quiet); font-size: 11px; }
html[data-theme] .app-shell .quick-status > details summary { color: var(--simple-muted); font-size: 11px; }
html[data-theme] .app-shell .desk-quick-actions { gap: 8px; }
html[data-theme] .app-shell .desk-action { min-height: 62px; padding: 12px 14px; border: 1px solid var(--simple-line); border-radius: 10px; background: var(--simple-panel); box-shadow: none; }
html[data-theme] .app-shell .desk-action:hover { background: var(--simple-panel-alt); }
html[data-theme] .app-shell .desk-action .ui-icon { color: var(--simple-text); }
html[data-theme] .app-shell .desk-action strong { color: var(--simple-text); font-size: 12px; }
html[data-theme] .app-shell .desk-action small { display: block; color: var(--simple-quiet); font-size: 10px; }
html[data-theme] .app-shell #open-hilal-center { color: var(--simple-text); border-color: var(--simple-line); background: var(--simple-panel); }
html[data-theme] .app-shell .desk-more-tools { border: 0; border-top: 1px solid var(--simple-line); }
html[data-theme] .app-shell .desk-more-tools summary { color: var(--simple-muted); min-height: 44px; }
html[data-theme] .app-shell .safety-footer { color: var(--simple-quiet); background: var(--simple-bg); border-top: 1px solid var(--simple-line); }

html[data-theme] .app-shell .rack-tabs { margin: 0 0 18px; padding: 0; border: 0; border-bottom: 1px solid var(--simple-line); border-radius: 0; background: transparent; }
html[data-theme] .app-shell .rack-tab { min-height: 44px; border-radius: 0; color: var(--simple-muted); font-size: 12px; }
html[data-theme] .app-shell .rack-tab.is-active { color: var(--simple-text); background: transparent; box-shadow: inset 0 -2px var(--simple-action); }
html[data-theme] .app-shell .member-card { margin: 0; padding: 12px 6px; border: 0; border-bottom: 1px solid var(--simple-line); border-radius: 0; background: transparent; }
html[data-theme] .app-shell .member-card.is-speaking { border-left: 3px solid #5ac18b; padding-left: 9px; }
html[data-theme] .app-shell :is(.members-empty, .chat-empty) { min-height: 160px; background: transparent; border: 1px dashed var(--simple-line); border-radius: 10px; }
html[data-theme] .app-shell .audio-control { padding: 14px 0 0; margin-top: 14px; border: 0; border-top: 1px solid var(--simple-line); border-radius: 0; background: transparent; }
html[data-theme] .app-shell .chat-form { background: var(--simple-panel); }
html[data-theme] .app-shell .chat-form :is(input, button) { min-height: 44px; }

@media (min-width: 1101px) {
  html[data-theme] .app-shell { grid-template-rows: 68px minmax(0, 1fr) 28px; }
  html[data-theme] .app-shell .workspace { grid-template-columns: clamp(220px, var(--left-rail), 370px) minmax(0, 1fr) clamp(310px, var(--right-rail), 500px); }
  html[data-theme] .app-shell.channels-collapsed .workspace { grid-template-columns: 54px minmax(0, 1fr) clamp(310px, var(--right-rail), 500px); }
  html[data-theme] .app-shell.members-collapsed .workspace { grid-template-columns: clamp(220px, var(--left-rail), 370px) minmax(0, 1fr) 54px; }
  html[data-theme] .app-shell.channels-collapsed.members-collapsed .workspace { grid-template-columns: 54px minmax(0, 1fr) 54px; }
  html[data-theme] .app-shell.is-compact .workspace { grid-template-columns: 1fr; }
  html[data-theme] .app-shell .channel-rack { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; padding: 20px 14px 14px; }
  html[data-theme] .app-shell .member-rack { padding: 16px 14px 14px; }
  html[data-theme] .app-shell .radio-console { overflow: auto; scrollbar-width: thin; }
}

@media (max-width: 1100px) {
  html[data-theme] .app-shell .workspace > .radio-console { max-width: 760px; padding: 24px 18px calc(110px + env(safe-area-inset-bottom)); }
  html[data-theme] .app-shell .workspace > :is(.channel-rack, .member-rack) { margin: 0; min-height: calc(100dvh - 150px); border: 0; border-radius: 0; box-shadow: none; }
  html[data-theme] .app-shell .mobile-nav { left: 0; right: 0; bottom: 0; padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--simple-line); border-radius: 0; background: var(--simple-panel); box-shadow: none; }
  html[data-theme] .app-shell .mobile-nav button { min-height: 52px; border-radius: 8px; color: var(--simple-muted); }
  html[data-theme] .app-shell .mobile-nav button.is-active { color: var(--simple-text); background: var(--simple-panel-alt); }
  html[data-theme] .app-shell .chat-form { bottom: calc(76px + env(safe-area-inset-bottom)); }
  html[data-theme] .app-shell .radio-face { grid-template-columns: minmax(0, 1fr) 132px; }
}

@media (max-width: 600px) {
  html[data-theme] .app-shell .topbar { min-height: 68px; padding-inline: 14px; }
  html[data-theme] .app-shell .compact-brand strong { font-size: 14px; }
  html[data-theme] .app-shell .workspace > .radio-console { gap: 14px; padding: 22px 14px calc(104px + env(safe-area-inset-bottom)); }
  html[data-theme] .app-shell .console-heading { display: block; }
  html[data-theme] .app-shell .console-heading h1 { font-size: 32px; }
  html[data-theme] .app-shell .desk-summary { margin-top: 14px; width: 100%; }
  html[data-theme] .app-shell .desk-summary > div { flex: 1; }
  html[data-theme] .app-shell .radio-topline { height: 38px; padding: 0 16px; }
  html[data-theme] .app-shell .radio-face { display: flex; flex-direction: column; gap: 12px; padding: 17px; }
  html[data-theme] .app-shell .lcd-screen { min-height: 0; padding: 0; }
  html[data-theme] .app-shell .frequency { font-size: clamp(34px, 10vw, 51px); }
  html[data-theme] .app-shell .speaker-card { min-height: 58px; }
  html[data-theme] .app-shell .desktop-radio-controls { display: flex; flex-direction: column-reverse; gap: 12px; order: 1; }
  html[data-theme] .app-shell .channel-crown-panel { display: grid; grid-template-columns: 54px minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: center; text-align: left; padding: 10px 12px; gap: 4px 12px; }
  html[data-theme] .app-shell .channel-crown-panel > small { grid-column: 1 / -1; }
  html[data-theme] .app-shell .channel-crown { width: 52px; height: 52px; }
  html[data-theme] .app-shell .channel-crown span { transform-origin: 50% 18px; }
  html[data-theme] .app-shell .channel-crown-panel > div { min-width: 0; }
  html[data-theme] .app-shell .ptt-cluster { padding-top: 10px; }
  html[data-theme] .app-shell .ptt-button { height: 78px; width: 100%; border-radius: 10px; }
  html[data-theme] .app-shell .ptt-button__inner b { font-size: 20px; }
  html[data-theme] .app-shell .radio-message,
  html[data-theme] .app-shell .audio-health { order: 2; }
  html[data-theme] .app-shell .sos-control { order: 3; }
  html[data-theme] .app-shell .quick-status { display: block; padding: 14px; }
  html[data-theme] .app-shell .quick-status-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; gap: 8px; }
  html[data-theme] .app-shell .quick-status-buttons button { min-height: 62px; }
  html[data-theme] .app-shell .desk-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-theme] .app-shell #open-hilal-center { grid-column: 1 / -1; }
  html[data-theme] .app-shell .desk-action { min-height: 58px; }
  html[data-theme] .app-shell .desk-action small { display: none; }
  html[data-theme] .app-shell .status-dock { display: block; }
  html[data-theme] .app-shell .status-dock button { margin-top: 8px; }
}

@media (max-width: 360px) {
  html[data-theme] .app-shell .console-heading h1 { font-size: 29px; }
  html[data-theme] .app-shell .desk-summary > div { min-width: 0; }
  html[data-theme] .app-shell .desk-action { padding: 9px; }
  html[data-theme] .app-shell .quick-status-buttons button { padding: 8px; }
}

@media (max-width: 1100px) and (max-height: 500px) and (orientation: landscape) {
  html[data-theme] .app-shell .workspace > .radio-console { gap: 8px; padding: 10px 18px 82px; }
  html[data-theme] .app-shell .console-heading { display: none; }
  html[data-theme] .app-shell .radio-topline { height: 32px; }
  html[data-theme] .app-shell .radio-face { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, .55fr); gap: 8px 12px; padding: 12px; }
  html[data-theme] .app-shell .lcd-screen { min-height: 0; }
  html[data-theme] .app-shell .frequency { font-size: clamp(28px, 5vw, 45px); }
  html[data-theme] .app-shell .speaker-card { min-height: 44px; }
  html[data-theme] .app-shell .desktop-radio-controls { display: contents; }
  html[data-theme] .app-shell .ptt-cluster { grid-column: 2; grid-row: 1; align-self: stretch; padding: 0; border: 0; }
  html[data-theme] .app-shell .ptt-button { width: 100%; height: 72px; }
  html[data-theme] .app-shell .ptt-button__inner { gap: 7px; }
  html[data-theme] .app-shell .ptt-button__inner b { font-size: 17px; }
  html[data-theme] .app-shell .ptt-button__inner small { font-size: 9px; }
  html[data-theme] .app-shell .channel-crown-panel { grid-column: 1 / -1; grid-row: 2; min-height: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme] .app-shell .ptt-button { transition: none; }
}
