* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

a {
    color: #0f5db8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

mark {
    background: #fff2a8;
    padding: 0 2px;
    border-radius: 3px;
}

.container {
    width: min(1200px, 94%);
    margin: 24px auto;
}

.container.narrow {
    width: min(700px, 94%);
}

.card {
    background: #ffffff;
    border: 1px solid #d9e0e7;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

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

h1, h2, h3 {
    margin-top: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="datetime-local"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    margin: 0 0 14px 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}

textarea {
    resize: vertical;
}

button,
.button {
    display: inline-block;
    background: #0f5db8;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

button:hover,
.button:hover {
    background: #0b4b95;
    text-decoration: none;
}

.button-secondary {
    background: #475569 !important;
}

.button-secondary:hover {
    background: #334155 !important;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-success {
    background: #e8f7ec;
    color: #17663a;
    border: 1px solid #b7e0c1;
}

.alert-error {
    background: #fdecec;
    color: #9f1d1d;
    border: 1px solid #efb7b7;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: #1e293b;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.admin-nav a {
    color: #ffffff;
    text-decoration: none;
}

.page-title,
.topbar,
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.stats-grid,
.grid-2 {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.metric {
    font-size: 28px;
    font-weight: bold;
    margin-top: 8px;
}

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

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
    text-align: left;
}

th {
    background: #f8fafc;
}

.question-title {
    font-size: 16px;
    margin-bottom: 14px;
}

.required {
    color: #b91c1c;
    margin-left: 6px;
}

.option-list label {
    font-weight: 400;
    margin-bottom: 10px;
}

.nps-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(50px, 1fr));
    gap: 10px;
}

.nps-item {
    text-align: center;
    font-weight: 400;
    background: #f8fafc;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    padding: 10px 6px;
}

.nps-item input {
    width: auto;
    margin: 0 0 8px 0;
}

.answer-item {
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

.answer-item:last-child {
    border-bottom: 0;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: end;
}

.filter-actions {
    display: flex;
    align-items: end;
}

.inline-form {
    display: inline;
    margin: 0;
}

.link-button {
    background: none;
    border: 0;
    padding: 0;
    margin: 0 0 0 8px;
    color: #0f5db8;
    font-size: 14px;
    cursor: pointer;
}

.link-button:hover {
    background: none;
    color: #0b4b95;
    text-decoration: underline;
}

.danger-link {
    color: #b91c1c;
}

.danger-link:hover {
    color: #991b1b;
}

.action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.row-muted {
    opacity: 0.65;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    min-height: 170px;
    padding: 16px 0 8px 0;
}

.bar-col {
    width: 42px;
    text-align: center;
}

.bar-value {
    font-size: 12px;
    margin-bottom: 6px;
}

.bar {
    width: 100%;
    min-height: 2px;
    background: #0f5db8;
    border-radius: 6px 6px 0 0;
}

.bar-label {
    font-size: 12px;
    margin-top: 8px;
}

.mini-bar-wrap {
    width: 100%;
    max-width: 300px;
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.mini-bar {
    height: 100%;
    background: #0f5db8;
    border-radius: 999px;
}

.progress-wrap {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    background: #0f5db8;
    border-radius: 999px;
}

.session-brand {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #fff;
    border: 2px solid #d9e0e7;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
}

.session-brand-inner {
    display: flex;
    gap: 16px;
    align-items: center;
}

.session-brand-logo {
    max-height: 64px;
    max-width: 120px;
    object-fit: contain;
}

.qr-card {
    text-align: center;
}

.qr-image {
    max-width: 260px;
    width: 100%;
    height: auto;
    border: 1px solid #d9e0e7;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.trainer-card {
    border-left: 6px solid #0f5db8;
}

.trainer-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.trainer-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trainer-mini-stats {
    margin-bottom: 18px;
}

.compact-card {
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .nps-grid {
        grid-template-columns: repeat(5, minmax(50px, 1fr));
    }

    .page-title,
    .topbar,
    .pagination,
    .session-brand-inner,
    .trainer-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .bar-chart {
        overflow-x: auto;
    }
}