:root {
    --brand-primary: #e65100;
    --brand-secondary: #00bfa5;
    --brand-dark: #1a237e;
    --surface: #ffffff;
    --surface-muted: #f8f9fc;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body.app-body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #fff8f0 0%, #f0fdfa 100%);
    min-height: 100vh;
    margin: 0;
}

html.registration-html,
html.registration-html body.app-body {
    min-height: 100%;
}

.page-shell.registration-page {
    max-width: 980px;
    min-height: 100vh;
    height: auto;
    margin: 0 auto;
    padding: 16px 20px 24px;
}

.app-card.registration-card {
    width: 100%;
    height: auto;
    padding: 20px 24px 16px;
}

.app-header-compact {
    text-align: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.app-header-compact .badge-brand {
    display: inline-block;
    background: rgba(230, 81, 0, 0.1);
    color: var(--brand-primary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 6px;
}

.app-header-compact h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
    line-height: 1.25;
}

.app-header-compact p {
    color: var(--text-muted);
    margin: 4px 0 0;
    font-size: 0.85rem;
    line-height: 1.35;
}

.registration-page .stepper {
    margin-bottom: 14px;
}

.registration-page .stepper::before,
.registration-page .stepper .progress {
    top: 16px;
    height: 4px;
}

.registration-page .step .circle {
    width: 34px;
    height: 34px;
    font-size: 0.82rem;
    margin: 0 auto 5px;
}

.registration-page .step.active .circle {
    transform: none;
}

.registration-page .step .label {
    font-size: 0.7rem;
    line-height: 1.2;
}

.form-stage {
    display: block;
}

form.registration-form.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

form.registration-form .form-body {
    display: block;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px 12px;
}

.registration-form .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0.7rem;
}

.registration-form .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
    color: var(--text);
}

.registration-form .form-control,
.registration-form .form-select {
    min-height: 42px;
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    border-radius: 9px;
    line-height: 1.4;
    border-color: #cfd8e3;
    background-color: #fff;
}

.registration-form .form-control:focus,
.registration-form .form-select:focus {
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 3px rgba(0, 191, 165, 0.12);
}

.registration-form textarea.form-control {
    min-height: 68px;
    padding-top: 0.55rem;
    resize: vertical;
}

.registration-form input[type="file"].form-control {
    padding: 0.4rem 0.75rem;
    line-height: 1.5;
}

.registration-form .form-text-hint {
    font-size: 0.75rem;
    margin-top: 3px;
    line-height: 1.2;
}

.registration-form .file-feedback {
    margin-top: 3px;
    line-height: 1.25;
}

.registration-form .form-text-hint.text-danger,
.registration-form .file-feedback.text-danger {
    color: #dc3545 !important;
    font-weight: 500;
}

.registration-form .form-check-label {
    font-size: 0.875rem;
}

.registration-form .form-check-input {
    width: 1.05em;
    height: 1.05em;
    margin-top: 0.2em;
    border-color: #cfd8e3;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px 14px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
}

.checkbox-grid .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0;
    padding: 3px 0;
    min-height: auto;
}

.checkbox-grid .form-check-input {
    float: none;
    margin-left: 0;
    margin-top: 0.2em;
    flex-shrink: 0;
    position: static;
}

.checkbox-grid .form-check-label {
    padding-left: 0;
    line-height: 1.3;
}

.checkbox-grid-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.form-nav {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.registration-form .btn-brand,
.registration-form .btn-outline-brand {
    min-height: 40px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 9px;
}

.contact-banner-compact {
    background: linear-gradient(135deg, #e3f2fd, #e0f7fa);
    border: 1px solid #b3e5fc;
    border-radius: 9px;
    padding: 8px 12px;
    text-align: center;
    color: #01579b;
    font-size: 0.8rem;
    margin-top: 12px;
}

.contact-banner-compact a {
    color: #01579b;
    font-weight: 600;
    text-decoration: none;
}

.registration-closed {
    text-align: center;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 24px;
    margin-top: 8px;
}

.registration-closed-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 12px;
}

.registration-closed h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 10px;
}

.registration-closed p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 520px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .page-shell.registration-page {
        padding: 8px;
    }

    .checkbox-grid,
    .checkbox-grid-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

body.admin-body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: var(--surface-muted);
    min-height: 100vh;
    margin: 0;
}

.page-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.app-card,
.admin-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.app-card {
    padding: 32px 28px;
}

.app-header {
    text-align: center;
    margin-bottom: 32px;
}

.app-header .badge-brand {
    display: inline-block;
    background: rgba(230, 81, 0, 0.1);
    color: var(--brand-primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.app-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 8px;
}

.app-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 36px;
    gap: 4px;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    z-index: 0;
}

.stepper .progress {
    position: absolute;
    top: 18px;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 4px;
    transition: width 0.35s ease;
    z-index: 1;
}

.step {
    position: relative;
    text-align: center;
    flex: 1;
    z-index: 2;
    min-width: 0;
}

.step .circle {
    width: 38px;
    height: 38px;
    background: #cbd5e1;
    border-radius: 50%;
    margin: 0 auto 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease;
}

.step.active .circle {
    background: var(--brand-primary);
    transform: scale(1.05);
}

.step.completed .circle {
    background: var(--brand-secondary);
}

.step .label {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.3;
    padding: 0 2px;
}

.step.active .label {
    color: var(--brand-dark);
    font-weight: 600;
}

form.registration-form {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--brand-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 191, 165, 0.25);
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 6px;
}

.form-text-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-control,
.form-select {
    border-radius: 10px;
    border-color: var(--border);
    padding: 0.6rem 0.85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 0.2rem rgba(0, 191, 165, 0.15);
}

.is-invalid {
    border-color: #dc3545 !important;
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand-primary), #ff8f00);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.4rem;
}

.btn-brand:hover,
.btn-brand:focus {
    background: linear-gradient(135deg, #d84315, var(--brand-primary));
    color: #fff;
}

.btn-outline-brand {
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    border-radius: 10px;
    padding: 0.55rem 1.4rem;
    background: #fff;
}

.btn-outline-brand:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.contact-banner {
    background: linear-gradient(135deg, #e3f2fd, #e0f7fa);
    border: 1px solid #b3e5fc;
    border-radius: 12px;
    padding: 14px 18px;
    text-align: center;
    color: #01579b;
    font-size: 0.92rem;
}

.contact-banner a {
    color: #01579b;
    font-weight: 600;
    text-decoration: none;
}

.admin-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.admin-topbar h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    border-radius: 12px;
    padding: 20px;
    color: #fff;
}

.stat-card h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-total { background: linear-gradient(135deg, #3949ab, #5c6bc0); }
.stat-unique { background: linear-gradient(135deg, #00897b, #26a69a); }
.stat-dup { background: linear-gradient(135deg, #f57c00, #ffb74d); }

.search-box {
    max-width: 320px;
}

.table-wrap {
    max-height: 520px;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.admin-table thead th {
    position: sticky;
    top: 0;
    background: var(--brand-dark);
    color: #fff;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 1;
}

.admin-table tbody tr:hover {
    background: rgba(0, 191, 165, 0.06);
}

.detail-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 0.95rem;
}

.profile-card img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid var(--border);
}

@media (max-width: 576px) {
    .app-card {
        padding: 20px 16px;
    }

    .step .label {
        font-size: 0.62rem;
    }

    .step .circle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}
