:root {
    --bg-top: #000000;
    --bg-mid: #000258;
    --bg-bot: #003399;
    --card-bg: rgba(8, 14, 38, 0.9);
    --card-bg-soft: rgba(9, 14, 42, 0.84);
    --line: rgba(208, 136, 255, 0.34);
    --line-strong: rgba(169, 171, 255, 0.62);
    --text-main: #ecf5ff;
    --text-soft: #d5d8ff;
    --accent: #3366ff;
    --accent-2: #ff00ff;
    --accent-3: #993399;
    --state-default: linear-gradient(to bottom, #3366ff 17%, #ff00ff 67%);
    --state-focus: linear-gradient(to bottom, #000000 23%, #003399 64%);
    --state-selected: linear-gradient(to bottom, #000000 37%, #000258 93%);
    --surface-default: linear-gradient(160deg, rgba(8, 15, 43, 0.86), rgba(8, 14, 40, 0.82)), var(--state-default);
    --surface-focus: linear-gradient(160deg, rgba(5, 11, 35, 0.9), rgba(8, 12, 39, 0.84)), var(--state-focus);
    --surface-selected: linear-gradient(160deg, rgba(4, 7, 26, 0.92), rgba(6, 10, 33, 0.86)), var(--state-selected);
    --focus-ring: rgba(153, 51, 153, 0.34);
    --danger: #ef4444;
    --ok: #22c55e;
    --warn: #f59e0b;
    --radius: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Sora", "Segoe UI", Tahoma, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 9% 10%, rgba(51, 102, 255, 0.22), transparent 35%),
        radial-gradient(circle at 88% 88%, rgba(255, 0, 255, 0.16), transparent 42%),
        radial-gradient(circle at 52% -10%, rgba(153, 51, 153, 0.16), transparent 40%),
        linear-gradient(to bottom, #000000 53%, #000250 75%);
    background-attachment: fixed;
}

a {
    color: #8ec7ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.panel-body {
    min-height: 100vh;
}

.panel-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(rgba(129, 174, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 255, 0.05) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 78%);
}

.panel-shell {
    width: min(1740px, calc(100% - 1.2rem));
    margin: 0.7rem auto 1.2rem;
    display: grid;
    gap: 16px;
}

.panel-layout {
    width: min(1880px, calc(100% - 1rem));
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.panel-sidebar {
    min-height: calc(100vh - 1.4rem);
    max-height: calc(100vh - 1.4rem);
    position: sticky;
    top: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-selected);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
    padding: 14px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    overflow: hidden;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.side-brand h1 {
    margin: 0;
    line-height: 1.04;
    font-size: 1.1rem;
}

.side-brand p {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.74rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 190px;
}

.side-nav {
    min-height: 0;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 8px;
    padding-right: 2px;
}

.side-nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid rgba(129, 174, 255, 0.28);
    border-radius: 12px;
    background: var(--surface-default);
    color: #d6e9ff;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 10px 12px;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.side-nav-link:hover,
.side-nav-link:focus-visible {
    text-decoration: none;
    border-color: var(--line-strong);
    background: var(--state-focus);
    box-shadow: 0 0 0 2px var(--focus-ring), 0 12px 24px rgba(0, 0, 0, 0.36);
    transform: translateY(-1px);
    outline: none;
}

.side-nav-link.is-active {
    border-color: var(--line-strong);
    background: var(--state-default);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 12px 28px rgba(0, 0, 0, 0.42);
}

.panel-workspace {
    min-width: 0;
    display: grid;
    min-height: calc(100vh - 1.4rem);
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: 12px;
}

.panel-pagebar {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-selected);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
    padding: 16px;
}

.panel-pagebar h2 {
    margin: 0;
    font-size: 1.36rem;
}

.panel-pagebar p {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.panel-top-tools {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-selected);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    justify-content: space-between;
}

.panel-quick-actions {
    flex: 1 1 320px;
    max-width: 520px;
}

.panel-account-actions {
    flex: 0 1 auto;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.panel-account-actions .login-chip {
    min-width: min(260px, 100%);
}

.panel-logout {
    min-width: 120px;
    min-height: 44px;
    justify-content: center;
    text-align: center;
}

.panel-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 12px 8px 4px;
    color: rgba(213, 216, 255, 0.78);
    font-size: 0.82rem;
    text-align: center;
}

.panel-footer a {
    color: #ecf5ff;
    font-weight: 800;
    text-decoration: none;
}

.panel-footer a:hover,
.panel-footer a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    outline: none;
}

.panel-footer-version::before {
    content: "•";
    margin-right: 14px;
    color: rgba(213, 216, 255, 0.52);
}

.section-subnav {
    position: sticky;
    top: 0.7rem;
    z-index: 35;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(5, 10, 32, 0.94), rgba(8, 13, 42, 0.9)), var(--state-selected);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(14px);
    scrollbar-width: thin;
}

.section-subnav.is-empty {
    display: none;
}

.section-tab {
    flex: 0 0 auto;
    min-width: 150px;
    max-width: 260px;
    min-height: 42px;
    border: 1px solid rgba(129, 174, 255, 0.32);
    border-radius: 12px;
    background: var(--surface-default);
    color: #d6e9ff;
    cursor: pointer;
    font-weight: 800;
    padding: 9px 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.section-tab:hover,
.section-tab:focus-visible {
    border-color: var(--line-strong);
    background: var(--state-focus);
    box-shadow: 0 0 0 2px var(--focus-ring), 0 10px 22px rgba(0, 0, 0, 0.34);
    transform: translateY(-1px);
    outline: none;
}

.section-tab.is-active {
    border-color: var(--line-strong);
    background: var(--state-default);
    color: #fff;
}

.section-pane[hidden] {
    display: none !important;
}

.panel-header {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-selected);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
    padding: 14px;
    display: grid;
    gap: 12px;
    position: sticky;
    top: 8px;
    z-index: 40;
}

.header-top {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 14px;
}

.header-left {
    min-width: 0;
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    gap: 12px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 0 0 clamp(250px, 23vw, 340px);
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--state-default);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
}

