/* ============================================================
   Course Registration System - Styles
   Lendi Institute of Engineering & Technology
   Theme: Navy Blue + Gold + Red
   ============================================================ */

/* ---- CSS Custom Properties — lendinit.lendi.edu.in Theme ---- */
:root {
    /* Lendi exact brand colors (from lendinit source) */
    --lendi-red: #E31E24;
    --lendi-yellow: #FFB81C;
    --lendi-gray: #A7A9AC;

    /* Mapped tokens */
    --navy-dark: #0f172a;          /* lendinit CTA section bg */
    --navy: #003377;               /* Lendi institutional blue */
    --navy-light: #1e3a6e;

    --gold: #E31E24;               /* Lendi red (primary CTA) */
    --gold-light: #fff0f0;
    --gold-glow: rgba(227, 30, 36, 0.2);

    --accent: #FFB81C;             /* Lendi yellow (secondary) */
    --accent-light: #fff8e1;

    --red: #E31E24;
    --red-light: #ff4444;

    --white: #ffffff;
    --off-white: #f8f9fc;
    --dark: #0a0a0a;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --success: #10b981;
    --error: #dc2626;

    /* lendinit font */
    --font-heading: 'Bricolage Grotesque', sans-serif;
    --font-body: 'Poppins', sans-serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-gold: 0 8px 30px rgba(227, 30, 36, 0.25);

    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-slow: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: #ffffff;
    min-height: 100vh;
    color: var(--dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold), var(--navy-light));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ---- Background Waves (lendinit style) ---- */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    filter: blur(120px);
    opacity: 0.12;
}

.particle {
    position: absolute;
    border-radius: 50%;
}

.wave-bg-1 {
    background-color: var(--lendi-red);
    width: 80vw;
    height: 80vw;
    top: -10%;
    left: -20%;
    animation: waveFlow 40s linear infinite;
}

.wave-bg-2 {
    background-color: var(--lendi-yellow);
    width: 60vw;
    height: 60vw;
    bottom: -10%;
    right: -10%;
    animation: waveFlow 30s linear infinite reverse;
}

@keyframes waveFlow {
    0%   { transform: translate(0, 0) rotate(0deg); }
    50%  { transform: translate(10vw, 10vh) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ---- Main Container ---- */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ---- Header ---- */
.form-header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    border-top: 3px solid var(--lendi-red);
    width: 100%;
    padding: 20px 32px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: headerSlideIn 0.8s ease-out;
}

@keyframes headerSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-logos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-logo {
    flex-shrink: 0;
    object-fit: contain;
    object-position: center;
    border-radius: var(--radius-sm);
    transition: opacity 0.3s ease;
}

.header-logo:hover {
    opacity: 0.88;
}

.logo-left {
    width: auto;
    height: 80px;
    max-width: 100px;
}

.logo-right {
    width: auto;
    height: 80px;
    max-width: 220px;
}

.btn-hod-login {
    position: absolute;
    top: 12px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: rgba(227, 30, 36, 0.06);
    color: var(--lendi-red);
    border: 1px solid rgba(227, 30, 36, 0.25);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-body);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}
.btn-hod-login:hover {
    background: var(--lendi-red);
    color: #ffffff;
    border-color: var(--lendi-red);
}

.header-text {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.institute-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--lendi-red), var(--lendi-yellow), var(--lendi-red));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 5s linear infinite;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

@keyframes gradientFlow {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.institute-subtitle {
    color: rgba(0, 0, 0, 0.45);
    font-size: 0.75rem;
    margin-top: 4px;
    font-style: italic;
}

.form-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.title-decoration {
    color: var(--accent);
    font-size: 1.1rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.form-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--lendi-red);
    letter-spacing: 0.25em;
    padding: 6px 18px;
    border: 1.5px solid rgba(227, 30, 36, 0.3);
    border-radius: 99px;
    background: rgba(227, 30, 36, 0.05);
    text-transform: uppercase;
}

