:root {
    --ink: #172033;
    --muted: #637087;
    --line: #d8e0ec;
    --surface: #ffffff;
    --soft: #f4f7fb;
    --primary: #8f174a;
    --primary-dark: #5a0b39;
    --gold: #f6b51d;
    --green: #217146;
    --danger: #b42318;
    --success: #127a48;
    --shadow: 0 18px 50px rgba(19, 34, 58, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(120deg, rgba(143, 23, 74, 0.08), rgba(246, 181, 29, 0.12)),
        var(--soft);
}

a {
    color: inherit;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 150px;
    display: grid;
    grid-template-columns: 150px 1fr 120px;
    align-items: center;
    gap: 24px;
}

.header-logo {
    width: 150px;
    height: 110px;
    object-fit: contain;
}

.header-mark {
    width: 115px;
    height: 115px;
    object-fit: contain;
}

.header-copy h1 {
    margin: 8px 0 6px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
}

.header-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.program-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid rgba(143, 23, 74, 0.22);
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 34px auto 56px;
}

.feedback-panel {
    display: grid;
    grid-template-columns: 340px 1fr;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel-media {
    padding: 34px;
    color: #ffffff;
    background:
        linear-gradient(150deg, rgba(90, 11, 57, 0.94), rgba(33, 113, 70, 0.88)),
        #5a0b39;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
}

.panel-media img {
    width: 190px;
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    align-self: center;
    background: #ffffff;
    border-radius: 50%;
    padding: 14px;
}

.panel-media strong {
    display: block;
    font-size: 30px;
    line-height: 1.1;
}

.panel-media span {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
}

.feedback-form {
    padding: 34px;
    display: grid;
    gap: 22px;
}

.form-heading,
.dashboard-head,
.compact-header,
.table-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.form-heading h2,
.dashboard-head h1,
.login-card h1 {
    margin: 0;
    font-size: 30px;
}

.admin-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.admin-link:hover {
    text-decoration: underline;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

label,
.rating-group {
    display: grid;
    gap: 8px;
    color: #2c3548;
    font-size: 14px;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #c8d2e1;
    border-radius: 8px;
    padding: 11px 13px;
    color: var(--ink);
    font: inherit;
    background: #ffffff;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: 3px solid rgba(143, 23, 74, 0.16);
    border-color: var(--primary);
}

.rating-group {
    margin: 0;
    padding: 0;
    border: 0;
}

.rating-group legend {
    padding: 0;
    margin-bottom: 8px;
}

.stars {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    width: fit-content;
    gap: 4px;
}

.stars input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.stars label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d4dbe7;
    border-radius: 8px;
    color: #adb6c6;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.stars label:hover,
.stars label:hover ~ label,
.stars input:checked ~ label {
    color: var(--gold);
    border-color: rgba(246, 181, 29, 0.65);
}

.stars label:hover {
    transform: translateY(-1px);
}

.rating-help {
    color: var(--muted);
    font-weight: 400;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.primary-button:hover {
    background: var(--primary-dark);
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.alert-success {
    color: var(--success);
    background: rgba(18, 122, 72, 0.1);
}

.alert-error {
    color: var(--danger);
    background: rgba(180, 35, 24, 0.1);
}

.admin-body {
    background: #f6f8fb;
}

.compact-header {
    min-height: 76px;
    padding: 12px clamp(16px, 4vw, 44px);
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    text-decoration: none;
}

.brand-link img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 56px;
}

.login-card {
    width: min(430px, 100%);
    margin: 48px auto;
    padding: 30px;
    display: grid;
    gap: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.login-card img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.login-card p {
    margin: -8px 0 0;
    color: var(--muted);
}

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

.dashboard-head {
    margin-bottom: 24px;
}

.dashboard-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.metric-card,
.table-panel {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metric-card {
    padding: 18px;
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.metric-card strong {
    display: block;
    margin-top: 10px;
    font-size: 28px;
}

.table-panel {
    overflow: hidden;
}

.table-tools {
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.table-tools label {
    width: min(430px, 100%);
}

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid #e8edf4;
    text-align: left;
    vertical-align: top;
}

th {
    color: #30384b;
    background: #f7f9fc;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
}

tbody tr:hover {
    background: #fbfcff;
}

.rating-pill {
    display: inline-flex;
    min-width: 78px;
    color: var(--gold);
    font-size: 16px;
    letter-spacing: 0;
}

.empty-state {
    padding: 34px;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 820px) {
    .header-inner {
        grid-template-columns: 88px 1fr;
        min-height: auto;
        padding: 18px 0;
    }

    .header-logo {
        width: 88px;
        height: 74px;
    }

    .header-mark {
        display: none;
    }

    .feedback-panel,
    .form-grid,
    .metrics-row {
        grid-template-columns: 1fr;
    }

    .panel-media {
        padding: 24px;
    }

    .panel-media img {
        width: 130px;
    }

    .feedback-form {
        padding: 24px;
    }

    .form-heading,
    .dashboard-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .page-shell,
    .admin-shell,
    .header-inner {
        width: min(100% - 20px, 1180px);
    }

    .header-copy h1 {
        font-size: 24px;
    }

    .header-copy p {
        font-size: 15px;
    }

    .stars label {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
}