.brand-mark::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.header-brand h1 {
    margin: 0;
    line-height: 1.04;
    font-size: 1.12rem;
}

.header-brand p {
    margin: 3px 0 0;
    font-size: 0.76rem;
    color: var(--text-soft);
}

.menu-select-wrap {
    display: grid;
    gap: 4px;
    width: clamp(230px, 17vw, 280px);
    flex: 0 1 clamp(230px, 17vw, 280px);
}

.small {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.menu-select {
    appearance: none;
    width: 100%;
    border: 1px solid rgba(129, 174, 255, 0.34);
    background: var(--surface-default);
    border-radius: 11px;
    color: #e4f1ff;
    padding: 9px 11px;
    font-size: 0.9rem;
    font-weight: 700;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.menu-select:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 2px var(--focus-ring);
    background: var(--surface-focus);
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
    margin-left: auto;
    align-self: flex-end;
}

.login-chip {
    border: 1px solid rgba(129, 174, 255, 0.36);
    background: var(--surface-selected);
    border-radius: 11px;
    padding: 7px 11px;
    display: grid;
    gap: 2px;
    line-height: 1.1;
    min-width: clamp(220px, 16vw, 280px);
}

.header-actions .btn,
.header-actions .btn-ghost {
    min-height: 44px;
    padding: 9px 16px;
    white-space: nowrap;
}

.login-chip span {
    font-size: 0.68rem;
    color: var(--text-soft);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.login-chip strong {
    font-size: 0.9rem;
}

.header-page {
    border-top: 1px solid rgba(129, 174, 255, 0.26);
    padding-top: 11px;
}

.header-page h2 {
    margin: 0;
    font-size: 1.22rem;
}

.header-page p {
    margin: 5px 0 0;
    color: var(--text-soft);
    font-size: 0.85rem;
}

.top-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.top-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(129, 174, 255, 0.3);
    border-radius: 10px;
    background: var(--surface-default);
    color: #d6e9ff;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 8px 9px;
    min-height: 36px;
    text-align: center;
    text-decoration: none;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.top-tab:hover {
    text-decoration: none;
    border-color: var(--line-strong);
    transform: translateY(-1px);
    background: var(--state-focus);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.42);
}

.top-tab.is-active {
    border-color: var(--line-strong);
    background: var(--state-selected);
    box-shadow: inset 0 0 0 1px rgba(153, 51, 153, 0.32), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.panel-main {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.content-wrap {
    display: grid;
    gap: 12px;
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-default);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
    padding: 14px;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 38%);
}

.card > * {
    position: relative;
    z-index: 1;
}

.glass {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-focus);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32);
}

.card-inner {
    background: var(--surface-selected);
}

.card-grid {
    display: grid;
    gap: 12px;
    align-items: stretch;
}

.card-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.card-grid > .card,
.card-grid > article.card {
    height: 100%;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(129, 174, 255, 0.24);
}

.card-head h3 {
    margin: 0;
    font-size: 1rem;
}

.dashboard-card-head {
    align-items: center;
}

.card-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.collapse-toggle {
    min-width: 116px;
    text-align: center;
}

.collapse-panel[hidden] {
    display: none !important;
}

.card h4 {
    margin: 0;
    font-size: 0.95rem;
}

.stat-card {
    text-align: center;
    display: grid;
    gap: 7px;
    align-content: center;
    min-height: 116px;
}

