:root {
  --bg: #0a1116;
  --panel: #0f1620;
  --accent: #00ffd1;
  --accent-2: #00b3ff;
  --danger: #ff6b6b;
  --muted: #95a7b7;
  --card-radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter,Roboto,'Segoe UI',Helvetica,Arial,sans-serif;
  background: var(--bg);
  color: #eaf6f6;
  overflow-x: hidden;
}

.wrap { 
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 35px 60px;
  min-height: 100vh;
  box-sizing: border-box;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10,17,22,0.92);
  border-bottom: 1px solid rgba(0,255,209,0.12);
  padding: 14px 0 10px;
  margin-bottom: 10px;
}

.status-line {
  font-size: 0.9em;
  color: var(--muted);
  margin-top: 4px;
}

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

.brand { 
  display: flex; 
  gap: 13px; 
  align-items: center; 
  min-width: 0; 
}

.logo { 
  width: 56px; 
  height: 56px; 
  border-radius: 8px; 
  box-shadow: 0 8px 30px rgba(0,179,255,0.08); 
  flex-shrink: 0; 
}

.brand h1 { 
  margin: 0; 
  font-size: 2em; 
  color: var(--accent); 
  white-space:nowrap;
}

.player-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.btn {
  background: linear-gradient(90deg, #00ffd1 30%, #00b3ff 100%);
  color: #002b29;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1em;
  padding: 10px 24px;
  box-shadow: 0 3px 16px rgba(0,255,209,0.2);
  transition: box-shadow .15s, transform .15s;
  cursor: pointer;
}
.btn:disabled,
.btn.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,255,209,0.3);
}
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,255,209,0.25);
}

.btn-ghost {
  background: #0f1d27;
  color: var(--accent);
  border: 1px solid rgba(0,255,209,0.35);
  box-shadow: none;
  padding: 10px 14px;
}
.btn-ghost:hover {
  box-shadow: 0 5px 20px rgba(0,255,209,0.2);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 44px;
  padding: 0;
  border-radius: 9px;
}
.btn-icon svg {
  display: none;
}
.btn-icon .icon-play {
  display: block;
}
.btn-icon.playing .icon-play {
  display: none;
}
.btn-icon.playing .icon-pause {
  display: block;
}

select, input, textarea { 
  font-family: inherit; 
  background: #182631; 
  color: #eaf6f6; 
  border-radius: 7px; 
  border: 1.3px solid var(--accent); 
  font-size: 1em; 
  padding: 7px 11px;
  box-sizing: border-box;
}

.input-ghost {
  background:#0f1d27;
  border-color: rgba(0,255,209,0.35);
}

.inline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.inline-filters input,
.inline-filters select {
  border-color: rgba(0,255,209,0.35);
  background: #0f1d27;
}

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

.inline-form input {
  min-width: 180px;
}

.orders-toolbar .inline-filters {
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
  gap: 6px;
}

.orders-toolbar .inline-filters:first-child input,
.orders-toolbar .inline-filters:first-child select {
  min-width: 140px;
  flex: 1 1 160px;
}

.orders-toolbar .inline-filters input,
.orders-toolbar .inline-filters select {
  flex: 1 1 160px;
  min-width: 140px;
}

.orders-toolbar .inline-form {
  flex: 1 1 220px;
}

.orders-toolbar .inline-form input {
  flex: 1 1 160px;
  min-width: 140px;
}

.orders-table th:nth-child(6),
.orders-table td:nth-child(6) {
  max-width: 360px;
}

.orders-table td:nth-child(6) .badge {
  margin-right: 6px;
}

.orders-table td:nth-child(6) span:last-child {
  display: inline-block;
}

.badge-compact {
  padding: 1px 5px;
  font-size: 0.72em;
  line-height: 1;
  border-radius: 999px;
}

.card-admin > .inline-filters,
.card-admin > .sub-toolbar {
  margin-top: 8px;
}

