:root {
    --primary: #c0392b;
    --primary-dark: #96281b;
    --primary-light: #e74c3c;
    --accent: #f39c12;
    --bg-dark: #1a1a2e;
    --bg-card: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e8ecef;
    --success: #27ae60;
    --error: #e74c3c;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: #f8f9fb;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero — full screen slider with registration form overlay */
.hero {
    background: var(--bg-dark);
    color: #fff;
    width: 100%;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transform: scale(1.06);
    transition: transform 8s ease-out;
}

.hero-slide.active img {
    transform: scale(1);
}

.hero-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 46, 0.35) 0%,
        rgba(22, 33, 62, 0.25) 50%,
        rgba(15, 52, 96, 0.35) 100%
    );
    pointer-events: none;
}

.hero-overlay::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(192, 57, 43, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-dots {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 0.5rem;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.hero-dot:hover {
    border-color: #fff;
    transform: scale(1.15);
}

.hero-dot.active {
    background: var(--accent);
    border-color: var(--accent);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.75rem;
}

.nav-cta {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.nav-link:hover {
    color: #fff;
}

.nav-user {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
}

.student-hero {
    min-height: 100vh;
}

.student-hero .hero-slider,
.student-hero .hero-overlay {
    position: absolute;
}

.input-readonly {
    background: rgba(255, 255, 255, 0.6) !important;
    cursor: not-allowed;
}

.current-file {
    margin-bottom: 0.35rem;
}

.current-file a {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
}

.uploaded-docs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-form-panel .uploaded-docs-list .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-form-panel .uploaded-docs-list .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.hero-layout {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 5.5rem 2rem 3rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.hero-form-panel {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 2rem 2.5rem;
}

.form-panel-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-panel-header .hero-badge {
    display: inline-block;
    margin-bottom: 1rem;
    background: rgba(243, 156, 18, 0.25);
    color: var(--accent);
    border: 1px solid rgba(243, 156, 18, 0.45);
}

.form-panel-header h2 {
    font-size: 1.85rem;
    color: #fff;
    margin-bottom: 0.35rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.form-panel-header p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
}

.hero-form-panel .form-section legend {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.25);
}

.hero-form-panel .form-group label {
    color: rgba(255, 255, 255, 0.95);
}

.hero-form-panel .form-group input,
.hero-form-panel .form-group select,
.hero-form-panel .form-group textarea {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.35);
}

.hero-form-panel .file-hint {
    color: rgba(255, 255, 255, 0.8);
}

.hero-form-panel .required {
    color: #ffb4ab;
}

.hero-badge {
    background: rgba(243, 156, 18, 0.25);
    color: var(--accent);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(243, 156, 18, 0.45);
}

.highlight {
    color: var(--accent);
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

.stat span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(192, 57, 43, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

/* Programs */
.programs {
    padding: 4rem 0;
    background: #fff;
    position: relative;
    z-index: 5;
}

.programs h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2.5rem;
}

.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.program-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.program-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.program-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.program-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.program-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Registration Form */
.register-section {
    padding: 4rem 0 5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
}

.required {
    color: var(--error);
}

.registration-form {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.form-section {
    border: none;
    margin-bottom: 1.5rem;
    padding: 0;
}

.form-section legend {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--border);
    width: 100%;
}

.legend-num {
    background: var(--primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.6rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.password-field {
    position: relative;
}

.password-field input {
    width: 100%;
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #5a6578;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.password-toggle:hover {
    color: var(--primary);
}

.password-toggle .hidden {
    display: none;
}

.hero-form-panel .password-toggle {
    color: #4a5568;
}

.hero-form-panel .password-toggle:hover {
    color: var(--primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

.file-input-wrapper input[type="file"] {
    padding: 0.5rem;
    font-size: 0.85rem;
}

.file-hint {
    font-size: 0.78rem;
    color: var(--text-light);
    white-space: nowrap;
}

.extra-documents-container {
    grid-column: 1 / -1;
    display: contents;
}

.extra-doc-row {
    grid-column: 1 / -1;
}

.extra-doc-input {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.extra-doc-input input[type="file"] {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
}

.btn-add-doc {
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px dashed rgba(255, 255, 255, 0.45);
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-add-doc:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.7);
}

.btn-add-doc:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-remove-doc {
    background: rgba(231, 76, 60, 0.85);
    color: #fff;
    border: none;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-remove-doc:hover {
    background: var(--error);
}

.form-actions {
    text-align: center;
    padding-top: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.85rem;
    position: relative;
    z-index: 5;
}

/* Admin Styles */
.admin-body {
    background: #f0f2f5;
    min-height: 100vh;
}

.admin-nav {
    background: var(--bg-dark);
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav h1 {
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.admin-nav-links a:hover {
    color: #fff;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h2 {
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.stat-card .stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 0.25rem;
}

.admin-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    background: #f8f9fb;
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
}

.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: #fafbfc;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-approved {
    background: #d4edda;
    color: #155724;
}

.badge-rejected {
    background: #f8d7da;
    color: #721c24;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #16213e 100%);
}

.login-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 0.25rem;
}

.login-card .login-sub {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.detail-item label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.detail-item p {
    font-size: 0.95rem;
    font-weight: 500;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.filter-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.filter-bar select,
.filter-bar input {
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 960px) {
    .hero-layout {
        max-width: 100%;
        padding: 5rem 1.25rem 2.5rem;
    }

    .hero-form-panel {
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 640px) {
    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-layout {
        padding: 4.5rem 0.75rem 2rem;
    }

    .form-panel-header h2 {
        font-size: 1.4rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .registration-form {
        padding: 1.25rem;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
    }

    .nav {
        padding: 1rem;
    }
}
