/* Edumatris Ultra-Minimalist Auth Design */

:root {
    /* Başlangıçta default / öğrenci rengi */
    --theme-accent: #009D6C; 
    
    --text-main: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --page-bg: #F9FAFB;
    --card-bg: #FFFFFF;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--page-bg);
}

/* =========================================
   SPLIT LAYOUT
   ========================================= */
.auth-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--card-bg);
    overflow: hidden;
}

.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 40px;
    background: var(--card-bg);
    z-index: 2;
}

.auth-right {
    flex: 1.2;
    background: #000F0A; /* Dark mode bg */
    border-radius: 48px 0 0 48px; /* Clean rounded split */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 120px;
    position: relative;
    z-index: 1;
    box-shadow: -10px 0 40px rgba(0,0,0,0.05);
}

.auth-right-text h2 {
    color: #F9F7F1;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.auth-right-text p {
    color: #8CA399;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 400px;
}

.auth-right-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid #013625;
    color: #009D6C;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.auth-right-btn:hover {
    background: rgba(0, 157, 108, 0.1);
    color: #10B981;
}

/* Logo Top Left */
.auth-logo-top {
    position: absolute;
    top: 40px;
    left: 40px;
}
.auth-logo-top img {
    height: 32px;
}

/* The actual white form wrapper */
.auth-content {
    width: 100%;
    max-width: 440px;
    margin: auto; /* Centers it in the flex column */
    display: flex;
    flex-direction: column;
}

.auth-form-header {
    text-align: left;
    margin-bottom: 32px;
}
.auth-form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.auth-form-header p {
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .auth-right {
        display: none;
    }
    .auth-left {
        flex: 1;
        padding: 24px;
        align-items: center;
        justify-content: center;
    }
    .auth-logo-top {
        position: static;
        margin-bottom: 32px;
        text-align: center;
    }
}


/* =========================================
   FORMS & INPUTS
   ========================================= */



/* FLOATING LABELS */
.form-group {
    position: relative;
    margin-bottom: 24px;
}
.edu-input {
    width: 100%;
    height: 48px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 16px;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.edu-input:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.03); /* Subtle focus ring */
}
.edu-input::placeholder {
    color: transparent;
}
.form-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    padding: 0 4px;
    font-size: 14px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    pointer-events: none;
    margin: 0;
    z-index: 2;
}
.edu-input:focus ~ .form-label,
.edu-input:not(:placeholder-shown) ~ .form-label,
.edu-input:-webkit-autofill ~ .form-label,
.edu-input.has-value ~ .form-label {
    top: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-accent);
}
.edu-input:not(:focus):not(:placeholder-shown) ~ .form-label,
.edu-input:not(:focus).has-value ~ .form-label {
    color: var(--text-muted);
}


/* Password Toggle */
.password-group {
    position: relative;
}
.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}
.password-toggle-btn:hover { color: var(--text-main); }

/* Buttons */
.btn-primary {
    width: 100%;
    height: 48px;
    background: var(--theme-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, background-color 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.btn-primary:hover {
    filter: brightness(0.9);
}

/* Links */
.auth-links {
    margin-top: 32px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}
.auth-links a {
    color: var(--theme-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.4s ease;
}
.auth-links a:hover {
    text-decoration: underline;
}
.forgot-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-accent);
    text-decoration: none;
    float: right;
    transition: color 0.4s ease;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.checkbox-container input {
    display: none;
}
.checkmark {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: var(--card-bg);
}
.checkbox-container:hover .checkmark {
    border-color: var(--text-muted);
}
.checkbox-container input:checked + .checkmark {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
}
.checkmark::after {
    content: "";
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
    margin-top: -2px;
}
.checkbox-container input:checked + .checkmark::after {
    display: block;
}

/* Role Selector (Register) */
.role-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}
.role-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.role-card:hover {
    border-color: #D1D5DB;
}
.role-card.active {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 24px;
    display: none;
    line-height: 1.5;
}
.alert.error {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid rgba(220,38,38,0.2);
}
.alert.success {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid rgba(5,150,105,0.2);
}
.form-group.has-error .edu-input {
    border-color: var(--danger, #DC2626) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}
.field-error, .checkbox-error {
    color: var(--danger, #DC2626);
    font-size: 12px;
    display: block;
}

.field-error {
    position: absolute;
    bottom: -20px;
    left: 4px;
    margin-top: 0;
    white-space: nowrap;
}

.checkbox-error {
    margin-top: 4px;
    margin-left: 32px;
    margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-content { padding: 40px 24px; }
}
/* Powered By */
.powered-by {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    transition: opacity 0.2s;
    text-decoration: none;
}
.powered-by:hover {
    opacity: 1;
}
.powered-by span {
    color: #8CA399;
    font-size: 11px;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-transform: uppercase;
}
.powered-by img {
    height: 18px;
}



/* Custom Error Highlighting */
.edu-input.error,
.edu-select-trigger.error {
    border-color: var(--danger, #ef4444) !important;
}

/* --- Mobile Specific Overrides (max-width: 576px) --- */
@media (max-width: 991px) {
    body, .auth-layout {
        padding: 0 !important;
        background: var(--card-bg) !important; /* Telefonlarda arkaplan ve kart aynı renk olsun (bütünlük) */
        display: block !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    .auth-card {
        padding: 32px 20px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        border: none !important;
        min-height: 100vh !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .auth-form-header { margin-top: -40px; }
    .auth-form-header h1 {
        font-size: 26px !important;
    }
    .edu-input {
        font-size: 16px !important; /* iOS Zoom önleyici */
        padding: 14px !important;
    }
    .edu-btn {
        padding: 14px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 576px) {
    .auth-card {
        padding: 24px 16px !important;
        border-radius: 12px !important;
    }
    .auth-form-container {
        padding: 24px 16px;
    }
    .auth-form-header {
        margin-top: 0;
    }
    .auth-form-header h1 {
        font-size: 24px !important;
    }
    .edu-input {
        font-size: 16px !important; /* Prevents iOS Safari zoom */
    }
    .field-error {
        white-space: normal;
        position: static;
        margin-top: 4px;
        line-height: 1.3;
    }
    .role-selector {
        gap: 8px;
    }
    .role-card {
        padding: 10px 6px;
    }
    .role-card i {
        font-size: 18px;
    }
    .role-card span {
        font-size: 12px;
    }
    .powered-by {
        position: static;
        margin-top: 24px;
        text-align: center;
        justify-content: center;
        width: 100%;
    }
}

.checkbox-container.has-error .checkmark {
    border-color: var(--danger, #DC2626) !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
}

/* Yasal İzin ve Bilgilendirme Kartı (Mobil İle Birebir Uyumlu) */
.legal-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.2px;
    margin-bottom: 12px;
}

.legal-info-card {
    display: flex;
    align-items: flex-start;
    padding: 11px 12px;
    margin-top: 12px;
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.legal-info-card:hover {
    border-color: var(--theme-accent);
    background-color: #F1F5F9;
}
.legal-info-icon {
    margin-right: 8px;
    margin-top: 2px;
    font-size: 15px;
    color: var(--theme-accent);
    flex-shrink: 0;
    transition: color 0.4s ease;
}
.legal-info-text {
    font-size: 12.2px;
    line-height: 1.45;
    color: #475569;
    flex: 1;
}
.legal-info-highlight {
    font-weight: 700;
    color: var(--theme-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.4s ease;
}
.legal-info-arrow {
    margin-left: 8px;
    margin-top: 3px;
    font-size: 11px;
    color: #94A3B8;
    flex-shrink: 0;
}