.stat-label {
    color: var(--text-soft);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-value {
    font-size: 1.82rem;
    font-weight: 700;
}

.metric-card {
    position: relative;
    min-height: 104px;
}

.metric-card h3 {
    margin: 0;
    font-size: 0.95rem;
}

.metric-card p {
    margin: 7px 0 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    position: absolute;
    right: 12px;
    top: 12px;
}

.status-dot.active { background: var(--ok); }
.status-dot.paused { background: #f97316; }
.status-dot.trial { background: var(--warn); }
.status-dot.expired { background: var(--danger); }

.stack-list {
    display: grid;
    gap: 8px;
}

.stack-item {
    border: 1px solid var(--line);
    background: var(--surface-default);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.quick-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-link {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-default);
    padding: 10px;
    color: #cfe5ff;
    font-weight: 600;
    font-size: 0.86rem;
}

.quick-link:hover {
    text-decoration: none;
    border-color: var(--line-strong);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
    background: var(--state-focus);
}

.quick-link:focus-visible,
.top-tab:focus-visible,
.btn:focus-visible,
.btn-ghost:focus-visible,
.menu-select:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--line-strong);
    box-shadow: 0 0 0 2px var(--focus-ring), 0 8px 18px rgba(0, 0, 0, 0.24);
}

.dns-head,
.client-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.dns-head h4 {
    margin: 0;
    font-size: 0.98rem;
}

.dns-head p {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.78rem;
    word-break: break-word;
}

.badge {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.74rem;
    border: 1px solid var(--line);
    background: var(--surface-default);
    white-space: nowrap;
}

.client-meta {
    margin-top: 8px;
    display: grid;
    gap: 4px;
    font-size: 0.85rem;
}

.client-meta span {
    color: var(--text-soft);
}

.details-box {
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 10px;
    background: var(--surface-default);
}

.details-box summary {
    cursor: pointer;
    color: #bdd7f8;
    font-weight: 600;
}

.details-box[open] {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 1px rgba(153, 51, 153, 0.26) inset;
    background: var(--surface-selected);
}

.top-gap {
    margin-top: 10px;
}

form.form-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
}

form.form-grid.compact,
.form-grid.compact {
    gap: 8px;
}

.field {
    grid-column: span 12;
    min-width: 0;
}

.field-9 { grid-column: span 9; }
.field-8 { grid-column: span 8; }
.field-7 { grid-column: span 7; }
.field-6 { grid-column: span 6; }
.field-5 { grid-column: span 5; }
.field-4 { grid-column: span 4; }
.field-3 { grid-column: span 3; }
.field-2 { grid-column: span 2; }
.field-1 { grid-column: span 1; }

label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-default);
    color: var(--text-main);
    padding: 10px 10px;
    font-size: 0.92rem;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(169, 194, 230, 0.74);
}

select option {
    background: #0b2342;
    color: #eaf4ff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 2px var(--focus-ring);
    background: var(--surface-focus);
}

textarea {
    min-height: 104px;
    resize: vertical;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: 9px 12px;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: var(--state-default);
    box-shadow: 0 10px 22px rgba(17, 68, 146, 0.35);
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(67, 20, 104, 0.44);
    background: var(--state-focus);
}

.btn-ghost {
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(5, 11, 35, 0.9), rgba(8, 12, 39, 0.84)), var(--state-focus);
    box-shadow: none;
}

.btn-danger {
    background: linear-gradient(140deg, #ef4444, #dc2626);
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(5, 11, 35, 0.52);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

thead th {
    text-align: left;
    font-size: 0.74rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-soft);
    background: var(--surface-selected);
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid rgba(145, 193, 255, 0.2);
}

tbody td {
    border-top: 1px solid rgba(145, 193, 255, 0.16);
    padding: 10px;
    font-size: 0.86rem;
    vertical-align: top;
}

tbody tr:nth-child(odd) {
    background: var(--surface-default);
}

tbody tr:nth-child(even) {
    background: linear-gradient(160deg, rgba(5, 11, 35, 0.9), rgba(8, 12, 39, 0.84)), var(--state-default);
}

tbody tr:hover {
    background: var(--surface-focus);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.74rem;
    border: 1px solid transparent;
}

.status-chip.active {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.45);
}

.status-chip.paused {
    background: rgba(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.45);
}

.status-chip.trial {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.45);
}

.status-chip.expired {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
}

.bar-track {
    width: 130px;
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--state-default);
}

.flash {
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 10px 12px;
    font-size: 0.9rem;
    box-shadow: 0 8px 20px rgba(5, 16, 40, 0.34);
}

.flash-success {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.16);
}

.flash-error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.16);
}

