:root {
  color-scheme: light;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Brand set 1: Signal Green / Soft Rose */
  --brand-green: #0f6f50;
  --brand-mint: #e6f4ed;
  --brand-rose: #f48ca8;
  --brand-rose-soft: #fde4e8;
  --brand-ink: #1f2933;

  /* Fallback/accent set 4 */
  --accent-teal: #119aa3;
  --accent-magenta: #c23a86;

  --page: #f7faf8;
  --page-top: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fbfdfc;
  --text: #27323a;
  --text-strong: #11181d;
  --muted: #748083;
  --faint: #9aa6a8;
  --border: #e2e9e5;
  --border-strong: #cbd9d2;
  --status: #18a66a;
  --warning: #f2b43d;
  --shadow: 0 1px 2px rgba(31, 41, 51, .035), 0 16px 36px rgba(31, 41, 51, .055);
  --radius: 7px;
  --radius-small: 5px;
  --content: 1120px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(180deg, var(--page-top) 0 300px, var(--page) 620px, #f3f8f5 100%);
  font-family: var(--font-sans);
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-shell {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 96px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.brand {
  display: grid;
  gap: 0;
  width: min(430px, 60vw);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.brand span {
  margin: -7px 0 0 118px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 520;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 22px;
  color: var(--muted);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-small);
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--brand-rose);
  background: var(--brand-rose-soft);
  outline: 0;
}

.icon-button svg { width: 24px; height: 24px; }

.search-bar {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: 58px;
  margin-bottom: 30px;
  padding: 0 16px 0 20px;
  background: var(--surface);
  border: 2px solid color-mix(in srgb, var(--brand-green) 55%, var(--border));
  border-radius: var(--radius);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green) 8%, transparent);
}

.search-bar:focus-within {
  border-color: color-mix(in srgb, var(--brand-rose) 52%, var(--brand-green));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-rose) 12%, transparent);
}

.search-bar svg {
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.search-bar input {
  min-width: 0;
  color: var(--text-strong);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 17px;
}

.search-bar input::placeholder { color: #8e9998; }

kbd {
  min-width: 62px;
  padding: 5px 8px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  font: 13px var(--font-mono);
  text-align: center;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 18px;
}

.section-heading h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 27px;
  font-weight: 650;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

.service-groups {
  display: grid;
  gap: 16px;
}

.group {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  color: var(--text);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  font-weight: 650;
}

.group-header svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px 20px;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}

.service:nth-last-child(-n + 2) { border-bottom: 0; }
.service:nth-last-child(2):nth-child(even) { border-bottom: 1px solid var(--border); }
.service:nth-child(even) { border-left: 1px solid var(--border); }
.service:only-child { grid-column: 1 / -1; }
.service.span-full {
  grid-column: 1 / -1;
}
.service.span-full:nth-child(even) {
  border-left: 0;
}

.service:hover,
.service:focus-visible {
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-rose) 8%, var(--surface)), color-mix(in srgb, var(--brand-green) 6%, var(--surface)));
  outline: 0;
}

.service:hover .chevron,
.service:focus-visible .chevron {
  color: var(--brand-rose);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--muted);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 590;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service .chevron {
  width: 17px;
  height: 17px;
  color: var(--faint);
}

.status-dot {
  width: 9px;
  height: 9px;
  justify-self: center;
  border-radius: 999px;
  background: var(--status);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--status) 12%, transparent);
}

.widgets-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.widget {
  min-height: 276px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.widget h2 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
}

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

.widget-header h2 {
  margin: 0;
}

.manage-feeds-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 11px;
  color: var(--brand-green);
  background: var(--brand-mint);
  border: 1px solid color-mix(in srgb, var(--brand-green) 24%, var(--border));
  border-radius: var(--radius-small);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.manage-feeds-button:hover,
.manage-feeds-button:focus-visible {
  color: var(--accent-magenta);
  background: var(--brand-rose-soft);
  border-color: color-mix(in srgb, var(--brand-rose) 42%, var(--border));
  outline: 0;
}

.manage-feeds-button svg {
  width: 16px;
  height: 16px;
}

.rss-manager {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.rss-manager[hidden] {
  display: none;
}

.rss-form {
  display: grid;
  grid-template-columns: minmax(150px, .85fr) minmax(240px, 1.35fr) auto;
  align-items: end;
  gap: 10px;
}

.rss-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.rss-form input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  color: var(--text-strong);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  outline: 0;
}

.rss-form input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green) 10%, transparent);
}

.rss-form button {
  height: 38px;
  padding: 0 13px;
  color: #fff;
  background: var(--brand-green);
  border: 0;
  border-radius: var(--radius-small);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.feed-list,
.rss-items {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
}

.feed-list {
  gap: 8px;
}

.feed-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 8px 8px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
}

