:root {
    --hsc-green: #0b6b3a;
    --hsc-green-dark: #064a28;
    --hsc-green-light: #e8f5ee;
    --hsc-gold: #c9a227;
    --hsc-gold-light: #f5ecd3;
    --hsc-red: #c41e3a;
    --hsc-black: #1a1a1a;
    --hsc-gray-100: #f7f9f8;
    --hsc-gray-200: #e8ecea;
    --hsc-gray-400: #9aa5a0;
    --hsc-gray-600: #5c6762;
    --hsc-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(11, 107, 58, 0.08);
    --shadow-md: 0 8px 24px rgba(11, 107, 58, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--hsc-black);
    background: linear-gradient(160deg, var(--hsc-green-light) 0%, var(--hsc-gray-100) 40%, #f0f4f2 100%);
    min-height: 100vh;
}

.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--hsc-green-dark) 0%, var(--hsc-green) 55%, #0d7d44 100%);
    color: var(--hsc-white);
    border-radius: var(--radius);
    padding: 2rem 2rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.25) 0%, transparent 70%);
    border-radius: 50%;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hsc-gold), #e8c84a, var(--hsc-gold));
}

.header-top {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.logo-badge {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    background: var(--hsc-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--hsc-gold);
}

.logo-badge svg {
    width: 44px;
    height: 44px;
}

.org-titles h1 {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.org-titles .subtitle {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.92;
    font-weight: 500;
}

.event-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.meta-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
}

.meta-item strong {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
    margin-bottom: 0.15rem;
}

/* Instructions */
.instructions {
    background: var(--hsc-white);
    border-left: 4px solid var(--hsc-gold);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    color: var(--hsc-gray-600);
}

.instructions strong {
    color: var(--hsc-green-dark);
}

/* Form sections */
.form-section {
    background: var(--hsc-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--hsc-gray-200);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--hsc-green-light);
}

.section-number {
    width: 36px;
    height: 36px;
    background: var(--hsc-green);
    color: var(--hsc-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.section-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--hsc-green-dark);
    font-weight: 700;
}

/* Rating scale legend */
.rating-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--hsc-green-light);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.rating-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    background: var(--hsc-white);
    border-radius: 20px;
    border: 1px solid var(--hsc-gray-200);
}

.rating-legend .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--hsc-green);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Performance ratings table */
.ratings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.ratings-table thead th {
    background: var(--hsc-green);
    color: var(--hsc-white);
    padding: 0.75rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 2;
}

.ratings-table thead th:first-child {
    text-align: left;
    border-radius: var(--radius-sm) 0 0 0;
    padding-left: 1rem;
    min-width: 220px;
}

.ratings-table thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.ratings-table tbody tr {
    transition: background 0.15s;
}

.ratings-table tbody tr:nth-child(even) {
    background: var(--hsc-gray-100);
}

.ratings-table tbody tr:hover {
    background: var(--hsc-green-light);
}

.ratings-table tbody td {
    padding: 0.85rem 0.35rem;
    text-align: center;
    border-bottom: 1px solid var(--hsc-gray-200);
    vertical-align: middle;
}

.ratings-table tbody td.indicator-cell {
    text-align: left;
    padding-left: 1rem;
    font-size: 0.9rem;
    color: var(--hsc-black);
}

.ratings-table tbody td .indicator-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--hsc-gold-light);
    color: var(--hsc-green-dark);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.indicator-label {
    display: flex;
    align-items: flex-start;
}

/* Custom radio (encircle style) */
.rating-radio {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.rating-radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rating-radio .circle {
    width: 32px;
    height: 32px;
    border: 2px solid var(--hsc-gray-400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hsc-gray-400);
    transition: all 0.2s ease;
    background: var(--hsc-white);
}

.rating-radio:hover .circle {
    border-color: var(--hsc-green);
    color: var(--hsc-green);
    transform: scale(1.08);
}

.rating-radio input:focus-visible + .circle {
    outline: 2px solid var(--hsc-gold);
    outline-offset: 2px;
}

.rating-radio input:checked + .circle {
    border-color: var(--hsc-green);
    border-width: 3px;
    background: var(--hsc-green);
    color: var(--hsc-white);
    box-shadow: 0 0 0 3px rgba(11, 107, 58, 0.2);
}

.rating-radio input:checked + .circle::after {
    content: '✓';
    font-size: 0.85rem;
}

/* Trainer modules */
.trainer-scale-note {
    font-size: 0.85rem;
    color: var(--hsc-gray-600);
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--hsc-gold-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--hsc-gold);
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
}