.flash-info {
    border-color: rgba(61, 121, 255, 0.5);
    background: rgba(61, 121, 255, 0.16);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.muted {
    color: var(--text-soft);
}

.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.check-inline input {
    width: 16px;
    height: 16px;
}

.media-preview {
    margin-top: 8px;
    border-radius: 12px;
    border: 1px dashed var(--line);
    overflow: hidden;
    height: 180px;
    background: var(--surface-default);
    display: grid;
    place-items: center;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-empty {
    color: var(--text-soft);
    font-size: 0.84rem;
}

.sports-preview {
    border: 2px solid;
    border-radius: 14px;
    padding: 18px;
}

.sports-preview h4 {
    margin: 0 0 6px;
}

.sports-preview p {
    margin: 0 0 8px;
}

.reveal {
    opacity: 0;
    transform: translateY(6px);
    animation: revealIn .34s ease forwards;
}

@keyframes revealIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.login-card {
    width: min(460px, 100%);
    padding: 22px;
}

.login-hero {
    text-align: center;
    margin-bottom: 14px;
}

.login-mark {
    margin: 0 auto 12px;
}

.login-hero h1 {
    margin: 0;
    font-size: 1.38rem;
}

.login-host {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 0.84rem;
}

.login-footnote {
    margin-top: 14px;
}

@media (max-width: 1650px) {
    .top-tabs {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1280px) {
    .card-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .top-tabs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .panel-shell {
        width: calc(100% - 0.7rem);
    }

    .panel-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .panel-sidebar {
        min-height: auto;
        max-height: none;
        position: sticky;
        top: 0;
        z-index: 45;
        grid-template-rows: auto auto;
        padding: 10px;
        gap: 10px;
    }

    .panel-workspace {
        min-height: auto;
        grid-template-rows: auto auto auto auto auto;
    }

    .side-brand .brand-mark {
        width: 38px;
        height: 38px;
    }

    .side-brand h1 {
        font-size: 1rem;
    }

    .side-brand p {
        max-width: min(70vw, 520px);
    }

    .side-nav {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding: 0 0 4px;
    }

    .side-nav-link {
        flex: 0 0 auto;
        min-width: 132px;
        min-height: 40px;
        justify-content: center;
        padding: 9px 12px;
    }

    .panel-pagebar {
        padding: 12px;
    }

    .panel-pagebar h2 {
        font-size: 1.16rem;
    }

    .panel-top-tools {
        padding: 10px;
        align-items: stretch;
    }

    .panel-account-actions {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .panel-account-actions .login-chip {
        flex: 1 1 220px;
    }

    .section-subnav {
        top: 0;
        border-radius: 14px;
        padding: 8px;
    }

    .section-tab {
        min-width: 132px;
        min-height: 40px;
        padding: 8px 12px;
    }

    .menu-select-wrap {
        width: 100%;
        flex: 1 1 100%;
    }

    .top-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .card-grid-5,
    .card-grid-4,
    .card-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .field-9,
    .field-8,
    .field-7,
    .field-6,
    .field-5,
    .field-4,
    .field-3,
    .field-2,
    .field-1 {
        grid-column: span 12;
    }

    .dashboard-card-head {
        align-items: stretch;
    }

    .dashboard-card-head h3 {
        margin-bottom: 8px;
    }

    .card-head-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .card-head-actions .btn,
    .card-head-actions .btn-ghost {
        flex: 1 1 auto;
        min-width: 140px;
    }

    .panel-workspace.is-mobile-compact .panel-pagebar,
    .panel-workspace.is-mobile-compact .panel-top-tools {
        display: none;
    }

    .panel-workspace.is-mobile-compact {
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .panel-shell {
        width: calc(100% - 0.55rem);
        margin-top: 0.48rem;
    }

    .side-nav-link,
    .section-tab {
        min-width: 118px;
        font-size: 0.82rem;
    }

    .side-brand p {
        max-width: 72vw;
    }

    .panel-top-tools {
        border-radius: 14px;
    }

    .panel-account-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .panel-account-actions .login-chip,
    .panel-logout {
        width: 100%;
        min-width: 0;
    }

    .card {
        border-radius: 14px;
        padding: 12px;
    }

    .top-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid-5,
    .card-grid-4,
    .card-grid-3,
    .card-grid-2 {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 650px;
    }

    .btn,
    .btn-ghost {
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        animation: none;
    }
}
/* Modern shared shell: keeps panel behavior and endpoints unchanged. */
html,
body {
  overflow-x: hidden;
}

.panel-body {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(0, 3, 28, .2), rgba(13, 6, 56, .35)),
    linear-gradient(180deg, var(--bg-top), var(--bg-mid) 48%, var(--bg-bot));
}

.panel-body::before {
  opacity: .28;
  background-size: 32px 32px;
}

.panel-shell {
  width: min(1880px, calc(100% - 32px));
  margin: 16px auto 24px;
}

.panel-layout {
  width: 100%;
  grid-template-columns: minmax(248px, 280px) minmax(0, 1fr);
  gap: 18px;
}

.panel-sidebar {
  top: 16px;
  min-height: calc(100vh - 32px);
  max-height: calc(100vh - 32px);
  padding: 16px;
  border-color: rgba(142, 210, 255, .26);
  background: linear-gradient(180deg, rgba(7, 13, 35, .94), rgba(9, 7, 39, .95));
  box-shadow: 0 20px 48px rgba(0, 0, 0, .4);
}

.side-brand {
  padding: 4px 4px 16px;
  border-bottom: 1px solid rgba(142, 210, 255, .2);
}

.side-nav {
  padding-top: 12px;
  gap: 7px;
  scrollbar-width: thin;
}

.side-nav-link {
  min-height: 46px;
  border-radius: 12px;
  background: rgba(16, 22, 52, .72);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.side-nav-link:hover,
.side-nav-link:focus-visible {
  border-color: rgba(85, 226, 255, .64);
  background: linear-gradient(135deg, rgba(23, 61, 119, .92), rgba(65, 11, 101, .9));
  box-shadow: 0 0 0 2px rgba(85, 226, 255, .15), 0 8px 20px rgba(0, 0, 0, .22);
  transform: translateY(-1px);
}

.side-nav-link.is-active {
  background: linear-gradient(135deg, rgba(51, 102, 255, .9), rgba(255, 0, 255, .82));
  box-shadow: 0 10px 26px rgba(20, 5, 70, .38);
}

.panel-workspace {
  gap: 16px;
  min-width: 0;
}

.panel-pagebar {
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(14, 25, 61, .94), rgba(17, 8, 55, .94));
  box-shadow: 0 14px 32px rgba(0, 0, 0, .2);
}

.panel-pagebar h2 {
  margin: 0;
  line-height: 1.2;
}

.panel-top-tools {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(9, 16, 43, .9), rgba(18, 8, 50, .88));
}

.panel-quick-actions {
  max-width: 560px;
}

.panel-account-actions {
  gap: 10px;
}

.login-chip,
.panel-logout {
  min-height: 44px;
}

.section-subnav {
  top: 12px;
  padding: 8px;
  border-radius: 15px;
  gap: 8px;
  background: rgba(9, 14, 40, .76);
  backdrop-filter: blur(16px);
}

.section-tab {
  min-height: 44px;
  border-radius: 11px;
}

.panel-main,
.content-wrap {
  gap: 16px;
  min-width: 0;
}

.card {
  border-radius: 16px;
  padding: 16px;
}

.card-head {
  margin-bottom: 14px;
}

.card-grid {
  gap: 14px;
}

.btn,
.btn-ghost,
.menu-select,
input,
select,
textarea {
  min-height: 44px;
  border-radius: 12px;
}

.btn {
  box-shadow: 0 10px 20px rgba(0, 0, 0, .18);
}

.btn:focus-visible,
.btn-ghost:focus-visible,
.menu-select:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(85, 226, 255, .9);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(85, 226, 255, .16);
}

.quick-link {
  border-radius: 12px;
}

.table-wrap {
  border-radius: 14px;
  overflow: auto;
}

tbody tr:hover {
  background: rgba(66, 28, 93, .28);
}

.panel-footer {
  margin-top: 2px;
  padding: 14px 8px;
  color: var(--text-soft);
}

@media (max-width: 980px) {
  .panel-shell {
    width: calc(100% - 20px);
    margin: 10px auto 18px;
  }

  .panel-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .panel-sidebar {
    position: static;
    min-height: 0;
    max-height: none;
    padding: 12px;
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
  }

  .side-nav-link {
    flex: 0 0 auto;
    min-width: 132px;
  }

  .panel-workspace {
    gap: 12px;
  }

  .panel-pagebar {
    padding: 16px;
  }

  .panel-top-tools {
    padding: 12px;
  }

  .section-subnav {
    top: 0;
  }

  .card {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .panel-shell {
    width: calc(100% - 12px);
    margin: 6px auto 12px;
  }

  .panel-pagebar,
  .panel-top-tools,
  .card {
    border-radius: 14px;
  }

  .panel-pagebar {
    padding: 14px;
  }

  .panel-pagebar h2 {
    font-size: 1.08rem;
  }

  .panel-top-tools {
    padding: 10px;
  }

  .side-nav-link {
    min-width: 118px;
    min-height: 42px;
  }

  .section-tab {
    min-width: 118px;
  }

  .content-wrap {
    gap: 12px;
  }

  .card-grid {
    gap: 10px;
  }

  .card {
    padding: 12px;
  }

  .panel-footer {
    padding: 12px 4px;
    font-size: .84rem;
  }
}
/* Final shell override: actions/account live in the footer. */
.panel-top-tools { display: none !important; }

.panel-footer {
  margin-top: 24px;
  padding: 18px 20px 16px;
  display: grid;
  gap: 16px;
  border: 1px solid rgba(130, 98, 255, .42);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(18, 30, 65, .96), rgba(54, 12, 77, .96));
}
.panel-footer-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 20px;
}
.panel-footer-tools .panel-quick-actions {
  display: grid;
  gap: 8px;
  max-width: none;
}
.panel-footer-tools .panel-account-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
}
.panel-footer-tools .login-chip { min-width: 240px; }
.panel-footer-meta {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  color: rgba(231, 236, 255, .78);
  text-align: center;
}
.panel-footer-meta a { color: inherit; font-weight: 700; text-decoration: none; }
.panel-footer-meta a:hover,
.panel-footer-meta a:focus-visible { color: #fff; text-decoration: underline; }

@media (max-width: 760px) {
  .panel-footer-tools { grid-template-columns: 1fr; }
  .panel-footer-tools .panel-account-actions { justify-content: stretch; }
  .panel-footer-tools .login-chip { min-width: 0; flex: 1; }
}
@media (max-width: 460px) {
  .panel-footer { padding: 14px; border-radius: 14px; }
  .panel-footer-tools .panel-account-actions { flex-direction: column; }
  .panel-footer-tools .panel-logout { width: 100%; }
}

/* hPanel-inspired shell: clear hierarchy, grouped navigation and operational header. */
:root {
  --hp-purple: #673de6;
  --hp-purple-dark: #4f2bc5;
  --hp-purple-soft: #f0ecff;
  --hp-ink: #1f2937;
  --hp-muted: #6b7280;
  --hp-border: #e5e7eb;
  --hp-page: #f6f7fb;
  --hp-card: #ffffff;
  --hp-green: #16a34a;
}

html,
body {
  min-width: 0;
}

.panel-body {
  min-height: 100vh;
  color: var(--hp-ink);
  background: var(--hp-page);
  font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
}

.panel-body::before {
  display: none;
}

.panel-shell,
.panel-layout {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 0;
}

.panel-sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  padding: 20px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 0;
  border-right: 1px solid var(--hp-border);
  border-radius: 0;
  background: #fff;
  box-shadow: 6px 0 26px rgba(31, 41, 55, .04);
  backdrop-filter: none;
}

