:root {
    --bg: #101114;
    --panel: #181a20;
    --panel-soft: #20232b;
    --text: #f4f4f5;
    --muted: #a7abb5;
    --line: #30343d;
    --accent: #f05a28;
    --danger: #ff6b6b;
    --success: #2f9e44;
    --warning: #f59f00;
    --code-bg: #0b0c0f;
    --radius-lg: 16px;
    --radius-md: 12px;
    --page-width: 1180px;
    --card-width: 620px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--accent);
}

p {
    line-height: 1.5;
}

h1,
h2,
h3 {
    line-height: 1.15;
}

h1,
h2 {
    margin: 0 0 12px;
}

h1 {
    font-size: clamp(1.8rem, 6vw, 1.8rem);
}

h2 {
    margin-top: 28px;
    font-size: 1.35rem;
}

h3 {
    margin: 0 0 14px;
}

code {
    background: var(--code-bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2px 6px;
    color: var(--text);
}

/* Page structure */

.page {
    width: 100%;
    flex: 1 0 auto;
    padding: 24px;
}

.card,
.wide-card {
    width: 100%;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card {
    max-width: var(--card-width);
}

.wide-card {
    max-width: var(--page-width);
}

.muted {
    color: var(--muted);
}

/* Brand */

.brand {
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.brand-logo,
.public-logo {
    display: none;
}

.public-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.public-brand-mark {
    width: 46px;
    height: 54px;
    object-fit: contain;
    flex: 0 0 auto;
}

.public-brand-name {
    color: var(--text);
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 600;
    letter-spacing: -0.045em;
}

.public-brand-tagline {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Forms */

.feedback-form {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

legend {
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

label {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    cursor: pointer;
}

input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--text);
    padding: 13px 14px;
    font: inherit;
}

select {
    cursor: pointer;
}

textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    gap: 8px;
}

.form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-label {
    display: block;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    cursor: default;
    font-weight: 800;
}

.field-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.checkbox-row {
    display: flex;
}

.submit-button {
    appearance: none;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: #111;
    font-weight: 800;
    padding: 16px 18px;
    font-size: 1rem;
    cursor: pointer;
}

/* Choice cards */

.choice-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.choice-card {
    display: grid;
    gap: 4px;
    text-decoration: none;
    color: var(--text);
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
}

.choice-card:hover,
.choice-card:focus {
    border-color: var(--accent);
}

.choice-card span,
.choice-card small {
    color: var(--muted);
}

/* Notices and messages */

.error-box {
    border: 1px solid var(--danger);
    background: rgba(255, 107, 107, 0.12);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-top: 18px;
}

.error-box ul {
    margin-bottom: 0;
}

.notice-box {
    margin-top: 18px;
    border-color: var(--accent);
}

.flash-message {
    max-width: var(--page-width);
    margin: 0 auto 14px;
    border-radius: var(--radius-md);
    padding: 13px 16px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.flash-success {
    border-color: var(--success);
}

.flash-error {
    border-color: var(--danger);
}

/* Links and navigation */

.text-link,
.table-action {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.text-link:hover,
.text-link:focus,
.table-action:hover,
.table-action:focus {
    text-decoration: underline;
}

.admin-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

nav a,
.nav-form button {
    color: var(--text);
    text-decoration: none;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
}

.nav-form {
    margin: 0;
}

.nav-form button {
    font: inherit;
    cursor: pointer;
}

/* Tables */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    background: var(--panel-soft);
    font-size: 0.85rem;
    color: var(--muted);
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

/* Metrics and breakdowns */

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.metric-card,
.breakdown-card,
.notice-box {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.metric-card strong {
    display: block;
    font-size: 1.4rem;
    line-height: 1.1;
    text-transform: capitalize;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.breakdown-list {
    display: grid;
    gap: 14px;
}

.breakdown-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}

.breakdown-meta span {
    color: var(--muted);
}

.bar {
    height: 9px;
    background: var(--panel);
    border-radius: 999px;
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
}

/* Logs and health */

.log-box {
    margin-top: 24px;
    background: var(--code-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: auto;
}

.log-box pre {
    margin: 0;
    padding: 16px;
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.health-summary {
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    background: var(--panel-soft);
}

.health-summary span {
    display: block;
    color: var(--muted);
    margin-bottom: 6px;
}

.health-summary strong {
    font-size: 2rem;
}

.health-checks {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.health-check {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    background: var(--panel-soft);
}

.health-check p {
    margin: 6px 0 0;
    color: var(--muted);
}

.health-check span {
    font-weight: 800;
}

.health-ok {
    border-color: var(--success);
}

.health-warning {
    border-color: var(--warning);
}

.health-failed {
    border-color: var(--danger);
}

.health-log-button {
    display: inline-block;
    text-decoration: none;
}

/* Footer */

.public-layout-footer {
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
    padding: 20px 24px 34px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.5;
}

.public-layout-footer .layout-footer-inner,
.public-layout-footer .public-footer-inner {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    text-align: center;
}

.public-layout-footer a {
    color: var(--accent);
    font-weight: 800;
    text-decoration: none;
}

.public-layout-footer a:hover,
.public-layout-footer a:focus {
    text-decoration: underline;
}

/* Responsive */

@media (max-width: 960px) {
    .metric-grid,
    .breakdown-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .page {
        padding: 12px;
    }

    .card,
    .wide-card {
        padding: 18px;
        border-radius: var(--radius-md);
    }

    .admin-top {
        display: grid;
    }

    .form-grid-two {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .metric-grid,
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .public-brand-lockup {
        gap: 10px;
    }

    .public-brand-mark {
        width: 42px;
        height: 50px;
    }

    .public-brand-name {
        font-size: 1.32rem;
    }

    .public-brand-tagline {
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }
}
.public-brand-combo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.public-brand-divider {
    width: 1px;
    align-self: stretch;
    min-height: 38px;
    background: var(--line);
}

.public-customer-brand {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    max-width: 42%;
}

.public-customer-brand img {
    display: block;
    max-width: 130px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 520px) {
    .public-brand-combo {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-brand-divider {
        display: none;
    }

    .public-customer-brand {
        justify-content: flex-start;
        max-width: 100%;
    }

    .public-customer-brand img {
        max-width: 130px;
    }
}
/* Music feedback question */
.music-feedback-question {
    border-top: 1px solid var(--line);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

.music-question-grid {
    display: grid;
    gap: 0.9rem;
}

.music-question-block {
    display: grid;
    gap: 0.4rem;
}

.music-question-block label {
    font-weight: 700;
    color: var(--text);
}

.music-question-block select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
    color: var(--text);
    padding: 0.85rem 0.95rem;
    font: inherit;
}