.card-admin .sub-toolbar {
  padding: 8px;
  border-radius: 10px;
  background: rgba(0,255,209,0.04);
  border: 1px solid rgba(0,255,209,0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-admin > .inline-filters {
  padding: 8px;
  border-radius: 10px;
  background: rgba(0,255,209,0.04);
  border: 1px solid rgba(0,255,209,0.12);
}

.card-admin > .table-scroll {
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,209,0.12);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0;
  background: transparent;
}

.orders-scroll {
  overflow-x: hidden;
}

.card-admin table {
  background: #0f1620;
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
}

.orders-table {
  width: 100%;
  table-layout: fixed;
}

.orders-table th,
.orders-table td {
  font-size: 0.85em;
  line-height: 1.1;
  padding-top: 3px;
  padding-bottom: 3px;
  padding-left: 4px;
  padding-right: 4px;
  white-space: normal;
  word-break: break-word;
  box-sizing: border-box;
}

.orders-table th:nth-child(1),
.orders-table td:nth-child(1) { width: 26px; }
.orders-table th:nth-child(2),
.orders-table td:nth-child(2) { width: 52px; }
.orders-table th:nth-child(3),
.orders-table td:nth-child(3) { width: 110px; }
.orders-table th:nth-child(4),
.orders-table td:nth-child(4) { width: 110px; }
.orders-table th:nth-child(5),
.orders-table td:nth-child(5) { width: 180px; }
.orders-table th:nth-child(6),
.orders-table td:nth-child(6) { width: 200px; }
.orders-table th:nth-child(7),
.orders-table td:nth-child(7) { width: 120px; }
.orders-table th:nth-child(8),
.orders-table td:nth-child(8) { width: 70px; }
.orders-table th:nth-child(9),
.orders-table td:nth-child(9) { width: 90px; }

@media (max-width: 1200px) {
  .orders-table th:nth-child(5),
  .orders-table td:nth-child(5) { width: 180px; }
  .orders-table th:nth-child(6),
  .orders-table td:nth-child(6) { width: 200px; }
}

.card-admin table thead th:first-child,
.card-admin table tbody td:first-child {
  padding-left: 12px;
}

.card-admin table thead th:last-child,
.card-admin table tbody td:last-child {
  padding-right: 12px;
}

.card-admin form {
  margin-top: 8px;
}

.card-admin h3 {
  margin-top: 0;
}

.admin-wrap {
  padding: 0 28px;
}

.site-footer {
  max-width: 1200px;
  margin: 24px auto 32px;
  padding: 0 20px;
  color: rgba(255,255,255,0.7);
  font-size: 0.95em;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.site-footer a {
  color: #00ffd1;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.tab-pane .card-admin {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .admin-wrap {
    padding: 0 16px;
  }
  .tab-pane .card-admin {
    max-width: 100%;
  }
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table-scroll table {
  min-width: 720px;
}

.orders-scroll table {
  min-width: 0;
}

.table-sticky thead tr th {
  position: sticky;
  top: 0;
  background: #0f1620;
  z-index: 2;
}

.table-zebra tbody tr:nth-child(odd) {
  background: rgba(255,255,255,0.02);
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,209,0.25);
  color: #eaf6f6;
  background: rgba(0,255,209,0.08);
  cursor: pointer;
  font-size: 0.9em;
}

.pill.active {
  background: linear-gradient(90deg,#00ffd1,#00a6ff);
  color: #002b29;
  border-color: transparent;
}

.pill-group { display:flex; gap:6px; flex-wrap:wrap; }

.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { padding:4px 8px; border-radius:999px; background: rgba(0,255,209,0.1); border:1px solid rgba(0,255,209,0.25); font-size:0.85em; }
.chip.good { background: rgba(0,255,209,0.12); border-color: rgba(0,255,209,0.35); }
.chip.danger { background: rgba(255,99,132,0.12); border-color: rgba(255,99,132,0.4); }
.chip.warn { background: rgba(255,193,7,0.12); border-color: rgba(255,193,7,0.35); }
.chip.info { background: rgba(80,170,255,0.14); border-color: rgba(80,170,255,0.4); }

.btn-icon-sm {
  width: 32px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
}

.ip-list.ip-collapsed .hidden-ip { display: none; }

.hidden { display: none !important; }

.volume-bar {
  position: relative;
  width: 220px;
  height: 32px;
  --thumb-size: 18px;
  --track-height: 12px;
  --volume: 1;
}

.volume-bar__track {
  position: absolute;
  left: calc(var(--thumb-size) / 2);
  right: calc(var(--thumb-size) / 2);
  top: 50%;
  transform: translateY(-50%);
  height: var(--track-height);
  border-radius: 999px;
  background: rgba(8,18,26,0.9);
  border: 1px solid rgba(0,255,209,0.22);
  box-shadow: inset 0 1px 6px rgba(0,0,0,0.45);
}

.volume-bar__fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,255,209,0.8), rgba(0,166,255,0.85));
  transform-origin: left center;
  transform: scaleX(var(--volume));
}