.side-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--hp-border);
}

.side-brand .brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 10px;
  color: #fff;
  background: var(--hp-purple);
  box-shadow: 0 7px 14px rgba(103, 61, 230, .2);
}

.brand-mark span {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.side-brand-copy {
  min-width: 0;
  flex: 1;
}

.side-brand h1 {
  color: var(--hp-ink);
  font-size: 1rem;
  letter-spacing: -.02em;
}

.side-brand p {
  max-width: none;
  color: var(--hp-muted);
  font-size: .72rem;
}

.side-brand-status {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--hp-green);
  box-shadow: 0 0 0 4px #dcfce7;
}

.side-context {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #ebe8ff;
  border-radius: 10px;
  background: #faf9ff;
}

.side-context-label,
.side-context-meta {
  color: var(--hp-muted);
  font-size: .68rem;
}

.side-context strong {
  overflow: hidden;
  color: var(--hp-ink);
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-search {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  min-height: 40px;
  color: var(--hp-muted);
  border: 1px solid var(--hp-border);
  border-radius: 9px;
  background: #fff;
  font-size: .7rem;
  font-weight: 600;
}

.side-search input {
  min-height: 38px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--hp-ink);
  background: transparent;
  font-size: .78rem;
  box-shadow: none;
}

.side-search input:focus {
  box-shadow: none;
}

