/* HostEaagle Cloud Console base theme */
:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8f0ff;
  background: #07101c;
  --panel: #0d1a2a;
  --panel2: #122238;
  --border: rgba(151, 181, 224, .17);
  --muted: #8396b4;
  --cyan: #5ee7ff;
  --green: #62e6a7;
  --amber: #ffc56b;
  --red: #ff7d90;
}

* { box-sizing: border-box; }
body:not(.authenticated) .app-shell { display: none; }
body:not(.authenticated) { min-height: 100vh; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-width: 0;
  background: radial-gradient(circle at 80% -10%, #1d3f61 0, #07101c 40%), #07101c;
}
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  flex: 0 0 250px;
  border-right: 1px solid var(--border);
  background: rgba(6, 15, 27, .84);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 13px; letter-spacing: .16em; font-weight: 800; }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .2em; margin-top: 5px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, #4be5ff, #5579ff); color: #051220; font-size: 20px; }
.sidebar nav { display: grid; gap: 7px; margin-top: 50px; }
.nav-item { border: 0; background: transparent; color: #90a3bf; text-align: left; border-radius: 10px; padding: 12px 14px; font-size: 13px; cursor: pointer; }
.nav-item:hover, .nav-item.active { background: rgba(93, 202, 255, .12); color: #fff; }
.sidebar-footer { margin-top: auto; color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 8px; padding: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #66758a; }

.main-content { width: calc(100% - 250px); min-width: 0; padding: 30px 42px 60px; max-width: 1700px; }
.topbar, .section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.eyebrow { font-size: 10px; letter-spacing: .2em; color: var(--cyan); font-weight: 700; margin: 0 0 8px; }
.topbar h1, h2 { margin: 0; letter-spacing: -.03em; }
.topbar h1 { font-size: 29px; }
.section-heading { margin: 38px 0 18px; }
.section-heading h2 { font-size: 22px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.primary-button, .ghost-button { border: 1px solid var(--border); border-radius: 9px; padding: 10px 15px; font-size: 12px; font-weight: 700; cursor: pointer; }
.primary-button { background: linear-gradient(135deg, #4be5ff, #667cff); color: #061324; border: 0; }
.ghost-button { background: rgba(255,255,255,.03); color: #d7e4f7; }
.primary-button:hover, .ghost-button:hover { filter: brightness(1.12); }
.user-badge { font-size: 11px; color: var(--muted); padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; }

.auth-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: linear-gradient(105deg, rgba(74,210,246,.15), rgba(95,116,255,.12)); border: 1px solid rgba(95,215,255,.25); border-radius: 14px; padding: 18px 20px; margin-top: 30px; }
.auth-banner p { margin: 5px 0 0; color: #9db0cb; font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.metric-card, .radio-card, .table-card, .schedule-card, .activity-item { background: linear-gradient(145deg, rgba(18,34,56,.92), rgba(10,23,39,.92)); border: 1px solid var(--border); border-radius: 14px; }
.metric-card { padding: 19px; min-width: 0; }
.metric-card span, .metric-card small { display: block; color: var(--muted); font-size: 11px; }
.metric-card strong { display: block; font-size: 31px; margin: 11px 0 5px; overflow: hidden; text-overflow: ellipsis; }
.metric-card.live strong { color: var(--green); }
.radio-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 15px; }
.radio-card { padding: 19px; min-height: 174px; }
.radio-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.radio-logo { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; background: linear-gradient(135deg,#344e85,#54d8e9); display: grid; place-items: center; font-weight: 900; color: #071120; }
.radio-name { font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-meta { color: var(--muted); font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { margin-left: auto; font-size: 10px; border-radius: 100px; padding: 5px 8px; background: rgba(98,230,167,.13); color: var(--green); white-space: nowrap; }
.pill.offline { color: var(--red); background: rgba(255,125,144,.12); }
.radio-stats { display: flex; gap: 24px; margin: 19px 0; color: var(--muted); font-size: 11px; }
.radio-stats strong { display: block; color: #e9f3ff; font-size: 17px; margin-top: 4px; }
.card-actions { display: flex; gap: 8px; }
.card-actions button { flex: 1; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: #172a43; color: #d7e6fa; font-size: 11px; cursor: pointer; }
.card-actions .danger { color: #ff9aaa; }

.table-card { overflow: hidden; }
.table-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; padding: 14px 17px; border-bottom: 1px solid var(--border); font-size: 12px; align-items: center; }
.table-row:last-child { border: 0; }
.table-header { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.schedule-list, .activity-list { display: grid; gap: 10px; }
.schedule-card, .activity-item { padding: 16px; }
.schedule-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.schedule-card p, .activity-item p { margin: 4px 0; color: var(--muted); font-size: 11px; }
.empty-state { grid-column: 1/-1; padding: 50px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; }
.hidden { display: none !important; }

dialog { border: 0; border-radius: 18px; background: transparent; padding: 0; color: #e8f0ff; max-width: 450px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(2,8,16,.76); backdrop-filter: blur(7px); }
.dialog-card { position: relative; background: #0d1a2a; border: 1px solid var(--border); border-radius: 18px; padding: 28px; display: grid; gap: 15px; box-shadow: 0 25px 100px #000; }
.dialog-card h2 { font-size: 25px; }
.dialog-help { color: var(--muted); font-size: 12px; line-height: 1.5; }
.dialog-card label { display: grid; gap: 7px; color: #a9bad2; font-size: 11px; }
.dialog-card input, .dialog-card select, .dialog-card textarea { background: #091523; border: 1px solid var(--border); border-radius: 8px; color: white; padding: 11px; }
.dialog-close { position: absolute; right: 15px; top: 13px; border: 0; background: none; color: #8ea3bf; font-size: 24px; cursor: pointer; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; }
.toast { position: fixed; right: 28px; bottom: 25px; z-index: 10; background: #132942; border: 1px solid var(--border); padding: 12px 16px; border-radius: 9px; color: #dceaff; font-size: 12px; opacity: 0; transform: translateY(10px); transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.demo-box { display: grid; gap: 9px; border: 1px dashed rgba(94,231,255,.35); border-radius: 11px; padding: 13px; background: rgba(94,231,255,.05); }
.demo-box strong { font-size: 12px; }
.demo-box p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.demo-box .ghost-button { justify-self: start; }

/* Dedicated, light authentication surface shared by radio users. */
.auth-dialog { width:min(470px,calc(100vw - 28px)); background:#fff; color:#18263c; border:1px solid #e1e6ef; box-shadow:0 25px 80px rgba(24,47,78,.22); }
.auth-dialog h2 { color:#172a46; letter-spacing:-.045em; }
.auth-dialog .dialog-help { color:#68758a; }
.auth-dialog label { color:#53637b; }
.auth-dialog input { background:#fbfcfe; color:#18263c; border-color:#d8dfeb; }
.auth-brand { display:flex; align-items:center; gap:10px; margin-bottom:2px; }
.auth-brand strong { display:block; color:#172a46; font-size:12px; letter-spacing:.08em; }
.auth-brand small { display:block; margin-top:3px; color:#9aa6b7; font-size:9px; letter-spacing:.14em; }
.auth-logo { width:35px; height:35px; display:grid; place-items:center; border-radius:11px; color:#fff; background:linear-gradient(135deg,#172a46,#c56b2c); font-size:16px; font-weight:900; }
.admin-logo { background:linear-gradient(135deg,#172a46,#47617e); }
.auth-support { display:flex; justify-content:space-between; gap:12px; color:#8b98aa; font-size:10px; }
.auth-support a { color:#c56b2c; text-decoration:none; }
.auth-switch { width:auto; justify-self:center; margin:0; padding:2px 0; border:0; color:#c56b2c; background:none; box-shadow:none; font-size:11px; font-weight:750; cursor:pointer; }

@media (min-width: 901px) and (max-width: 1200px) {
  .main-content { padding: 24px; }
  .topbar, .section-heading { align-items: flex-start; flex-direction: column; }
  .top-actions { flex-wrap: wrap; }
  .radio-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { width: auto; min-height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { display: flex; overflow-x: auto; margin-top: 18px; padding-bottom: 2px; }
  .nav-item { white-space: nowrap; }
  .sidebar-footer { display: none; }
  .main-content { width: 100%; padding: 20px 16px 40px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { padding: 14px; }
  .metric-card strong { font-size: 25px; }
  .radio-grid { grid-template-columns: 1fr; }
  .topbar, .section-heading { align-items: flex-start; flex-direction: column; }
  .top-actions { flex-wrap: wrap; }
  .auth-banner { align-items: flex-start; flex-direction: column; }
  .table-card { overflow-x: auto; }
  .table-row { min-width: 540px; }
}