.volume-bar__thumb {
  position: absolute;
  top: 50%;
  left: calc(var(--thumb-size) / 2 + var(--volume) * (100% - var(--thumb-size)));
  transform: translate(-50%, -50%);
  width: var(--thumb-size);
  height: var(--thumb-size);
  border-radius: 50%;
  background: linear-gradient(135deg, #1de9b6, #00b3ff);
  border: 2px solid rgba(10,17,22,0.85);
  box-shadow: 0 3px 8px rgba(0,179,255,0.35);
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.volume-bar:hover .volume-bar__thumb {
  transform: translate(-50%, -50%) scale(1.35);
}

.volume-bar__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

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

#langSelect {
  min-width: 110px;
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background: rgba(10, 17, 22, 0.92);
  border: 1px solid rgba(0, 255, 209, 0.4);
  color: #eaf6f6;
  padding: 14px 18px;
  border-radius: 9px;
  min-width: 220px;
  box-shadow: 0 6px 20px rgba(0, 255, 209, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: toast-in 0.25s ease;
}

.toast.success {
  border-color: rgba(0, 255, 209, 0.6);
}

.toast.error {
  border-color: rgba(255, 99, 132, 0.7);
}

.toast.warning {
  border-color: rgba(255, 193, 7, 0.6);
}

.toast.info {
  border-color: rgba(0, 179, 255, 0.6);
}

.toast button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1em;
  padding: 0;
}

@keyframes toast-in {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.hiding {
  animation: toast-out 0.18s ease forwards;
}

@keyframes toast-out {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-8px);
    opacity: 0;
  }
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 35px;
  align-items: flex-start;
}

.left { 
  display: flex; 
  flex-direction: column; 
  gap: 16px; 
  min-width: 0;
}

.player.card {
  display: flex; 
  gap: 15px; 
  align-items: center;
  padding: 18px 14px; 
  background: var(--panel); 
  border-radius: 9px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.coverimg { 
  width: 75px; 
  height: 75px; 
  border-radius: 9px; 
  object-fit: cover; 
  box-shadow: 0 8px 27px rgba(0,179,255,0.10); 
}

.meta { 
  flex: 1; 
  min-width: 0; 
  padding-left: 4px; 
  padding-right: 4px; 
}

.player-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,255,209,0.12);
  color: #00ffd1;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8em;
}
.live-badge.onair {
  background: rgba(255, 99, 132, 0.18);
  color: #ff7ea8;
}
.listener-badge {
  color: #9fe9ff;
  font-size: 0.85em;
}

.trackTitle { 
  font-weight: 700; 
  font-size: 1.2em; 
}

.trackArtist { 
  color: var(--accent-2); 
  font-size: 1.05em; 
}

.progress { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin-top: 8px;
}

.progress-bar {
  width: 100%;
  max-width: 800px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-bar .progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ee7c6, #00a6ff);
  transition: width 0.2s linear;
}