.side-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: block;
  padding: 0 2px;
}

.side-nav-group {
  display: grid;
  gap: 3px;
  margin-bottom: 17px;
}

.side-nav-heading {
  padding: 0 10px 6px;
  color: #9ca3af;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.side-nav-link {
  min-height: 39px;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #4b5563;
  background: transparent;
  font-size: .79rem;
  font-weight: 600;
  box-shadow: none;
}

.side-nav-link:hover,
.side-nav-link:focus-visible {
  color: var(--hp-purple);
  background: #f7f5ff;
  box-shadow: none;
  transform: none;
}

.side-nav-link.is-active {
  color: var(--hp-purple);
  background: var(--hp-purple-soft);
  box-shadow: inset 3px 0 0 var(--hp-purple);
}

.side-nav-icon {
  width: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: .7rem;
  font-weight: 800;
}

.side-nav-text {
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-nav-arrow {
  color: #c4c7d0;
  font-size: 1rem;
  line-height: 1;
}

.side-account {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 12px 8px 0;
  border-top: 1px solid var(--hp-border);
}

.side-account-avatar,
.panel-header-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--hp-purple);
  font-weight: 700;
}

.side-account-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  font-size: .75rem;
}

.side-account-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.side-account-copy span {
  color: var(--hp-muted);
  font-size: .64rem;
}

