/**
 * Radio27 Panel — Super Admin & Admin
 * Navy #0B1F3A + Coral #E85D4C
 */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Sora:wght@500;600;700&display=swap');

:root {
    --navy: #0B1F3A;
    --navy-deep: #071526;
    --navy-mid: #14304f;
    --coral: #E85D4C;
    --coral-hover: #d24e3f;
    --coral-soft: rgba(232, 93, 76, 0.14);
    --bg: #e8eef5;
    --bg-elevated: #ffffff;
    --text: #152033;
    --muted: #6b7a90;
    --line: #d5deea;
    --success: #1f9d6a;
    --warning: #d97706;
    --danger: #dc3545;
    --sidebar-w: 268px;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(11, 31, 58, 0.08);
    --shadow-sm: 0 2px 10px rgba(11, 31, 58, 0.06);
    --font: 'DM Sans', system-ui, sans-serif;
    --display: 'Sora', 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    width: 100%;
    min-height: 100%;
    font-family: var(--font);
    color: var(--text);
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(232, 93, 76, 0.08), transparent 55%),
        radial-gradient(900px 420px at -10% 0%, rgba(11, 31, 58, 0.08), transparent 50%),
        var(--bg);
    -webkit-font-smoothing: antialiased;
}

.panel-body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

a { color: var(--coral); text-decoration: none; }
a:hover { color: var(--coral-hover); }

h1, h2, h3, h4, .panel-title {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin: 0;
}

.panel-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
}

/* Always out of document flow — never a grid column */
.panel-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 21, 38, 0.45);
    z-index: 30;
    border: 0;
    padding: 0;
    margin: 0;
}

.panel-backdrop.is-open {
    display: block;
}

.panel-sidebar {
    grid-column: 1;
    grid-row: 1;
    background:
        linear-gradient(180deg, rgba(232, 93, 76, 0.12), transparent 28%),
        linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: #fff;
    padding: 1.25rem 1rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.06);
    width: 100%;
    max-width: var(--sidebar-w);
    z-index: 25;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.panel-sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.panel-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.65rem 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.panel-brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--coral), #ff7a66);
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 8px 18px rgba(232, 93, 76, 0.35);
}

.panel-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.panel-brand__text strong {
    font-family: var(--display);
    font-size: 1rem;
}

.panel-brand__text small {
    color: rgba(255,255,255,0.55);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.panel-nav-section {
    margin: 1.1rem 0.65rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.42);
}

.panel-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.panel-nav a,
.panel-nav .panel-nav__btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.62rem 0.8rem;
    border-radius: 10px;
    color: rgba(255,255,255,0.78);
    font-size: 0.92rem;
    font-weight: 500;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.panel-nav a:hover,
.panel-nav .panel-nav__btn:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.panel-nav a.active {
    background: var(--coral-soft);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--coral);
}

.panel-nav__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    flex-shrink: 0;
}

.panel-nav a.active .panel-nav__dot {
    background: var(--coral);
    box-shadow: 0 0 0 3px rgba(232, 93, 76, 0.25);
}

.panel-nav__icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    flex-shrink: 0;
}

.panel-nav a.active .panel-nav__icon {
    background: rgba(232, 93, 76, 0.22);
    color: #fff;
}

.panel-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.panel-nav-group__toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.62rem 0.8rem;
    border-radius: 10px;
    color: rgba(255,255,255,0.78);
    font-size: 0.92rem;
    font-weight: 500;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.panel-nav-group__toggle:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.panel-nav-group__toggle.active {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.panel-nav-group__chevron {
    margin-left: auto;
    display: inline-grid;
    place-items: center;
    opacity: 0.7;
    transition: transform .18s ease;
}

.panel-nav-group.is-open .panel-nav-group__chevron {
    transform: rotate(180deg);
}

.panel-nav-group__items {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.1rem 0 0.25rem 0.55rem;
}

.panel-nav-group__items[hidden] {
    display: none;
}

.panel-nav-group__items a {
    padding-left: 0.95rem;
    font-size: 0.88rem;
}

.panel-topbar__left,
.panel-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-userchip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.7rem 0.35rem 0.35rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
}

.panel-userchip__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--coral));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.panel-userchip strong {
    display: block;
    font-size: 0.86rem;
    color: var(--navy);
    line-height: 1.1;
}

.panel-userchip small {
    color: var(--muted);
    font-size: 0.72rem;
}

.super-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.35rem;
    padding: 1.35rem 1.4rem;
    border-radius: 16px;
    background:
        radial-gradient(500px 180px at 100% 0%, rgba(232, 93, 76, 0.22), transparent 55%),
        linear-gradient(135deg, #0B1F3A, #14304f 60%, #1a3d63);
    color: #fff;
    box-shadow: var(--shadow);
}

.super-hero .panel-title,
.super-hero p {
    color: #fff;
}

.super-hero p {
    margin: 0.4rem 0 0;
    opacity: 0.86;
    max-width: 520px;
}

.super-hero__eyebrow {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.65);
}

.super-hero__actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

/* Especificidade dupla de propósito: a regra base .stat-grid (3 colunas) é
   declarada depois no arquivo e, com a mesma especificidade, venceria — as
   quatro colunas viravam 3 + 1, deixando um buraco na segunda linha. */