.form-card.card {
  background: var(--panel);
  border-radius: var(--card-radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.chat.card {
  background: var(--panel);
  border-radius: var(--card-radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-settings-btn {
  background: rgba(0,255,209,0.08);
  border: 1px solid rgba(0,255,209,0.25);
  color: #b7f6ff;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}

.chat-settings-btn:hover {
  background: rgba(0,255,209,0.16);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.modal-panel {
  position: relative;
  width: min(520px, 92vw);
  max-height: 80vh;
  overflow: hidden;
  background: #0f1722;
  border: 1px solid rgba(0,255,209,0.2);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #eaf6f6;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}

.modal-list {
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 6px;
  background: #0b131c;
  max-height: 40vh;
}

.modal-item {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.modal-item:hover { background: rgba(0,255,209,0.08); }

.right { 
  display: flex; 
  flex-direction: column; 
  gap: 16px;
  min-width: 0;
}

.card-admin {
  box-shadow: var(--shadow);
  border-radius: var(--card-radius);
  border: 1px solid rgba(0,255,209,0.12);
}

.tabs-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sub-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.flex-gap-12 { display:flex; gap:12px; flex-wrap:wrap; }

.accent-border { border:1px dashed rgba(0,255,209,0.35); border-radius:8px; padding:10px; }

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,209,0.25);
  color: #eaf6f6;
  background: rgba(0,255,209,0.08);
  cursor: pointer;
  font-size: 0.9em;
}

.pill.active {
  background: linear-gradient(90deg,#00ffd1,#00a6ff);
  color: #002b29;
  border-color: transparent;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.table-scroll table {
  min-width: 720px;
}

@media (max-width: 1199px) {
  .wrap { padding: 16px 20px 40px; }
  .card-admin { padding: 12px; }
  .header { flex-direction: column; align-items: flex-start; }
}

.request input,
.request textarea {
  box-sizing: border-box;
  width: 100%;
  margin: 6px 0;
}

.request textarea {
  min-height: 90px;
  max-height: 220px;
  line-height: 1.35;
  overflow-y: hidden;
  resize: none;
}

.request-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
  font-size: 0.9em;
  color: rgba(255,255,255,0.85);
}
.request-progress.hidden {
  display: none;
}
.request-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(0,255,209,0.15);
  border-radius: 999px;
  overflow: hidden;
}
.request-progress-bar > #reqUploadProgressFill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,#00ffd1,#00a6ff);
  border-radius: inherit;
  transition: width .2s ease;
}
.request-status {
  font-size: 0.9em;
  color: rgba(255,255,255,0.85);
  margin: 4px 0 8px;
}
.request-status.hidden {
  display: none;
}

.request-option {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 4px 0 12px;
  font-size: 0.9em;
  color: rgba(255,255,255,0.85);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0,255,209,0.06);
  border: 1px solid rgba(0,255,209,0.15);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.request-options-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.request-options-row .request-option {
  flex: 1 1 240px;
  margin: 4px 0;
}

.request-upload-row {
  margin: 8px 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px dashed rgba(0,255,209,0.25);
  background: rgba(0,255,209,0.04);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.request-upload-label {
  font-weight: 600;
  font-size: 0.92em;
}

.request-upload-hint {
  color: rgba(255,255,255,0.6);
  font-size: 0.85em;
}

.upload-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.upload-drop {
  border: 1px solid rgba(0,255,209,0.2);
  background: rgba(8,17,25,0.65);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-drop.dragover {
  border-color: rgba(0,255,209,0.6);
  background: rgba(0,255,209,0.08);
}

.upload-btn {
  white-space: nowrap;
}

.upload-filename {
  font-size: 0.9em;
  color: rgba(255,255,255,0.85);
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-hint-inline {
  font-size: 0.85em;
  color: rgba(255,255,255,0.6);
}



.request-open-btn {
  margin-top: 6px;
}


.modal-panel-wide {
  width: min(680px, 92vw);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-body input,
.modal-body textarea {
  width: 100%;
  margin: 6px 0;
  box-sizing: border-box;
}

.modal-body .request-options-row {
  margin-top: 4px;
}

.modal-body .request-options-row .request-option {
  margin: 4px 0 8px;
}

.modal-request-meta {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.request-disabled-msg {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255,107,107,0.4);
  color: #ff9c9c;
  font-size: 0.9em;
}

.request-option:hover {
  border-color: rgba(0,255,209,0.35);
}

.request-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.request-option .option-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #081119;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  position: relative;
}

.request-option .option-check::after {
  content: '✓';
  color: #002b29;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.request-option input[type="checkbox"]:checked + .option-check {
  background: linear-gradient(120deg,#00ffd1,#00a6ff);
  border-color: transparent;
}

.request-option input[type="checkbox"]:checked + .option-check::after {
  opacity: 1;
}

.request-option input[type="checkbox"]:focus-visible + .option-check {
  box-shadow: 0 0 0 2px rgba(0,255,209,0.4);
}

.request-option .option-body {
  display: flex;
  flex-direction: column;
}

.request-option .option-title {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.request-option small {
  display: block;
  color: rgba(255,255,255,0.65);
  line-height: 1.35;
}

.request-notice {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255,193,7,0.25);
  color: #ffdd91;
  font-size: 0.85em;
}

.request-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.request-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78em;
  color: #b7f6ff;
}

.request-meta span {
  background: linear-gradient(135deg, rgba(0,255,209,0.12), rgba(0,168,255,0.08));
  border: 1px solid rgba(0,255,209,0.28);
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.status-pill.on {
  background: rgba(0,255,209,0.2);
  border-color: rgba(0,255,209,0.45);
  color: #c9fff6;
}

.status-pill.off {
  background: rgba(255,99,132,0.18);
  border-color: rgba(255,99,132,0.5);
  color: #ffd0da;
}

.requests-list {
  height: 130px;
  overflow-y: auto;
  background: rgba(0,255,209,0.04);
  border-radius: 7px;
  padding: 6px;
  flex-shrink: 0;
  margin-top: 6px;
}

.order-line {
  margin: 0;
  padding: 5px 9px;
  line-height: 1.4em;
  font-size: .95em;
  color: #1afff7;
  border-bottom: 1px dashed rgba(255,255,255,0.04);
  background: rgba(0,255,209,0.02);
  border-radius: 4px;
  margin-bottom: 3px;
}

.order-time {
  margin-left: 6px;
  font-size: 0.85em;
  color: rgba(234,246,246,0.7);
}

.chat-box { 
  height: 435px;
  overflow-y: auto; 
  padding: 10px; 
  border-radius: 9px; 
  background: linear-gradient(180deg, rgba(0,179,255,0.04), rgba(0,0,0,0.03));
  margin-bottom: 6px;
  flex-shrink: 0;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg {
  margin-bottom: 6px;
  padding: 8px 12px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(0,255,209,0.07), rgba(0,179,255,0.05));
  color: #18dee9;
  font-size: .96em;
  line-height: 1.4em;
  border-left: 2.5px solid rgba(0,255,209,0.28);
  transition: transform 0.15s ease;
}
.chat-msg:hover { transform: translateX(2px); }
.chat-msg.new-message { animation: slideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.chat-msg .chat-nick {
  font-weight: 700;
  color: #eaf6f6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chat-msg .chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-msg .chat-time {
  margin-left: auto;
  font-size: 0.78em;
  color: rgba(255,255,255,0.55);
}
.chat-msg .chat-badges span { font-size: 0.85em; }
.chat-msg .chat-text { color: #9fe9ff; display:block; margin-top:4px; }
.chat-msg .chat-reply {
  background: rgba(0,255,209,0.08);
  border-left: 2px solid rgba(0,255,209,0.4);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.85em;
  margin-bottom: 6px;
  color: #8fe9ff;
}

.chat-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
  flex-shrink: 0;
}

.reply-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,255,209,0.08);
  border: 1px solid rgba(0,255,209,0.2);
  font-size: 0.85em;
}
.reply-preview.hidden { display: none; }
.reply-preview button {
  border: none;
  background: transparent;
  color: #00ffd1;
  font-size: 1.1em;
  cursor: pointer;
}
.reply-preview .reply-label { color: #8fe9ff; font-weight: 600; }

.emoji-toggle {
  border: none;
  background: rgba(0,255,209,0.18);
  border-radius: 8px;
  font-size: 1.4em;
  padding: 0 8px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.emoji-toggle:hover { transform: translateY(-1px); }

.emoji-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 6px;
  background: rgba(8,18,26,0.95);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,255,209,0.25);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  max-height: 160px;
  overflow-y: auto;
}
.emoji-picker.hidden { display: none; }
.emoji-picker button {
  border: none;
  background: transparent;
  font-size: 1.2em;
  cursor: pointer;
}

.chat-context {
  position: fixed;
  background: rgba(8,18,26,0.97);
  border: 1px solid rgba(0,255,209,0.2);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  padding: 6px 0;
  z-index: 2000;
  min-width: 160px;
}
.chat-context.hidden { display: none; }
.chat-context button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #eaf6f6;
  padding: 8px 14px;
  cursor: pointer;
}
.chat-context button:hover { background: rgba(0,255,209,0.12); }

.chat-controls input {
  padding: 9px 12px;
  border-radius: 7px;
  min-width: 0;
  width: 100%;
}

.chat-message-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.chat-message-row textarea {
  flex: 1 1 auto;
  resize: none;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  overflow-y: auto;
  border-radius: 7px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 1em;
  line-height: 1.4em;
  border: 1.3px solid var(--accent);
  background: #182631;
  color: #eaf6f6;
}

.chat-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  width: 56px;
  min-width: 56px;
}

.chat-send-btn svg {
  pointer-events: none;
}

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

.block-title {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.05em;
  display: block;
  margin-bottom: 10px;
}

::-webkit-scrollbar { 
  width: 6px;
  height: 6px;
  background: transparent;
}

::-webkit-scrollbar-thumb { 
  background: rgba(0,255,209,0.2); 
  border-radius: 999px; 
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,255,209,0.5);
}

@media (max-width:1200px){ 
  .main-grid{
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
  } 
  .right{
    margin-top: 20px;
    height: auto;
  }
  .wrap {
    padding: 20px;
  }
  .chat.card {
    height: auto;
  }
}


/* APPENDED radio_ui_update */

/* --- radio_ui_update: appended styles --- */
.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(46,231,198,0.12), rgba(46,231,198,0.06));
  border: 1px solid rgba(46,231,198,0.18);
  color: #2ee7c6;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .18s ease;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.play-btn.playing {
  background: linear-gradient(180deg, rgba(46,231,198,0.22), rgba(46,231,198,0.08));
  box-shadow: 0 6px 18px rgba(46,231,198,0.08);
  transform: translateY(-1px);
}

.progress-bar {
  width: 100%;
  max-width: 800px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-bar .progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ee7c6, #00a6ff);
  transition: width 0.2s linear;
}

/* small responsive */
@media (max-width:600px) {
  .progress-bar { max-width: 100%; height:8px; }
}
/* --- end appended styles --- */
.history.card { margin-top: 16px; }
.history-list { display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow-y: auto; }
.history-item { display: flex; gap: 10px; align-items: center; background: rgba(10,25,35,0.7); border-radius: 10px; padding: 8px 10px; }
.history-item img { width: 48px; height: 48px; border-radius: 8px; object-fit:cover; }
.history-item .history-meta { flex:1; }
.history-item .history-meta .title { font-weight:600; color:#eaf6f6; }
.history-item .history-meta .subtitle { font-size:0.85em; color:#8fe9ff; }
.history-item .history-meta .time { font-size:0.75em; color:#6aa3b3; }
.history-item.empty {
  justify-content: center;
  font-size: 0.9em;
  color: #7da1b4;
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.shimmer {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(to right, rgba(0,255,209,0.02) 4%, rgba(0,255,209,0.08) 25%, rgba(0,255,209,0.02) 36%);
  background-size: 1000px 100%;
  border-radius: inherit;
}

.chat-controls-relative {
  position: relative;
}

.chat-scroll-down {
  position: absolute;
  bottom: 60px;
  right: 15px;
  background: rgba(0,255,209,0.15);
  border: 1px solid rgba(0,255,209,0.4);
  color: #00ffd1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: all 0.2s;
  z-index: 100;
  opacity: 1;
}

.chat-scroll-down:hover {
  background: rgba(0,255,209,0.3);
  transform: scale(1.1);
}

.chat-scroll-down.hidden { 
  display: none; 
}