.side-account-copy strong {
  overflow: hidden;
  color: var(--hp-ink);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-account-logout {
  padding: 6px 7px;
  color: var(--hp-muted);
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  text-decoration: none;
}

.side-account-logout:hover {
  color: var(--hp-purple);
  background: var(--hp-purple-soft);
  text-decoration: none;
}

.panel-workspace {
  min-width: 0;
  min-height: 100vh;
  display: block;
  color: var(--hp-ink);
  background: var(--hp-page);
}

.panel-pagebar {
  min-height: 108px;
  margin: 0;
  padding: 25px 34px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 0;
  border-bottom: 1px solid var(--hp-border);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.panel-pagebar-copy {
  min-width: 0;
}

.panel-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--hp-muted);
  font-size: .7rem;
}

.panel-breadcrumb a {
  color: var(--hp-purple);
  font-weight: 600;
}

.panel-breadcrumb strong {
  color: #9ca3af;
  font-weight: 500;
}

.panel-pagebar h2 {
  color: var(--hp-ink);
  font-size: 1.45rem;
  letter-spacing: -.03em;
}

.panel-pagebar p {
  margin-top: 5px;
  color: var(--hp-muted);
  font-size: .82rem;
}

.panel-pagebar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.panel-online-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  font-size: .71rem;
  font-weight: 700;
}

.panel-online-pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hp-green);
}

.panel-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--hp-muted);
  border: 1px solid var(--hp-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.panel-icon-button:hover {
  color: var(--hp-purple);
  border-color: #d9d0ff;
  background: var(--hp-purple-soft);
}

.panel-header-account {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hp-ink);
  font-size: .78rem;
  font-weight: 700;
}

.panel-header-avatar {
  width: 30px;
  height: 30px;
  font-size: .7rem;
}

.panel-commandbar {
  margin: 24px 34px 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  background: var(--hp-card);
  box-shadow: 0 4px 15px rgba(31, 41, 55, .04);
}

.panel-commandbar-copy {
  display: grid;
  gap: 4px;
}

.panel-commandbar-copy strong {
  color: var(--hp-ink);
  font-size: .82rem;
}

.panel-commandbar-copy span {
  color: var(--hp-muted);
  font-size: .73rem;
}

.panel-commandbar-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.panel-commandbar .panel-quick-actions {
  width: min(320px, 100%);
  max-width: none;
}

.panel-commandbar .menu-select-wrap {
  gap: 4px;
}

.panel-commandbar .menu-select-wrap label {
  margin: 0;
  color: var(--hp-muted);
}

.panel-commandbar .menu-select {
  min-height: 38px;
  padding: 7px 10px;
}

.panel-commandbar-button {
  min-height: 38px;
  white-space: nowrap;
}

