/* --- Global Style Resets & Variable System --- */
:root {
    --brand-orange: #f97316;
    --brand-orange-hover: #ea580c;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light-muted: #94a3b8;
    --input-border: #e2e8f0;
    --input-bg: #f8fafc;
    --font-stack: 'Vazirmatn', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-stack);
    background-color: #f1f5f9;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.messages-container {
    position: fixed;
    top: 100px; /* Sits just below your 90px navbar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000; /* Stays above everything */
    width: 90%;
    max-width: 400px;
    pointer-events: none; /* Allows clicking through the container */
}

.alert {
    pointer-events: auto; /* Re-enable clicking for the alert itself */
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    animation: slideDown 0.5s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Green Styling for SUCCESS */
.alert.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Red Styling for ERROR / DANGER */
.alert.error, .alert.danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Optional: Yellow for WARNING */
.alert.warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeeba;
}

/* Optional: Blue for INFO */
.alert.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* --- Container Frame --- */
.login-container {
    background-color: #ffffff;
    width: 100%;
    max-width: 1024px;
    min-height: 620px;
    border-radius: 24px;
    display: flex;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* --- Left Side: Interactive Form Elements --- */
.form-side {
    flex: 1.1;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    margin-bottom: 40px;
    align-self: flex-start;
}

.back-home:hover {
    color: var(--brand-orange);
}

.form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #0f172a;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Inputs & Form Groups */
.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.label-row label {
    margin-bottom: 0;
}

.forgot-password {
    font-size: 0.8rem;
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

.input-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 44px; /* Space on left for icons */
    font-family: var(--font-stack);
    font-size: 0.95rem;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    outline: none;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.input-field-wrapper input::placeholder {
    color: var(--text-light-muted);
}

.input-field-wrapper input:focus {
    border-color: var(--brand-orange);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-light-muted);
    pointer-events: none;
}

/* Submit Action Button */
.btn-submit {
    width: 100%;
    background-color: var(--brand-orange);
    color: #ffffff;
    border: none;
    padding: 14px;
    font-family: var(--font-stack);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-submit:hover {
    background-color: var(--brand-orange-hover);
}

.btn-submit:active {
    transform: scale(0.98);
}

.form-footer {
    margin-top: 40px;
    text-align: center;
}

.form-footer p {
    font-size: 0.8rem;
    color: var(--text-light-muted);
}

/* --- Right Side: Orange Presentation Panel --- */
.info-side {
    flex: 0.9;
    background-color: var(--brand-orange);
    position: relative;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Subtle Geometric Decorative Accents */
.circle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.circle-top {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
}

.circle-bottom {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -40px;
}

.info-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.info-content h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 20px;
}

.info-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* Inner Translucent Box Segment */
.new-student-card {
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(8px);
}

.new-student-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.new-student-card p {
    font-size: 0.85rem;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 20px;
}

.btn-courses {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ffffff;
    color: var(--brand-orange);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-courses:hover {
    background-color: #fff7ed;
    transform: translateY(-2px);
}

/* --- Responsive Adjustments --- */
@media (max-width: 868px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
    }

    .form-side {
        padding: 40px 24px;
    }

    .info-side {
        padding: 40px 24px;
    }
}