/* ---- Progress Bar ---- */
.progress-container {
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

.progress-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, #E31E24, #F05355, #E31E24);
    background-size: 200% auto;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: shimmer 2s linear infinite;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid rgba(0, 0, 0, 0.15);
    color: rgba(0, 0, 0, 0.35);
    background: rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

.progress-step.active .step-circle {
    border-color: var(--gold);
    color: var(--white);
    background: var(--gold);
    box-shadow: 0 0 20px var(--gold-glow);
}

.progress-step.completed .step-circle {
    border-color: var(--success);
    color: var(--white);
    background: var(--success);
}

.step-label {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.4);
    font-weight: 500;
    transition: var(--transition);
}

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

/* ---- Form Card ---- */
.form-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-top: 3px solid var(--lendi-red);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    animation: cardSlideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.form-card:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 40px 80px -15px rgba(227, 30, 36, 0.1), 0 4px 16px rgba(0,0,0,0.06);
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-header {
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 2px solid linear-gradient(90deg, transparent, var(--gold), transparent);
    border-image: linear-gradient(90deg, transparent, var(--gold), transparent) 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    font-size: 1.4rem;
}

/* ---- Form Grid ---- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Form Group ---- */
.form-group {
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
}

.required {
    color: var(--red);
    font-weight: 700;
}

.auto-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    background: linear-gradient(135deg, var(--accent), #ffd04a);
    color: var(--navy-dark);
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Input Wrapper ---- */
.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--dark);
    transition: var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-glow), var(--shadow-sm);
}

.form-input:focus + .input-icon {
    transform: scale(1.1);
}

.form-input.auto-field {
    background: var(--off-white);
    border-style: dashed;
    cursor: not-allowed;
    font-weight: 600;
    color: var(--navy);
}

.form-input.valid {
    border-color: var(--success);
}

.form-input.invalid {
    border-color: var(--error);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    transition: var(--transition);
    pointer-events: none;
}

.validation-icon {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition);
}

.validation-icon.valid::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--success);
}

.validation-icon.invalid::after {
    content: '\f00d';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--error);
}

.validation-icon.valid,
.validation-icon.invalid {
    opacity: 1;
}

.error-text {
    display: block;
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 4px;
    min-height: 18px;
    transition: var(--transition);
}

/* ---- File Upload ---- */
.file-upload-section {
    margin-bottom: 24px;
    animation: fadeInUp 0.4s ease-out;
}

.file-upload-header {
    margin-bottom: 12px;
}

.file-section-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
}

.file-help-text {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 4px;
}

.file-upload-area {
    border: 2px dashed var(--gold);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    background: rgba(227, 30, 36, 0.02);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232,42,40,0.04), transparent);
    opacity: 0;
    transition: var(--transition);
}

.file-upload-area:hover {
    border-color: var(--gold);
    background: rgba(227, 30, 36, 0.04);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.file-upload-area:hover::before {
    opacity: 1;
}

.file-upload-area.dragover {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
    transform: scale(1.02);
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    animation: uploadBounce 2s ease-in-out infinite;
}

@keyframes uploadBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.upload-text {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}

.upload-subtext {
    font-size: 0.85rem;
    color: var(--gray);
}

.browse-link {
    color: var(--gold);
    font-weight: 600;
    text-decoration: underline;
}

.upload-limit {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 8px;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.3);
    position: relative;
    z-index: 3;
}

.file-preview .file-icon {
    font-size: 1.3rem;
}

.file-preview .file-name {
    flex: 1;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.file-remove {
    background: var(--error);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 0.8rem;
    transition: var(--transition);
}

.file-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ---- Courses Section ---- */
.courses-section {
    margin-bottom: 28px;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}

.section-description {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 16px;
}

/* Add-course bar */
.course-add-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-add-course {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 20px;
    background: linear-gradient(135deg, #E31E24, #B5181E);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(227, 30, 36, 0.25);
}

.btn-add-course:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(227, 30, 36, 0.4);
}

.btn-add-course:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Inline course entry / edit form */
.course-form-panel {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-top: 3px solid var(--lendi-red);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    animation: fadeInUp 0.25s ease-out;
}

.course-form-grid {
    display: grid;
    grid-template-columns: 140px 1fr 90px 140px;
    gap: 12px;
    margin-bottom: 14px;
}

.course-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.course-form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    font-family: var(--font-heading);
}