.trainer-table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.trainer-table thead th {
    background: var(--hsc-green-dark);
    color: var(--hsc-white);
    padding: 0.65rem 0.4rem;
    font-weight: 600;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.3;
}

.trainer-table thead th:first-child,
.trainer-table thead th:nth-child(2) {
    text-align: left;
    padding-left: 0.75rem;
}

.trainer-table tbody tr:nth-child(even) {
    background: var(--hsc-gray-100);
}

.trainer-table tbody tr:hover {
    background: var(--hsc-green-light);
}

.trainer-table tbody td {
    padding: 0.6rem 0.3rem;
    text-align: center;
    border-bottom: 1px solid var(--hsc-gray-200);
    vertical-align: middle;
}

.trainer-table tbody td.module-name {
    text-align: left;
    padding-left: 0.75rem;
    font-size: 0.82rem;
    max-width: 220px;
}

.trainer-table .module-num {
    font-weight: 700;
    color: var(--hsc-green);
    margin-right: 0.35rem;
}

.trainer-table .rating-radio .circle {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
}

/* Open-ended */
.open-ended-group {
    margin-bottom: 1.25rem;
}

.open-ended-group:last-child {
    margin-bottom: 0;
}

.open-ended-group label {
    display: block;
    font-weight: 600;
    color: var(--hsc-green-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.open-ended-group textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.85rem 1rem;
    border: 2px solid var(--hsc-gray-200);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--hsc-gray-100);
}

.open-ended-group textarea:focus {
    outline: none;
    border-color: var(--hsc-green);
    box-shadow: 0 0 0 3px rgba(11, 107, 58, 0.15);
    background: var(--hsc-white);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-error ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.alert-success {
    background: var(--hsc-green-light);
    border: 1px solid #a7d4b8;
    color: var(--hsc-green-dark);
}

/* Submit */
.form-actions {
    text-align: center;
    padding: 1rem 0;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--hsc-white);
    background: linear-gradient(135deg, var(--hsc-green) 0%, var(--hsc-green-dark) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(11, 107, 58, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.03em;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 107, 58, 0.45);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--hsc-gray-600);
    font-size: 0.9rem;
}

.site-footer .thank-you {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hsc-green);
    margin-bottom: 0.25rem;
}

/* Thank you page */
.thankyou-card {
    background: var(--hsc-white);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.thankyou-icon {
    width: 80px;
    height: 80px;
    background: var(--hsc-green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--hsc-green);
}

.thankyou-icon svg {
    width: 40px;
    height: 40px;
    color: var(--hsc-green);
}

.thankyou-card h1 {
    color: var(--hsc-green-dark);
    margin: 0 0 0.75rem;
}

.thankyou-card p {
    color: var(--hsc-gray-600);
    margin: 0 0 1.5rem;
}

.btn-back {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: var(--hsc-green);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-back:hover {
    background: var(--hsc-green-dark);
}

/* Admin */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--hsc-white);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--hsc-green);
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--hsc-green);
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--hsc-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        padding: 1.5rem 1.25rem;
    }

    .org-titles h1 {
        font-size: 1.1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .ratings-table thead th {
        font-size: 0.65rem;
        padding: 0.5rem 0.2rem;
    }

    .ratings-table tbody td.indicator-cell {
        font-size: 0.82rem;
        padding-left: 0.5rem;
    }

    .rating-radio .circle {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }

    .header-top {
        flex-direction: column;
        text-align: center;
    }
}

@media print {
    body {
        background: white;
    }

    .btn-submit,
    .form-actions {
        display: none;
    }
}
