/* RadioSweb SaaS — Admin Panel CSS */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0F0F13; color: #E8E8F0;
  -webkit-font-smoothing: antialiased; min-height: 100%;
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.app       { display: flex; min-height: 100vh; }
.sidebar   {
  width: 240px; flex-shrink: 0; background: #161620;
  border-right: 1px solid rgba(255,255,255,.07);
  display: flex; flex-direction: column; position: fixed;
  top: 0; bottom: 0; left: 0; overflow-y: auto;
}
.main      { margin-left: 240px; flex: 1; display: flex; flex-direction: column; }
.topbar    {
  height: 56px; border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; background: #0F0F13; flex-shrink: 0;
  position: sticky; top: 0; z-index: 10;
}
.page-content { padding: 32px; flex: 1; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar-logo {
  padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: #00B4FF; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 0 12px rgba(0,180,255,.3);
}
.logo-text { font-weight: 700; font-size: 14px; color: #fff; letter-spacing: -.01em; }
.logo-sub  { font-size: 9px; color: rgba(255,255,255,.3); letter-spacing: .12em; text-transform: uppercase; }

.nav-section { padding: 16px 12px 4px; }
.nav-label   { font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: rgba(255,255,255,.25); font-weight: 600; padding: 0 8px; margin-bottom: 4px; }
.nav-item    {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; text-decoration: none;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,.5);
  transition: all .15s; margin-bottom: 2px;
}
.nav-item:hover  { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: rgba(0,180,255,.12); color: #00B4FF; }
.nav-item svg    { flex-shrink: 0; opacity: .7; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  margin-top: auto; padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.07);
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.breadcrumb a { color: rgba(255,255,255,.4); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,.2); }
.breadcrumb strong { color: #fff; font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.4); }
.topbar-user a { color: rgba(255,255,255,.35); text-decoration: none; font-size: 12px; }
.topbar-user a:hover { color: #f66; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: #1E1E2A; border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; overflow: hidden;
}
.card-header {
  padding: 18px 24px; border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 600; color: #fff; }
.card-body  { padding: 24px; }

/* ── STATS ROW ───────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
.stat-card  {
  background: #1E1E2A; border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px; padding: 20px 24px;
}
.stat-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.stat-sub   { font-size: 12px; color: rgba(255,255,255,.3); margin-top: 4px; }

/* ── TABLE ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 12px 16px; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.3); font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
td { padding: 14px 16px; font-size: 13px; color: rgba(255,255,255,.7); border-bottom: 1px solid rgba(255,255,255,.04); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── STATION TABLE SPECIFICS ─────────────────────────────── */
.station-name { font-weight: 600; color: #fff; }
.station-slug { font-family: monospace; font-size: 12px; color: rgba(255,255,255,.35); }
.accent-dot   { width: 12px; height: 12px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 6px; }
.badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: .03em;
}
.badge-green { background: rgba(0,196,79,.15); color: #00C44F; }
.badge-gray  { background: rgba(255,255,255,.07); color: rgba(255,255,255,.4); }
.badge-blue  { background: rgba(0,180,255,.12); color: #00B4FF; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0 16px; height: 36px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: filter .15s, opacity .15s;
  font-family: inherit; white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); }
.btn-primary { background: #00B4FF; color: #000; }
.btn-danger  { background: rgba(230,57,70,.15); color: #E63946; border: 1px solid rgba(230,57,70,.2); }
.btn-danger:hover { background: rgba(230,57,70,.25); filter: none; }
.btn-ghost   { background: rgba(255,255,255,.07); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.1); }
.btn-ghost:hover { background: rgba(255,255,255,.12); filter: none; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }

/* ── FORMS ───────────────────────────────────────────────── */
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-full   { grid-column: span 2; }
.form-group  { display: flex; flex-direction: column; gap: 6px; }
.form-label  { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.5); letter-spacing: .03em; }
.form-input, .form-select, .form-textarea {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; color: #fff; font-family: inherit; font-size: 14px;
  padding: 10px 14px; outline: none; transition: border-color .15s, background .15s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(0,180,255,.5); background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 3px rgba(0,180,255,.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: rgba(255,255,255,.2); }
.form-select { cursor: pointer; }
.form-select option { background: #1E1E2A; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: rgba(255,255,255,.25); }

/* Color input */
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type="color"] {
  width: 40px; height: 38px; padding: 2px; border-radius: 6px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}
.color-row .form-input { flex: 1; }

/* ── SECTIONS GRID ───────────────────────────────────────── */
.sections-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.section-toggle {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; transition: border-color .15s;
  cursor: pointer; user-select: none;
}
.section-toggle:hover { border-color: rgba(0,180,255,.3); }
.section-toggle.on { border-color: rgba(0,180,255,.25); background: rgba(0,180,255,.06); }
.section-info { display: flex; align-items: center; gap: 10px; }
.section-icon { font-size: 18px; }
.section-name { font-size: 13px; font-weight: 600; color: #fff; }
.section-desc { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 2px; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(255,255,255,.12); border-radius: 99px; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute; height: 14px; width: 14px;
  left: 3px; bottom: 3px; background: rgba(255,255,255,.5);
  border-radius: 50%; transition: .2s;
}
.toggle input:checked + .toggle-slider { background: #00B4FF; }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); background: #000; }

/* ── CONTENT LIST ─────────────────────────────────────────── */
.content-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.content-title  { font-size: 20px; font-weight: 700; color: #fff; }
.content-tabs   { display: flex; gap: 4px; margin-bottom: 24px; }
.tab-btn {
  padding: 8px 18px; border-radius: 8px; border: none;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.5);
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: inherit; text-decoration: none; transition: all .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab-btn:hover  { color: #fff; background: rgba(255,255,255,.1); }
.tab-btn.active { background: rgba(0,180,255,.12); color: #00B4FF; }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: 10px; font-size: 13px;
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px;
}
.alert-success { background: rgba(0,196,79,.12); border: 1px solid rgba(0,196,79,.2); color: #00C44F; }
.alert-error   { background: rgba(230,57,70,.12); border: 1px solid rgba(230,57,70,.2); color: #E63946; }

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.page-title  { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.page-sub    { font-size: 13px; color: rgba(255,255,255,.35); margin-top: 4px; }

/* ── LOGIN ───────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #0F0F13;
}
.login-card {
  width: 400px; background: #1E1E2A; border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px; padding: 40px;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .logo-icon { margin: 0 auto 12px; width: 48px; height: 48px; border-radius: 14px; }
.login-logo h1 { font-size: 22px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.login-logo p  { font-size: 13px; color: rgba(255,255,255,.35); margin: 0; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-btn { height: 46px; width: 100%; border-radius: 10px; background: #00B4FF; border: none; color: #000; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; transition: filter .15s; }
.login-btn:hover { filter: brightness(1.1); }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: rgba(255,255,255,.2); }
.empty-state svg { opacity: .3; margin-bottom: 16px; }
.empty-state p { font-size: 14px; margin: 0; }

/* ── ACCENT PREVIEW ──────────────────────────────────────── */
.accent-preview {
  height: 4px; border-radius: 99px; margin-bottom: 8px;
  background: linear-gradient(90deg, var(--preview-accent, #00B4FF), transparent);
}

/* ── MISC ────────────────────────────────────────────────── */
.text-muted  { color: rgba(255,255,255,.3); }
.text-accent { color: #00B4FF; }
.mono        { font-family: monospace; }
.actions     { display: flex; gap: 8px; }
hr.divider   { border: none; border-top: 1px solid rgba(255,255,255,.07); margin: 24px 0; }