.course-form-actions {
    display: flex;
    gap: 10px;
}

.course-form-actions .btn {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* Courses table */
.courses-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-light);
    margin-bottom: 12px;
}

.courses-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.courses-table thead {
    background: linear-gradient(135deg, #E31E24, #B5181E);
}

.courses-table th {
    padding: 11px 14px;
    text-align: left;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.th-code    { width: 120px; }
.th-credits { width: 80px; text-align: center; }
.th-type    { width: 110px; }
.th-ops     { width: 100px; text-align: center; }

.courses-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--gray-light);
    vertical-align: middle;
}

.courses-table tbody tr {
    transition: background 0.2s ease;
}

.courses-table tbody tr:hover {
    background: rgba(227, 30, 36, 0.03);
}

.courses-table tbody tr:last-child td {
    border-bottom: none;
}

.td-ops {
    text-align: center;
    white-space: nowrap;
}

.btn-op {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.78rem;
    transition: var(--transition);
    margin: 0 2px;
}

.btn-op-edit {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.btn-op-edit:hover {
    background: #2563eb;
    color: #ffffff;
}

.btn-op-delete {
    background: rgba(227, 30, 36, 0.08);
    color: var(--lendi-red);
}

.btn-op-delete:hover {
    background: var(--lendi-red);
    color: #ffffff;
}

.course-placeholder td {
    padding: 40px 16px;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray);
}

.placeholder-icon {
    font-size: 2rem;
    opacity: 0.5;
}

.course-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-professional-core     { background: rgba(37,99,235,0.1);   color: #1d4ed8; }
.badge-professional-elective { background: rgba(124,58,237,0.1);  color: #6d28d9; }
.badge-open-elective         { background: rgba(8,145,178,0.1);   color: #0e7490; }
.badge-skilled               { background: rgba(16,185,129,0.1);  color: #059669; }
.badge-mandatory             { background: rgba(217,119,6,0.12);  color: #b45309; }
.badge-laboratory            { background: rgba(20,184,166,0.1);  color: #0d9488; }
.badge-internship-csp        { background: rgba(79,70,229,0.1);   color: #4338ca; }
.badge-honors                { background: rgba(245,158,11,0.12); color: #92400e; }
.badge-minors                { background: rgba(100,116,139,0.1); color: #475569; }

.selected-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    color: var(--lendi-red);
    font-weight: 600;
}

.count-icon {
    font-size: 0.9rem;
}

/* ---- Degree Section ---- */
.degree-section {
    margin-bottom: 24px;
}

.radio-group {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.radio-card {
    flex: 1;
    cursor: pointer;
}

.radio-card input[type="radio"] {
    display: none;
}

.radio-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    transition: var(--transition);
    background: var(--white);
}

.radio-card input[type="radio"]:checked + .radio-content {
    border-color: var(--gold);
    background: rgba(227, 30, 36, 0.04);
    box-shadow: 0 0 0 4px var(--gold-glow);
}

.radio-checkmark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gray-light);
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.radio-card input[type="radio"]:checked + .radio-content .radio-checkmark {
    border-color: var(--gold);
}

.radio-card input[type="radio"]:checked + .radio-content .radio-checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
}

.radio-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}

.radio-sublabel {
    font-size: 0.8rem;
    color: var(--gray);
}

.radio-content:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}

/* ---- Declaration Section ---- */
.declaration-section {
    margin-bottom: 28px;
    padding: 20px;
    background: rgba(227, 30, 36, 0.03);
    border: 1px solid rgba(227, 30, 36, 0.14);
    border-radius: var(--radius-md);
}

.declaration-label {
    display: flex;
    gap: 14px;
    cursor: pointer;
    align-items: flex-start;
}

.declaration-label input[type="checkbox"] {
    display: none;
}

.declaration-checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gold);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: var(--transition);
}

.declaration-label input[type="checkbox"]:checked + .declaration-checkmark {
    background: var(--gold);
}

.declaration-label input[type="checkbox"]:checked + .declaration-checkmark::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 0.8rem;
}

.declaration-text {
    font-size: 0.85rem;
    color: var(--dark);
    line-height: 1.6;
}

/* ---- Form Actions ---- */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

/* ---- Buttons ---- */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #E31E24, #B5181E);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(227, 30, 36, 0.55);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 2px solid rgba(0, 51, 119, 0.5);
}