.stat-grid.stat-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card--soft {
    background: linear-gradient(180deg, #fff, #f7f9fc);
}

.stat-card--soft::before {
    background: linear-gradient(180deg, #1E3A5F, #0B1F3A);
}

.super-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 1rem;
    margin-top: 0.25rem;
}

.super-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.shortcut-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 12px;
    background: #f4f7fb;
    border: 1px solid var(--line);
    color: var(--navy);
    font-weight: 600;
    transition: .18s ease;
}

.shortcut-tile:hover {
    border-color: rgba(232, 93, 76, 0.45);
    background: rgba(232, 93, 76, 0.08);
    color: var(--coral-hover);
}

.panel-sidebar__foot {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.panel-main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.panel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.6rem;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.panel-topbar__title {
    font-family: var(--display);
    font-size: 1.15rem;
    color: var(--navy);
}

.panel-topbar__meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.panel-content {
    padding: 1.4rem 1.6rem 2rem;
}

.panel-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.panel-page-head p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.panel-tabs {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.3rem;
    margin-bottom: 1.25rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.panel-tabs__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.9rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: .18s ease;
}

.panel-tabs__item:hover {
    color: var(--navy);
    background: rgba(11, 31, 58, 0.04);
}

.panel-tabs__item.is-active {
    background: var(--navy);
    color: #fff;
}

.panel-tabs__count {
    display: inline-grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    background: rgba(11, 31, 58, 0.08);
    color: inherit;
}

.panel-tabs__item.is-active .panel-tabs__count {
    background: rgba(255,255,255,0.18);
}

.panel-tabs--form {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.panel-tabs--form .panel-tabs__item {
    justify-content: center;
    position: relative;
}

.panel-tabs--form .panel-tabs__item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem 1.2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--coral), #ff8a76);
}

.stat-card__label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card__value {
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-top: 0.35rem;
    line-height: 1;
}

.stat-card__hint {
    margin-top: 0.55rem;
    font-size: 0.8rem;
    color: var(--muted);
}