.feed-list strong,
.feed-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-list strong {
  color: var(--text-strong);
  font-size: 13px;
}

.feed-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.feed-list button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-small);
  cursor: pointer;
}

.feed-list button:hover,
.feed-list button:focus-visible {
  color: var(--brand-rose);
  background: var(--brand-rose-soft);
  outline: 0;
}

.feed-list svg {
  width: 16px;
  height: 16px;
}

.rss-items {
  gap: 15px;
}

.rss-items li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  color: var(--text);
  font-size: 14px;
}

.rss-items li > span {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--brand-green);
}

.rss-items li:nth-child(even) > span { background: var(--accent-teal); }
.rss-items li:nth-child(3n) > span { background: var(--brand-rose); }

.rss-items a {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
}

.rss-items strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 650;
}

.rss-items time {
  color: var(--muted);
  white-space: nowrap;
}

.player-main {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.player-main button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  color: var(--brand-green);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(31, 41, 51, .06);
  cursor: pointer;
}

.player-main button:hover,
.player-main button:focus-visible {
  color: var(--accent-magenta);
  outline: 0;
}

.player-main svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: none;
}

.wave {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  align-items: center;
  gap: 3px;
  width: 100%;
  height: 54px;
  color: var(--brand-green);
}

.wave i {
  display: block;
  width: 100%;
  height: 22px;
  border-radius: 999px;
  background: currentColor;
}

.wave i:nth-child(2n) { height: 34px; }
.wave i:nth-child(3n) { height: 46px; }
.wave i:nth-child(5n) { height: 28px; }

.player-widget > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-strong);
  font-size: 16px;
}

.player-widget > span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 3px;
  margin: 22px 0 18px;
  background: var(--border);
}

.progress i {
  display: block;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-green), var(--accent-teal), var(--brand-rose));
}

.player-widget ol {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: tracks;
}

.player-widget li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  counter-increment: tracks;
}

.player-widget li::before {
  content: counter(tracks);
  color: var(--muted);
}

.player-widget li span {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-panel {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.security-panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin: 0;
  padding: 0 22px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 18px;
  font-weight: 650;
}

.security-panel h2 svg {
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 24px 0;
}

.metrics article {
  min-height: 58px;
  padding: 0 24px;
  border-left: 1px solid var(--border);
}

.metrics article:first-child { border-left: 0; }

.metrics span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 14px;
}

.metrics strong {
  color: var(--text);
  font-size: 16px;
}

.metrics .online { color: var(--status); }

.metrics .ok {
  color: var(--brand-green);
}

.metrics .online::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--status);
}

.bar {
  display: inline-block;
  width: 54px;
  margin-left: 14px;
  vertical-align: middle;
}

.bar {
  height: 4px;
  background: linear-gradient(90deg, var(--brand-green) var(--value), var(--border) var(--value));
}

.footer {
  position: fixed;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 max(26px, calc((100vw - var(--content)) / 2));
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(14px);
  font-size: 15px;
}

.footer span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer svg {
  width: 24px;
  height: 24px;
  color: var(--text);
}

.footer i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--status);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--status) 12%, transparent);
}

@media (max-width: 760px) {
  .page-shell { width: min(100% - 28px, var(--content)); }
  .topbar { align-items: center; gap: 18px; }
  .brand { width: min(380px, 76vw); }
  .brand span { margin-left: 100px; font-size: 16px; }
  .topbar-actions { padding-top: 0; gap: 8px; }
  .service-list,
  .widgets-grid,
  .metrics {
    grid-template-columns: 1fr;
  }
  .rss-form {
    grid-template-columns: 1fr;
  }
  .service {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
  }
  .service .status-dot {
    display: none;
  }
  .service:nth-child(even),
  .metrics article {
    border-left: 0;
  }
  .service,
  .service:nth-last-child(-n + 2),
  .service:nth-last-child(2):nth-child(even) {
    border-bottom: 1px solid var(--border);
  }
  .service:last-child { border-bottom: 0; }
  .metrics article {
    padding-block: 14px;
    border-top: 1px solid var(--border);
  }
  .metrics article:first-child { border-top: 0; }
  .footer {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 20px;
  }
}

@media (max-width: 560px) {
  .page-shell { padding-top: 18px; }
  .brand { width: min(320px, 84vw); }
  .brand span { margin: -6px 0 0 84px; }
  .topbar-actions { display: none; }
  .search-bar { grid-template-columns: 22px minmax(0, 1fr); }
  kbd { display: none; }
  .widget { padding: 18px; }
}