.section-subnav {
  position: static;
  margin: 18px 34px 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--hp-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.section-tab {
  min-height: 39px;
  padding: 8px 12px;
  color: var(--hp-muted);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  font-size: .75rem;
  font-weight: 600;
}

.section-tab:hover,
.section-tab.is-active {
  color: var(--hp-purple);
  border-bottom-color: var(--hp-purple);
  background: transparent;
}

.panel-main {
  padding: 22px 34px 0;
}

.content-wrap,
.panel-main,
.card-grid {
  gap: 16px;
}

.card {
  color: var(--hp-ink);
  border: 1px solid var(--hp-border);
  border-radius: 12px;
  background: var(--hp-card);
  box-shadow: 0 4px 16px rgba(31, 41, 55, .04);
}

.card-head {
  border-bottom-color: #eef0f4;
}

.card-head h2,
.card-head h3,
.card-head h4,
.card h2,
.card h3,
.card h4 {
  color: var(--hp-ink);
}

.card p,
.small,
label {
  color: var(--hp-muted);
}

.table-wrap {
  border-color: var(--hp-border);
  border-radius: 9px;
}

table {
  color: var(--hp-ink);
}

thead th {
  color: #6b7280;
  background: #f8fafc;
}

tbody td {
  color: #374151;
  border-top-color: #eef0f4;
}

tbody tr:hover {
  background: #faf9ff;
}

input,
select,
textarea,
.menu-select {
  color: var(--hp-ink);
  border-color: #d1d5db;
  background: #fff;
}

input::placeholder {
  color: #9ca3af;
}

input:focus,
select:focus,
textarea:focus,
.menu-select:focus {
  border-color: #a899f7;
  box-shadow: 0 0 0 3px rgba(103, 61, 230, .12);
}

.btn {
  border-radius: 8px;
  background: var(--hp-purple);
  box-shadow: none;
  font-weight: 700;
}

.btn:hover {
  background: var(--hp-purple-dark);
}

.btn-ghost {
  color: var(--hp-ink);
  border: 1px solid #d1d5db;
  background: #fff;
}

.btn-ghost:hover {
  color: var(--hp-purple);
  border-color: #b9aef8;
  background: var(--hp-purple-soft);
}

.flash {
  border-radius: 9px;
}

.panel-footer {
  margin: 22px 34px 0;
  padding: 18px 0 24px;
  border: 0;
  border-top: 1px solid var(--hp-border);
  border-radius: 0;
  color: var(--hp-muted);
  background: transparent;
  box-shadow: none;
}

.panel-footer-meta {
  color: var(--hp-muted);
}

.panel-footer-meta a {
  color: var(--hp-purple);
}

.login-wrap {
  background: var(--hp-page);
}

.login-card,
.glass {
  color: var(--hp-ink);
  border: 1px solid var(--hp-border);
  background: #fff;
  box-shadow: 0 12px 36px rgba(31, 41, 55, .08);
}

.login-card h1,
.login-card h2 {
  color: var(--hp-ink);
}

.login-card .login-host {
  color: var(--hp-muted);
}

@media (max-width: 1100px) {
  .panel-layout,
  .panel-shell {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .panel-sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .panel-pagebar,
  .panel-commandbar,
  .panel-main,
  .panel-footer {
    margin-left: 22px;
    margin-right: 22px;
  }

  .panel-main {
    padding-left: 22px;
    padding-right: 22px;
  }
}

@media (max-width: 820px) {
  .panel-layout,
  .panel-shell {
    display: block;
  }

  .panel-sidebar {
    position: static;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--hp-border);
  }

  .side-nav {
    max-height: 245px;
  }

  .side-account {
    padding-top: 12px;
  }

  .panel-pagebar {
    min-height: 0;
    padding: 20px 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-pagebar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .panel-commandbar {
    margin: 16px 18px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-commandbar-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .panel-commandbar .panel-quick-actions {
    width: 100%;
  }

  .section-subnav {
    margin: 16px 18px 0;
    overflow-x: auto;
  }

  .panel-main {
    padding: 18px 18px 0;
  }

  .panel-footer {
    margin-left: 18px;
    margin-right: 18px;
  }
}

/* Compact navigation: groups and page sections open through selectors, not button walls. */
.side-nav-group {
  gap: 0;
  margin-bottom: 10px;
}

.side-nav-group-toggle {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  color: #9ca3af;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.side-nav-group-toggle:hover,
.side-nav-group-toggle:focus-visible {
  color: var(--hp-purple);
  background: #faf9ff;
  outline: none;
}

.side-nav-group-toggle .side-nav-heading {
  padding: 0;
  color: inherit;
}

.side-nav-group-chevron {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: inherit;
  font-size: .9rem;
  font-weight: 700;
}

.side-nav-items {
  display: grid;
  gap: 3px;
  overflow: hidden;
  transition: max-height .18s ease, opacity .18s ease;
}

.side-nav-items[hidden] {
  display: none !important;
}

.section-subnav {
  display: block;
  min-height: 48px;
  border-bottom: 0;
}

.section-subnav.is-empty {
  display: none;
}

.section-select-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 100%);
  color: var(--hp-muted);
  font-size: .7rem;
  font-weight: 700;
}

.section-select {
  flex: 1;
  min-height: 40px;
  padding: 8px 34px 8px 11px;
  color: var(--hp-ink);
  border: 1px solid var(--hp-border);
  border-radius: 8px;
  background: #fff;
  font-size: .78rem;
  font-weight: 600;
}

.section-select:focus {
  border-color: #a899f7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(103, 61, 230, .12);
}

.card .collapse-toggle {
  min-width: 28px;
  min-height: 28px;
  padding: 4px 7px;
  color: var(--hp-muted);
  border: 1px solid var(--hp-border);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
  font-size: .7rem;
}

.card .collapse-toggle:hover {
  color: var(--hp-purple);
  border-color: #b9aef8;
  background: var(--hp-purple-soft);
}

@media (max-width: 820px) {
  .section-select-label {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  .section-subnav {
    min-height: 76px;
  }
}