.btn-secondary:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
    transform: translateY(-2px);
}

.btn-submit {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(227, 30, 36, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(227, 30, 36, 0.65); }
}

.btn-submit:hover {
    animation: none;
}

.btn-arrow {
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-next:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-secondary:hover .btn-arrow {
    transform: translateX(-4px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ---- Form Page Transitions ---- */
.form-page {
    display: none;
    animation: pageSlideIn 0.5s ease-out;
}

.form-page.active {
    display: block;
}

@keyframes pageSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.form-page.slide-out-left {
    animation: slideOutLeft 0.3s ease-in forwards;
}

@keyframes slideOutLeft {
    to { opacity: 0; transform: translateX(-40px); }
}

.form-page.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.form-page.slide-out-right {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    to { opacity: 0; transform: translateX(40px); }
}

.form-page.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---- Hidden ---- */
.hidden {
    display: none !important;
}

/* ---- Footer ---- */
.form-footer {
    text-align: center;
    padding: 24px;
    color: rgba(0, 0, 0, 0.3);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 16px;
}

/* ---- Loading Overlay ---- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 18, 48, 0.92);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10000;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: 50%;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--gold);
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    inset: 6px;
    border-right-color: var(--gold-light);
    animation: spin 1.5s linear infinite reverse;
}

.spinner-ring:nth-child(3) {
    inset: 12px;
    border-bottom-color: var(--white);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-top: 20px;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    min-width: 320px;
    max-width: 420px;
    animation: toastSlideIn 0.4s ease-out;
    border-left: 4px solid;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--gold); }
.toast.info { border-left-color: var(--navy); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-exit {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
    to { opacity: 0; transform: translateX(100px); }
}

.toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--dark);
}

/* ---- Success Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 18, 48, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalScaleIn 0.4s ease-out;
}

@keyframes modalScaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.success-animation {
    margin-bottom: 24px;
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--success), #34d399);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: checkBounce 0.6s ease-out 0.2s both;
}

@keyframes checkBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.checkmark {
    width: 28px;
    height: 14px;
    border-left: 4px solid white;
    border-bottom: 4px solid white;
    transform: rotate(-45deg);
    margin-top: -4px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.modal-message {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ---- Announcement Modal ---- */
.ann-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10002;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.ann-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.ann-modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(227, 30, 36, 0.12);
    transform: translateY(28px) scale(0.96);
    transition:
        transform 0.45s cubic-bezier(0.34, 1.46, 0.64, 1),
        opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--lendi-red) transparent;
}

.ann-overlay.active .ann-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ann-header {
    background: linear-gradient(135deg, #E31E24 0%, #B5181E 100%);
    padding: 26px 30px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.ann-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    animation: shimmer 3.5s ease-in-out infinite;
}

.ann-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255, 185, 28, 0.18), transparent 70%);
    pointer-events: none;
}

.ann-header-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--lendi-yellow);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    animation: annBellRing 2.5s ease-in-out 0.8s 1;
    will-change: transform;
}