a.stat-card--link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.stat-card--link:hover {
    border-color: color-mix(in srgb, var(--coral, #e85d4c) 55%, var(--line));
    box-shadow: var(--shadow-sm), 0 8px 22px rgba(11, 31, 58, 0.08);
    transform: translateY(-1px);
}

a.stat-card--link .stat-card__hint {
    color: var(--coral, #e85d4c);
    font-weight: 600;
}

.panel-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.panel-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.15rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.panel-card__header h2 {
    font-size: 0.98rem;
}

.media-url-add,
.media-url-remove {
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.media-url-list {
    display: grid;
    gap: 0.85rem;
}

.media-url-row__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
}

.panel-card__body { padding: 1.1rem 1.15rem; }

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.item-card {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.05rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 150px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.item-card:hover {
    border-color: rgba(232, 93, 76, 0.35);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.item-card--active {
    border-color: #86d5ae;
    background: linear-gradient(180deg, #f3fbf7 0%, #ffffff 55%);
    box-shadow: 0 0 0 1px rgba(20, 108, 67, 0.08), var(--shadow-sm);
}

.item-card--active:hover {
    border-color: #4fb885;
    box-shadow: 0 0 0 1px rgba(20, 108, 67, 0.12), var(--shadow);
}

.item-card--active .item-card__title {
    color: #146c43;
}

.item-card--inactive img {
    filter: grayscale(0.75);
    opacity: 0.85;
}

.item-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.item-card__title {
    font-family: var(--display);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
    line-height: 1.25;
    word-break: break-word;
}

.item-card__subtitle {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.item-card__meta {
    display: grid;
    gap: 0.35rem;
    margin-top: auto;
}

.item-card__row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.86rem;
}

.item-card__row span {
    color: var(--muted);
}

.item-card__row strong {
    color: var(--text);
    font-weight: 600;
    text-align: right;
}

.item-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    margin-top: 0.15rem;
}

.item-card__footer .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.item-card--empty {
    grid-column: 1 / -1;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--muted);
    box-shadow: none;
}

.item-card--empty:hover {
    transform: none;
    border-color: var(--line);
    box-shadow: none;
}

/* Rádio de demonstração de tema: distinta dos clientes reais na listagem. */
.item-card--demo {
    background: #f6f9fd;
    border-style: dashed;
    box-shadow: none;
}

.pages-section {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.pages-section:last-child {
    margin-bottom: 0;
}

.pages-section__head h2 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--navy);
}

.pages-section__head p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.pages-list {
    align-items: stretch;
}

.page-card {
    min-height: 0;
}

.page-card__path {
    margin-top: 0.4rem;
}

.page-card__path code {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 6px;
    background: #f1f4f8;
    color: var(--navy);
    font-size: 0.8rem;
    word-break: break-all;
}

.page-card__badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
}

.page-card__footer {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.page-card__footer form {
    margin: 0;
}

.pages-empty {
    text-align: left;
}

.panel-table {
    width: 100%;
    border-collapse: collapse;
}

.panel-table th,
.panel-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}

.panel-table th {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f7f9fc;
}

.panel-table tr:last-child td { border-bottom: 0; }
.panel-table tbody tr:hover { background: rgba(11, 31, 58, 0.025); }

.news-list-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.news-list-thumb {
    width: 88px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #eef2f6;
}

.news-list-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.7rem;
}

.news-list-cell strong {
    display: block;
    color: var(--navy);
    font-size: 0.95rem;
    line-height: 1.3;
}

.news-list-cell .form-hint {
    margin: 0.15rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.panel-table .news-list-actions {
    text-align: right;
    white-space: nowrap;
}

.panel-table .news-list-actions form {
    display: inline;
}

.news-list-author {
    font-size: 0.78rem;
}

.news-table .badge + .badge {
    margin-left: 0.25rem;
}

.news-list {
    align-items: stretch;
}

.news-card {
    min-height: 0;
}

.news-card__cover {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    background: #eef2f6;
}

.news-card__cover--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.news-card__badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
}

.news-card .item-card__subtitle {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__footer {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.news-card__footer form {
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: .18s ease;
}

.btn.btn-sm {
    padding: 0.38rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-accent {
    background: var(--coral);
    color: #fff;
    border-color: var(--coral);
}
.btn-accent:hover { background: var(--coral-hover); color: #fff; }

.btn-navy {
    background: var(--navy);
    color: #fff;
}
.btn-navy:hover { background: var(--navy-mid); color: #fff; }

.btn-ghost {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border-color: rgba(255,255,255,0.12);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Page content sits on light surfaces, where the white-on-dark ghost is unreadable. */
.panel-content .btn-ghost,
.comment-toast .btn-ghost {
    color: var(--navy);
    border-color: var(--line);
}
.panel-content .btn-ghost:hover,
.comment-toast .btn-ghost:hover {
    background: rgba(11, 31, 58, 0.06);
    color: var(--navy);
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    font-size: 0.92rem;
}
.alert-success { background: #e8f8f0; color: #146c43; border-color: #b7ebd0; }
.alert-danger { background: #fdebec; color: #9b1c1c; border-color: #f5c2c7; }
.alert-info { background: #eaf3ff; color: #1e4b8e; border-color: #cfe2ff; }

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: var(--navy);
    font-size: 0.88rem;
}

.form-control, .form-select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px var(--coral-soft);
}

.rich-editor {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: visible;
}

.rich-editor:focus-within {
    border-color: var(--coral);
    box-shadow: 0 0 0 3px var(--coral-soft);
}

.rich-editor__toolbar {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem 0.45rem;
    border-bottom: 1px solid var(--line);
    border-radius: 10px 10px 0 0;
    background: #f7f9fc;
}

.rich-editor__sep {
    width: 1px;
    height: 18px;
    margin: 0 0.28rem;
    background: var(--line);
}

.rich-editor__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
}

.rich-editor__btn span {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.rich-editor__btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

.rich-editor__btn:hover,
.rich-editor__btn.is-on {
    background: var(--coral-soft);
    color: var(--coral);
}

.rich-editor__color {
    position: relative;
}

.rich-editor__palette {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 8;
    width: 148px;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
    grid-template-columns: repeat(5, 22px);
    gap: 0.35rem;
}

.rich-editor__color.is-open .rich-editor__palette {
    display: grid;
}

.rich-editor__swatch {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid rgba(11, 31, 58, 0.12);
    border-radius: 6px;
    cursor: pointer;
}

.rich-editor__swatch:hover {
    transform: scale(1.08);
}

.rich-editor__swatch--custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E85D4C, #2563eb 55%, #1f9d6a);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    overflow: hidden;
}

.rich-editor__swatch--custom input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
}

.rich-editor__area {
    min-height: 240px;
    max-height: 520px;
    overflow: auto;
    padding: 0.85rem 0.95rem 1.1rem;
    color: var(--text);
    font: inherit;
    line-height: 1.65;
    outline: none;
    border-radius: 0 0 10px 10px;
}

.rich-editor.is-empty .rich-editor__area:before {
    content: attr(data-placeholder);
    color: #8a97ab;
    pointer-events: none;
}

.rich-editor__area p { margin: 0 0 0.75rem; }
.rich-editor__area h2,
.rich-editor__area h3 { margin: 0 0 0.65rem; color: var(--navy); line-height: 1.3; }
.rich-editor__area h2 { font-size: 1.2rem; }
.rich-editor__area h3 { font-size: 1.05rem; }
.rich-editor__area ul,
.rich-editor__area ol { margin: 0 0 0.75rem; padding-left: 1.3rem; }
.rich-editor__area blockquote {
    margin: 0 0 0.75rem;
    padding: 0.15rem 0 0.15rem 0.85rem;
    border-left: 3px solid var(--coral);
    color: var(--muted);
}
.rich-editor__area a { color: var(--coral); }

.rich-editor__source {
    display: none !important;
}

.form-stack {
    display: grid;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.form-hint {
    margin: 0.85rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.form-hint code {
    font-size: 0.82rem;
    background: #f1f4f8;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
}

.day-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.day-picks label {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.day-picks input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.day-picks span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.6rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.day-picks input:checked + span {
    background: var(--navy, #0b1f3a);
    border-color: var(--navy, #0b1f3a);
    color: #fff;
}

.day-picks input:focus-visible + span {
    box-shadow: 0 0 0 3px var(--coral-soft);
}

@media (max-width: 768px) {
    .form-grid,
    .form-grid--3,
    .form-grid--4 { grid-template-columns: 1fr; }
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.badge-ok { background: #e8f8f0; color: #146c43; }
.badge-live { background: #16a34a; color: #fff; }
.badge-warn { background: #fff7e6; color: #9a6700; }
.badge-off { background: #f1f4f8; color: #5b6b7c; }
.badge-danger { background: #fdecec; color: #b42318; }

.btn.is-disabled {
    pointer-events: none;
    opacity: 0.6;
}

/* Barra de progresso de envio de arquivo (ex.: /super/updates). */
.upload-progress {
    margin-top: 0.85rem;
    display: grid;
    gap: 0.4rem;
}

.upload-progress[hidden] {
    display: none;
}

.upload-progress__track {
    height: 10px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.upload-progress__fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #e85d4c;
    transition: width 0.2s ease;
}

/* Arquivo já no servidor e ele ainda processando: não há porcentagem a mostrar. */
.upload-progress--processing .upload-progress__fill {
    width: 100% !important;
    background: repeating-linear-gradient(-45deg, #e85d4c 0 12px, #f08a7d 12px 24px);
    background-size: 34px 34px;
    animation: upload-progress-stripes 0.8s linear infinite;
}

.upload-progress--error .upload-progress__fill {
    background: #b42318;
}

.upload-progress__text {
    font-size: 0.85rem;
    color: var(--muted);
}

.upload-progress--error .upload-progress__text {
    color: #b42318;
    font-weight: 600;
}

@keyframes upload-progress-stripes {
    to { background-position: 34px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .upload-progress--processing .upload-progress__fill {
        animation: none;
    }
}

.on-air-now {
    margin-bottom: 1rem;
    border-color: #86d5ae;
    background: #edfbe8;
}
.on-air-now__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin: 0;
    font-size: 0.95rem;
}
.on-air-now__row + .on-air-now__row {
    margin-top: 0.65rem;
}
.on-air-now__sep,
.on-air-now__meta {
    color: var(--muted);
}
.on-air-now__meta {
    font-size: 0.82rem;
}

.item-card--live {
    border-color: #86d5ae;
    background: linear-gradient(180deg, #edfbe8 0%, #ffffff 58%);
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.12), var(--shadow-sm);
}
.item-card--live:hover {
    border-color: #4fb885;
}

.empty-state {
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
}

.panel-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--navy);
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.panel-menu-toggle:hover {
    border-color: color-mix(in srgb, var(--coral) 45%, var(--line));
    color: var(--coral);
    background: #fff;
}

.panel-menu-toggle__close {
    display: none;
}

.panel-menu-toggle[aria-expanded="true"] .panel-menu-toggle__bars {
    display: none;
}

.panel-menu-toggle[aria-expanded="true"] .panel-menu-toggle__close {
    display: block;
}

@media (min-width: 993px) {
    body.panel-sidebar-collapsed .panel-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    body.panel-sidebar-collapsed .panel-sidebar {
        display: none;
    }

    body.panel-sidebar-collapsed .panel-main {
        grid-column: 1;
    }
}

.panel-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Faixas flutuantes de novidades do site (comentários, recados do mural) */
.comment-toast-stack {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.comment-toast-stack:empty {
    display: none;
}

.comment-toast {
    position: relative;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem 2.2rem 0.95rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-left: 4px solid var(--coral);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px rgba(11, 31, 58, 0.18);
    animation: comment-toast-in 0.28s ease-out;
}

@keyframes comment-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .comment-toast { animation: none; }
}

.comment-toast__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--coral-soft);
    color: var(--coral);
}

.comment-toast__body {
    min-width: 0;
}

.comment-toast__title {
    display: block;
    color: var(--navy);
    font-size: 0.92rem;
    line-height: 1.3;
}

.comment-toast__text {
    margin: 0.25rem 0 0.65rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.comment-toast__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.comment-toast__close {
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem;
}

.comment-toast__close:hover {
    color: var(--navy);
}

@media (max-width: 480px) {
    .comment-toast-stack {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        width: auto;
    }
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.pagination-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pagination-nav__gap {
    color: var(--muted);
    padding: 0 0.2rem;
}

/* Pedidos musicais: ações em duas linhas curtas (status / editar-excluir)
   para não espremer a coluna da música nem empilhar um botão por linha. */
.requests-actions__row {
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.requests-actions__row + .requests-actions__row {
    margin-top: 0.35rem;
}

@media (min-width: 769px) {
    .panel-table .requests-actions {
        min-width: 180px;
    }

    .panel-table .requests-track {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .requests-actions__row {
        justify-content: flex-start;
    }

    .requests-actions__row + .requests-actions__row {
        margin-top: 0;
    }
}

/* Gráficos de visitas (barras em CSS, sem biblioteca externa) */
.visits-total {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
}

.visits-total__value {
    font-family: var(--display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
}

.visits-total__label {
    font-size: 0.85rem;
    color: var(--muted);
}

.visits-chart {
    margin-bottom: 1.4rem;
}

.visits-chart:last-child {
    margin-bottom: 0;
}

.visits-chart__title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 0 0 0.85rem;
}

.visits-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.visits-bars--vertical {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.visits-bar-v {
    flex: 1 1 0;
    /* Largura mínima acompanha o rótulo ("02/09"): mais estreito que isso, as
       datas se sobrepõem no celular. O scroll horizontal cuida do excesso. */
    min-width: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.visits-bar-v__count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
}

.visits-bar-v__track {
    height: 130px;
    width: 100%;
    max-width: 30px;
    display: flex;
    align-items: flex-end;
    background: rgba(11, 31, 58, 0.04);
    border-radius: 6px;
}

.visits-bar-v__fill {
    width: 100%;
    min-height: 3px;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--coral), rgba(232, 93, 76, 0.55));
}

.visits-bar-v__label {
    font-size: 0.7rem;
    color: var(--muted);
    white-space: nowrap;
}

.visits-bars--horizontal {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.visits-bar-h {
    display: grid;
    grid-template-columns: minmax(70px, 110px) 1fr 2.6rem;
    align-items: center;
    gap: 0.6rem;
}

.visits-bar-h__label {
    font-size: 0.82rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.visits-bar-h__track {
    height: 10px;
    background: rgba(11, 31, 58, 0.07);
    border-radius: 999px;
    overflow: hidden;
}

.visits-bar-h__fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--coral);
}

.visits-bar-h__count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-align: right;
}

.panel-card__body:has(table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* —— Responsive: tablet / laptop —— */
@media (max-width: 1200px) {
    :root { --sidebar-w: 240px; }

    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid.stat-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .super-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
    .stat-grid.stat-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .super-grid { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    .panel-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel-sidebar {
        grid-column: 1;
        grid-row: 1;
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, var(--sidebar-w));
        max-width: var(--sidebar-w);
        height: 100vh;
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform .22s ease;
        z-index: 40;
        box-shadow: var(--shadow);
        visibility: visible;
        pointer-events: auto;
        padding: 1.25rem 1rem 1.5rem;
        border-right-color: rgba(255,255,255,0.06);
        overflow-x: hidden;
        overflow-y: auto;
    }

    .panel-sidebar.is-open {
        transform: translateX(0);
    }

    .panel-main {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
    }

    .panel-menu-toggle {
        display: inline-flex;
        background: var(--navy);
        color: #fff;
        border-color: transparent;
    }

    .panel-menu-toggle:hover {
        background: var(--navy-mid);
        color: #fff;
    }

    .super-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-grid,
    .stat-grid.stat-grid--4 {
        grid-template-columns: 1fr;
    }

    .panel-userchip small {
        display: none;
    }
}

@media (max-width: 768px) {
    .panel-topbar {
        padding: 0.9rem 1rem;
        flex-wrap: wrap;
    }

    .panel-content {
        padding: 1rem 1rem 1.75rem;
    }

    .panel-page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .panel-page-head .btn {
        width: 100%;
    }

    .super-hero {
        padding: 1.1rem 1rem;
    }

    .super-hero__actions {
        width: 100%;
    }

    .super-hero__actions .btn {
        flex: 1 1 auto;
    }

    .stat-card__value {
        font-size: 1.65rem;
    }

    .panel-table thead {
        display: none;
    }

    .panel-table,
    .panel-table tbody,
    .panel-table tr,
    .panel-table td {
        display: block;
        width: 100%;
    }

    .panel-table tr {
        background: var(--bg-elevated, #fff);
        border: 1px solid var(--line);
        border-radius: var(--radius, 10px);
        box-shadow: var(--shadow-sm);
        margin-bottom: 0.75rem;
        padding: 0.6rem 0.9rem;
    }

    .panel-table tr:last-child {
        margin-bottom: 0;
    }

    .panel-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.4rem 0;
        border-bottom: 1px solid var(--line);
        font-size: 0.9rem;
        text-align: right;
    }

    .panel-table td:last-child {
        border-bottom: 0;
    }

    .panel-table td[data-label]::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
        text-align: left;
    }

    .panel-table .news-list-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        text-align: left;
    }

    .panel-table td.panel-table-cell--title {
        display: block;
        text-align: left;
        font-size: 1rem;
    }

    .news-table {
        min-width: 0;
    }

    .news-table thead {
        display: none;
    }

    .news-table,
    .news-table tbody,
    .news-table tr,
    .news-table td {
        display: block;
        width: 100%;
    }

    .news-table tr {
        padding: 0.85rem 0.9rem;
        border-bottom: 1px solid var(--line);
    }

    .news-table td {
        padding: 0.25rem 0;
        border-bottom: 0;
    }

    .news-table .news-list-actions {
        text-align: left;
        display: flex;
        gap: 0.45rem;
        padding-top: 0.55rem;
    }

    .form-grid,
    .form-grid--3,
    .form-grid--4 {
        grid-template-columns: 1fr;
    }

    .shortcut-grid {
        grid-template-columns: 1fr;
    }

    .panel-userchip strong {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .slide-editor__head-actions {
        width: 100%;
        flex-direction: column;
    }

    .slide-editor__head-actions .btn {
        width: 100%;
    }

    .news-list {
        grid-template-columns: 1fr;
    }

    .news-card__cover {
        height: 180px;
    }

    .news-card .item-card__top {
        flex-direction: column;
        align-items: stretch;
    }

    .pages-list {
        grid-template-columns: 1fr;
    }

    .page-card .item-card__top {
        flex-direction: column;
        align-items: stretch;
    }

    .page-card__badges {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
    }

    .page-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .page-card__footer .btn,
    .page-card__footer form,
    .page-card__footer form .btn {
        width: 100%;
    }

    .pages-form .form-actions {
        flex-direction: column;
    }

    .pages-form .form-actions .btn {
        width: 100%;
    }

    .news-card__badges {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
    }

    .news-card__footer {
        justify-content: stretch;
    }

    .news-card__footer .btn,
    .news-card__footer form {
        flex: 1 1 0;
        min-width: 0;
    }

    .news-card__footer form .btn {
        width: 100%;
    }

    .slide-switch {
        align-items: flex-start;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .panel-topbar__meta {
        display: none;
    }

    .panel-brand__text strong {
        font-size: 0.95rem;
    }

    .btn {
        padding: 0.5rem 0.85rem;
    }
}

body.panel-nav-open {
    overflow: hidden;
}

/* Auth — split marketing + form */
.auth-page {
    margin: 0;
    min-height: 100vh;
    background: var(--navy-deep);
}

.auth-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
}

.auth-promo {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(7, 21, 38, 0.82), rgba(11, 31, 58, 0.55)),
        var(--auth-hero) center/cover no-repeat;
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 2.5rem;
    overflow: hidden;
}

.auth-promo__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(700px 380px at 20% 15%, rgba(232, 93, 76, 0.28), transparent 55%),
        linear-gradient(180deg, rgba(7, 21, 38, 0.25), rgba(7, 21, 38, 0.88));
    pointer-events: none;
}

.auth-promo__content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.auth-promo__brand {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    color: #fff;
}

.auth-promo__brand::after {
    content: '';
    display: block;
    width: 42px;
    height: 3px;
    margin-top: 0.65rem;
    border-radius: 999px;
    background: var(--coral);
}

.auth-promo__title {
    font-family: var(--display);
    font-size: clamp(1.7rem, 2.6vw, 2.35rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 0.9rem;
}

.auth-promo__text {
    margin: 0 0 1.1rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.02rem;
    line-height: 1.55;
}

.auth-promo__list {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.auth-promo__list li {
    position: relative;
    padding-left: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.auth-promo__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--coral);
}

.auth-promo__cta {
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    line-height: 1.45;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background:
        radial-gradient(500px 280px at 100% 0%, rgba(232, 93, 76, 0.08), transparent 55%),
        #f4f7fb;
}

.auth-panel__inner {
    width: min(100%, 400px);
}

.auth-form-head {
    margin-bottom: 1.25rem;
}

.auth-form-head h1 {
    font-family: var(--display);
    font-size: 1.55rem;
    margin: 0 0 0.4rem;
    color: var(--navy);
    text-align: left;
}

.auth-form-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.auth-form .auth-field {
    margin-bottom: 1rem;
}

.auth-submit {
    width: 100%;
    margin-top: 0.35rem;
    min-height: 48px;
    font-size: 1rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.1rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    color: #9aa7b8;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #6b7a90;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.password-toggle:hover {
    color: var(--navy);
    background: rgba(11, 31, 58, 0.06);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--coral);
    outline-offset: 1px;
}

@media (max-width: 768px) {
    .auth-split {
        grid-template-columns: 1fr;
    }

    .auth-promo {
        min-height: 38vh;
        align-items: flex-end;
        padding: 1.35rem 1.25rem;
    }

    .auth-promo__title {
        font-size: 1.45rem;
    }

    .auth-promo__list {
        display: none;
    }

    .auth-promo__cta {
        font-size: 0.85rem;
    }

    .auth-panel {
        min-height: auto;
        align-items: flex-start;
        padding: 1.5rem 1.25rem 2rem;
    }
}

@media (min-width: 769px) {
    .auth-split {
        grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    }
}

/* Legacy centered auth shell (fallback) */
.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(800px 400px at 80% 10%, rgba(232, 93, 76, 0.22), transparent 50%),
        linear-gradient(145deg, var(--navy-deep), var(--navy) 55%, #16365f);
}

.auth-card {
    width: min(100%, 420px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.28);
    padding: 1.6rem 1.5rem 1.4rem;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 1.1rem;
    font-size: 1.35rem;
}

.auth-brand {
    text-align: center;
    color: #fff;
    margin-bottom: 1.2rem;
}
.auth-brand strong {
    font-family: var(--display);
    font-size: 1.5rem;
    display: block;
}
.auth-brand span {
    opacity: 0.7;
    font-size: 0.9rem;
}

.auth-field {
    margin-bottom: 1rem;
}

.item-grid--themes {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.theme-live-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111;
    margin: -1.05rem -1.1rem 0.15rem;
    border-radius: var(--radius) var(--radius) 0 0;
}

.theme-live-thumb__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-live-thumb__empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #cfd3da;
    font-weight: 600;
}

.item-card--inactive .theme-live-thumb {
    filter: grayscale(1);
}

.news-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 1rem;
    align-items: start;
}

.news-editor-image {
    position: sticky;
    top: 1rem;
}

.news-editor-image__preview {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 0.85rem;
}

@media (max-width: 1024px) {
    .news-editor-layout {
        grid-template-columns: 1fr;
    }

    .news-editor-image {
        position: static;
    }
}

.slide-editor {
    display: grid;
    gap: 1rem;
}

.slide-editor__head-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.live-hero-admin.is-off {
    border-color: #d5deea;
    background: #f7f9fc;
}

.live-hero-admin__body {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
}

.live-hero-admin__preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 110px;
    padding: 0.9rem 0.75rem;
    border-radius: 12px;
    background: repeating-linear-gradient(
        0deg,
        #ff6b00,
        #ff6b00 12px,
        #ff7a1a 12px,
        #ff7a1a 13px
    );
    color: #fff;
    text-align: center;
}

.live-hero-admin__preview .live-hero-admin__eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.78;
}

.live-hero-admin__preview strong {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

.live-hero-admin__preview span {
    font-size: 0.72rem;
    opacity: 0.88;
}

@media (max-width: 720px) {
    .live-hero-admin__body {
        grid-template-columns: 1fr;
    }
}

.slide-editor__visibility .panel-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.slide-editor__visibility.is-off {
    border-color: #d5deea;
    background: #f7f9fc;
}

.slide-switch {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    cursor: pointer;
    min-width: 0;
}

.slide-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.slide-switch__ui {
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    height: 32px;
    border-radius: 999px;
    background: #c5d0de;
    transition: background 0.18s ease;
}

.slide-switch__knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(11, 31, 58, 0.25);
    transition: transform 0.18s ease;
}

.slide-switch input:checked + .slide-switch__ui {
    background: var(--success);
}

.slide-switch input:checked + .slide-switch__ui .slide-switch__knob {
    transform: translateX(20px);
}

.slide-switch input:focus-visible + .slide-switch__ui {
    outline: 2px solid var(--coral);
    outline-offset: 3px;
}

.slide-switch__copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.slide-switch__copy strong {
    font-size: 1rem;
    color: var(--navy);
}

.slide-switch__copy small {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.35;
}

.slide-editor__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.slide-editor__fields,
.slide-editor__aside {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.slide-editor__preview-card {
    position: sticky;
    top: 1rem;
}

.slide-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.slide-drop {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    padding: 1.15rem 1rem;
    border: 1.5px dashed #c9d4e3;
    border-radius: 12px;
    background: #f7f9fc;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.slide-drop:hover,
.slide-drop.is-over {
    border-color: var(--coral);
    background: var(--coral-soft);
}

.slide-drop__icon {
    font-size: 1.4rem;
    line-height: 1;
}

.slide-drop__title {
    font-weight: 600;
    color: var(--navy);
}

.slide-drop__meta {
    font-size: 0.84rem;
    color: var(--muted);
    word-break: break-all;
}

.slide-size-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin: 0 0 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--navy);
    background: rgba(11, 31, 58, 0.05);
    border: 1px solid rgba(11, 31, 58, 0.08);
}

.slide-size-hint__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--navy);
    background: rgba(11, 31, 58, 0.08);
}

.slide-live {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 8;
    min-height: 220px;
    background: #111;
}

.slide-live__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-live__empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    padding: 1rem;
    text-align: center;
}

.slide-live__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.62) 78%);
    pointer-events: none;
}

.slide-live__copy {
    position: relative;
    z-index: 1;
    min-height: 220px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.4rem 1.1rem;
    color: #fff;
}

.slide-live__title {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.15rem, 2.4vw, 1.7rem);
    font-weight: 700;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.slide-live__sub {
    margin: 0.45rem 0 0;
    max-width: 34rem;
    font-size: 0.95rem;
    line-height: 1.4;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.slide-live__cta {
    display: inline-flex;
    margin-top: 0.9rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 700;
}

.slide-live__off {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: rgba(21, 32, 51, 0.82);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.slide-live.is-hidden .slide-live__img,
.slide-live.is-hidden .slide-live__empty,
.slide-live.is-hidden .slide-live__copy {
    filter: grayscale(0.85);
    opacity: 0.55;
}

.set-span-2 {
    grid-column: 1 / -1;
}

.slide-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.75rem;
}

.slide-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #111;
    min-height: 110px;
}

.slide-thumb.is-current {
    border-color: var(--coral);
    box-shadow: 0 0 0 3px var(--coral-soft);
}

.slide-thumb.is-off img {
    filter: grayscale(0.8);
    opacity: 0.75;
}

.slide-thumb__open {
    display: block;
    color: inherit;
    text-decoration: none;
}

.slide-thumb__open img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
}

.slide-thumb__label {
    position: absolute;
    left: 0.45rem;
    bottom: 0.45rem;
    z-index: 1;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(11, 31, 58, 0.82);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    pointer-events: none;
}

.slide-thumb__del {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 2;
    margin: 0;
}

.slide-thumb__del button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.95);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.slide-thumb__del button:hover {
    background: #b4232f;
}

.slide-thumb--add {
    background: #f7f9fc;
    border: 1.5px dashed #c9d4e3;
    min-height: 110px;
}

.slide-thumb--add.is-over {
    border-color: var(--coral);
    background: var(--coral-soft);
}

.slide-thumb__add {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.15rem;
    min-height: 110px;
    padding: 0.6rem;
    text-align: center;
    cursor: pointer;
    color: var(--navy);
}

.slide-thumb__add span {
    font-size: 1.5rem;
    line-height: 1;
    color: var(--coral);
}

.slide-thumb__add small {
    color: var(--muted);
    font-size: 0.75rem;
    word-break: break-all;
}

@media (max-width: 640px) {
    .slide-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 1024px) {
    .slide-editor__layout {
        grid-template-columns: 1fr;
    }

    .slide-editor__aside {
        order: -1;
    }

    .slide-editor__preview-card {
        position: static;
    }

    .slide-live,
    .slide-live__copy {
        min-height: 180px;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 640px) {
    .slide-editor__visibility .panel-card__body {
        align-items: flex-start;
    }

    .slide-live__title {
        font-size: 1.15rem;
    }
}

/* Public error pages (404) — no player, no generic Bootstrap shell */
.error-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    color: #fff;
    background:
        radial-gradient(900px 480px at 80% -10%, rgba(232, 93, 76, 0.28), transparent 55%),
        radial-gradient(720px 420px at -8% 110%, rgba(91, 44, 222, 0.22), transparent 50%),
        linear-gradient(165deg, #071526 0%, #0b1f3a 48%, #102844 100%);
}

.error-page__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin: 1.25rem 1.4rem 0;
    color: #fff;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    width: fit-content;
}

.error-page__brand:hover { color: #fff; }

.error-page__mark {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    background: var(--coral);
    color: #fff;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.error-page__main {
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem 1.5rem;
}

.error-page__card {
    position: relative;
    width: min(100%, 560px);
    text-align: center;
}

.error-page__code {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(6.5rem, 18vw, 9.5rem);
    font-weight: 700;
    line-height: 0.85;
    letter-spacing: -0.08em;
    background: linear-gradient(180deg, #ffffff 18%, rgba(232, 93, 76, 0.92) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 18px 40px rgba(232, 93, 76, 0.18));
}

.error-page__title {
    margin: 1.15rem 0 0.55rem;
    color: #fff;
    font-family: var(--display);
    font-size: clamp(1.45rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.error-page__text {
    margin: 0 auto 1.6rem;
    max-width: 26rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.02rem;
    line-height: 1.55;
}

.error-page__actions {
    display: flex;
    justify-content: center;
}

.error-page__actions .btn {
    min-height: 48px;
    padding: 0.75rem 1.4rem;
    border-radius: 12px;
    font-size: 0.98rem;
}

.error-page__foot {
    margin: 0;
    padding: 0 1.25rem 1.35rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.82rem;
}

.error-page__foot a {
    color: rgba(255, 255, 255, 0.62);
}

.error-page__foot a:hover {
    color: #fff;
}

.player-admin {
    gap: 1rem;
}

.player-admin__span {
    grid-column: 1 / -1;
    min-width: 0;
}

.form-grid--stream-url {
    grid-template-columns: minmax(0, 1fr) 160px;
    align-items: end;
}

.form-grid--stream-url .stream-url-field,
.form-grid--stream-url .stream-type-field {
    min-width: 0;
}

.player-color-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-color-mode {
    border: 0;
    margin: 0 0 1rem;
    padding: 0;
}

.player-color-mode__options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.player-color-mode__option {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin: 0;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f9fc;
    cursor: pointer;
}

.player-color-mode__option:has(input:checked) {
    border-color: var(--coral, #e85d4c);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(232, 93, 76, 0.18);
}

.player-color-mode__option input {
    margin-top: 0.2rem;
}

.player-color-mode__option strong {
    display: block;
    font-size: 0.92rem;
}

.player-color-mode__option small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.player-color-mode__swatches {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.player-color-mode__swatches i {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.player-color-grid.is-disabled {
    opacity: 0.48;
    pointer-events: none;
}

.player-color-field {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f9fc;
    padding: 0.75rem 0.85rem;
}

.player-color-field .form-label {
    margin-bottom: 0.5rem;
}

.player-color-field .form-control {
    margin: 0;
}

.player-meta-grid {
    margin-top: 1rem;
}

.player-admin input[type="color"].form-control {
    min-height: 44px;
    padding: 0.2rem 0.35rem;
}

.player-option-list {
    display: grid;
    gap: 0.65rem;
}

.player-option {
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f9fc;
}

.player-option .slide-switch,
.player-option .slide-switch {
    width: 100%;
}

.player-preview-stage {
    background: #eef1f6;
    border-radius: 14px;
    padding: 1.15rem 1rem 1.25rem;
    overflow: visible;
}

.player-preview-stage__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.player-preview-stage__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.player-preview-stage__hint,
.player-preview-stage__hint {
    margin: 0.85rem 0 0;
}

.panel-card--player-preview,
.panel-card--player-preview .panel-card__body {
    overflow: visible;
}

@media (min-width: 769px) {
    .player-option-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .form-grid--stream-url,
    .player-meta-grid,
    .player-option-list,
    .player-color-mode__options {
        grid-template-columns: 1fr;
    }

    .player-color-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-admin__actions,
    .player-admin__actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .player-color-grid {
        grid-template-columns: 1fr;
    }
}