@keyframes annBellRing {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    25% { transform: rotate(-11deg); }
    40% { transform: rotate(9deg); }
    55% { transform: rotate(-6deg); }
    70% { transform: rotate(4deg); }
    85% { transform: rotate(-2deg); }
}

.ann-header-text {
    position: relative;
    z-index: 1;
    flex: 1;
}

.ann-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.ann-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.ann-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ann-alert {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    background: #fffbf0;
    border: 1px solid rgba(255, 184, 28, 0.35);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--lendi-yellow);
}

.ann-alert-icon {
    font-size: 1.25rem;
    color: #d97706;
    flex-shrink: 0;
    margin-top: 1px;
}

.ann-alert-content {
    flex: 1;
}

.ann-alert-title {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 5px;
}

.ann-alert-desc {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.6;
}

.ann-alert-desc strong {
    color: #1a1a1a;
    font-weight: 600;
}

.ann-instructions {
    background: #f9fafb;
    border-radius: var(--radius-md);
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
}

.ann-instr-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.ann-instr-title i {
    color: var(--lendi-red);
    font-size: 0.92rem;
}

.ann-instr-list {
    list-style: none;
    counter-reset: instr-counter;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
}

.ann-instr-list li {
    counter-increment: instr-counter;
    display: flex;
    gap: 11px;
    align-items: flex-start;
    font-size: 0.855rem;
    color: #374151;
    line-height: 1.65;
}

.ann-instr-list li::before {
    content: counter(instr-counter, lower-roman);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.68rem;
    color: var(--lendi-red);
    background: rgba(227, 30, 36, 0.07);
    border: 1.5px solid rgba(227, 30, 36, 0.2);
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.ann-instr-list li strong {
    color: #111827;
    font-weight: 600;
}

.ann-deadline {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    padding: 14px 16px;
    background: rgba(227, 30, 36, 0.04);
    border: 1px solid rgba(227, 30, 36, 0.2);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--lendi-red);
}

.ann-deadline-icon {
    font-size: 1.2rem;
    color: var(--lendi-red);
    flex-shrink: 0;
    margin-top: 2px;
}

.ann-deadline p {
    font-size: 0.855rem;
    color: #374151;
    line-height: 1.62;
}

.ann-deadline strong {
    color: var(--lendi-red);
    font-weight: 700;
}

.ann-footer {
    padding: 16px 28px 24px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: center;
}

.ann-btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.93rem;
    padding: 13px 36px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #E31E24, #B5181E);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(227, 30, 36, 0.35);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.ann-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ann-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(227, 30, 36, 0.5);
}

.ann-btn:hover::before {
    opacity: 1;
}

.ann-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 12px rgba(227, 30, 36, 0.3);
}

.ann-btn i {
    font-size: 1rem;
    color: var(--lendi-yellow);
    position: relative;
    z-index: 1;
}

.ann-btn span {
    position: relative;
    z-index: 1;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .ann-modal {
        max-height: 92vh;
        border-radius: var(--radius-lg);
    }

    .ann-header {
        padding: 20px 20px;
    }

    .ann-body {
        padding: 20px;
        gap: 14px;
    }

    .ann-footer {
        padding: 16px 20px 22px;
    }

    .ann-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.88rem;
        padding: 12px 24px;
    }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .main-container {
        padding: 12px 8px;
    }

    .form-header {
        padding: 16px;
    }

    .header-logos {
        flex-direction: column;
        gap: 12px;
    }

    .logo-left { height: 60px; max-width: 72px; }
    .logo-right { height: 60px; max-width: 160px; }

    .institute-name { font-size: 1rem; }
    .form-title { font-size: 0.9rem; padding: 6px 16px; }

    .course-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .course-add-bar { flex-direction: column; align-items: flex-start; }

    .form-card {
        padding: 20px 16px;
        border-radius: var(--radius-lg);
    }

    .radio-group {
        flex-direction: column;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .toast {
        min-width: auto;
        max-width: calc(100vw - 32px);
    }

    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    .progress-steps {
        gap: 8px;
    }

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