/* ==========================================================================
   LOGIN MODULE CSS - RESPONSIVE & MODERN UI
   OkulSis giriş ekranı
   ========================================================================== */

:root {
    --login-bg-start: #06b6d4;
    --login-bg-end: #0f766e;
    --login-bg-deep: #111827;
    --card-bg: rgba(255, 255, 255, 0.97);
    --card-border: rgba(255, 255, 255, 0.55);
    --primary-color: #06b6d4;
    --primary-hover: #0891b2;
    --primary-soft: rgba(14, 165, 233, 0.11);
    --primary-border: rgba(14, 165, 233, 0.22);
    --text-main: #1a202c;
    --text-muted: #718096;
    --text-soft: #94a3b8;
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --error-bg: #fff5f5;
    --error-text: #c53030;
    --error-border: #feb2b2;
    --success-soft: #ecfdf5;
    --shadow-card: 0 24px 70px rgba(15, 23, 42, 0.24);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
    --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
}

.login-body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 30%),
        radial-gradient(circle at 85% 85%, rgba(56, 189, 248, 0.32) 0%, rgba(139, 92, 246, 0) 38%),
        linear-gradient(135deg, var(--login-bg-start) 0%, var(--login-bg-end) 100%);
}

.login-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 74%);
}

.login-page-shell {
    position: relative;
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 430px);
    align-items: stretch;
    gap: 24px;
    animation: fadeInScale 0.55s ease-out;
}

/* SOL TANITIM PANELİ */
.login-hero-panel {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    padding: 44px;
    border-radius: 30px;
    color: #ffffff;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.58), rgba(30, 41, 59, 0.32)),
        rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-hero-panel::before {
    content: "";
    position: absolute;
    top: -130px;
    right: -130px;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.login-hero-panel::after {
    content: "";
    position: absolute;
    bottom: -90px;
    left: -90px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.26);
}

.hero-badge {
    position: relative;
    z-index: 1;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 26px;
    padding: 9px 14px;
    border-radius: 999px;
    color: #eef2ff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.20);
    font-size: 0.86rem;
    font-weight: 800;
}

.login-hero-panel h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 16px 0;
    max-width: 520px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.02;
    letter-spacing: -2px;
    font-weight: 950;
}

.login-hero-panel p {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 0 30px 0;
    color: rgba(255, 255, 255, 0.80);
    font-size: 1.05rem;
    line-height: 1.7;
    font-weight: 500;
}

.hero-feature-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    max-width: 470px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.105);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
}

.hero-feature i {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    flex-shrink: 0;
}

/* GİRİŞ KARTI */
.login-card {
    width: 100%;
    padding: 42px 38px;
    border-radius: 30px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-card);
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-self: center;
}

.logo-area {
    margin-bottom: 30px;
}

.logo-icon {
    width: 86px;
    height: 86px;
    margin: 0 auto 18px auto;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(14, 165, 233, 0.12)),
        #ffffff;
    border: 1px solid var(--primary-border);
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.16);
}

.login-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}

.logo-area h2 {
    margin: 0 0 8px 0;
    color: var(--text-main);
    font-size: 1.85rem;
    font-weight: 950;
    letter-spacing: -0.7px;
}

.logo-area p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.5;
}

/* FORM */
.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
    color: #4a5568;
    font-size: 0.86rem;
}

.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.forgot-password-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    transition: var(--transition);
    white-space: nowrap;
}

.forgot-password-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #a0aec0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 1;
}

.input-wrapper:focus-within i {
    color: var(--primary-color);
    transform: scale(1.05);
}

.form-control {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 48px;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    font-size: 1rem;
    color: var(--text-main);
    background: var(--input-bg);
    transition: var(--transition);
    font-family: inherit;
}

.form-control::placeholder {
    color: #a0aec0;
}

.form-control:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 5px rgba(14, 165, 233, 0.11);
}

/* BUTTON */
.btn-login {
    width: 100%;
    height: 52px;
    margin-top: 24px;
    background: linear-gradient(135deg, var(--primary-color), #06b6d4);
    color: #ffffff;
    border: none;
    border-radius: 15px;
    font-size: 0.98rem;
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.28);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-hover), #0891b2);
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(14, 165, 233, 0.35);
}

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

.btn-login i {
    transition: var(--transition);
}

.btn-login:hover i {
    transform: translateX(3px);
}

/* ERROR */
.error-message {
    display: none;
    margin-bottom: 22px;
    padding: 14px 15px;
    border-radius: 14px;
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
    font-size: 0.88rem;
    line-height: 1.45;
    font-weight: 700;
    text-align: left;
    animation: shake 0.4s ease-in-out;
}

/* LOADER */
.loader-spinner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    margin-top: 24px;
    color: var(--primary-color);
    font-weight: 900;
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
    border-radius: 15px;
}

.loader-spinner i {
    font-size: 1.2rem;
}

/* FOOTER */
.login-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
    font-weight: 700;
}

.login-footer-note i {
    color: var(--primary-color);
}

/* TABLET */
@media (max-width: 992px) {
    .login-page-shell {
        max-width: 760px;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .login-hero-panel {
        min-height: auto;
        padding: 34px;
    }

    .login-hero-panel h1 {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .hero-feature-list {
        grid-template-columns: repeat(3, 1fr);
        max-width: none;
    }

    .hero-feature {
        flex-direction: column;
        align-items: flex-start;
        min-height: 110px;
    }

    .login-card {
        padding: 38px;
    }
}

/* MOBILE */
@media (max-width: 768px) {
    .login-body {
        align-items: flex-start;
        padding: 18px;
        min-height: 100svh;
    }

    .login-page-shell {
        min-height: auto;
    }

    .login-hero-panel {
        padding: 26px;
        border-radius: 24px;
    }

    .login-hero-panel h1 {
        font-size: 2rem;
        letter-spacing: -1.2px;
    }

    .login-hero-panel p {
        font-size: 0.96rem;
        margin-bottom: 22px;
    }

    .hero-feature-list {
        grid-template-columns: 1fr;
    }

    .hero-feature {
        min-height: auto;
        flex-direction: row;
        align-items: center;
    }

    .login-card {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .logo-icon {
        width: 76px;
        height: 76px;
        border-radius: 22px;
    }

    .login-logo-img {
        font-size: 2.45rem;
    }

    .logo-area h2 {
        font-size: 1.55rem;
    }

    .password-label-row {
        align-items: flex-start;
    }
}

/* SMALL MOBILE */
@media (max-width: 480px) {
    .login-body {
        padding: 14px;
    }

    .login-hero-panel {
        display: none;
    }

    .login-card {
        padding: 30px 20px;
        border-radius: 22px;
    }

    .logo-area {
        margin-bottom: 26px;
    }

    .logo-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 15px;
    }

    .logo-area h2 {
        font-size: 1.45rem;
    }

    .logo-area p {
        font-size: 0.9rem;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-control,
    .btn-login,
    .loader-spinner {
        height: 50px;
        border-radius: 14px;
    }

    .password-label-row {
        flex-direction: column;
        gap: 0;
    }

    .forgot-password-link {
        margin-top: -2px;
        margin-bottom: 9px;
    }

    .login-footer-note {
        align-items: flex-start;
        text-align: left;
        font-size: 0.76rem;
    }
}

/* VERY SMALL MOBILE */
@media (max-width: 360px) {
    .login-card {
        padding: 26px 16px;
    }

    .logo-area h2 {
        font-size: 1.32rem;
    }

    .form-control {
        font-size: 0.92rem;
    }

    .btn-login {
        font-size: 0.9rem;
    }
}

/* SHORT HEIGHT DEVICES */
@media (max-height: 680px) and (min-width: 481px) {
    .login-body {
        align-items: flex-start;
        overflow-y: auto;
    }

    .login-page-shell {
        margin: 20px 0;
    }

    .login-hero-panel {
        min-height: auto;
    }
}

/* ANIMATIONS */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ==========================================================================
   LOGIN - ŞİFREMİ UNUTTUM MODALI
   ========================================================================== */
body.login-modal-open {
    overflow: hidden;
}

.login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition);
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.login-modal-card {
    width: min(420px, 100%);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--card-border);
    border-radius: 26px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
    transform: translateY(16px) scale(0.96);
    transition: var(--transition);
}

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

.login-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
    font-size: 1.6rem;
}

.login-modal-icon.is-success {
    color: #059669;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.login-modal-icon.is-error {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.login-modal-card h3 {
    margin: 0 0 10px;
    color: var(--text-main);
    font-size: 1.35rem;
    font-weight: 950;
    letter-spacing: -0.4px;
}

.login-modal-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 600;
}

.login-modal-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 26px;
}

.login-modal-actions .login-modal-btn:only-child,
.login-modal-actions button:only-child {
    margin-left: auto;
    margin-right: auto;
}

.login-modal-btn {
    min-width: 176px;
    min-height: 48px;
    padding: 0 28px;
    border: none;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.login-modal-btn-muted {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.login-modal-btn-muted:hover {
    background: #e2e8f0;
}

.login-modal-btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color), var(--login-bg-start));
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.22);
}

.login-modal-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(14, 165, 233, 0.30);
}

.login-modal-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 480px) {
    .login-modal-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .login-modal-actions {
        flex-direction: column;
    }

    .login-modal-btn {
        width: 100%;
    }
}


/* ==========================================================================
   TURKUAZ TEMA - LOGIN MODAL TEK BUTON ORTALAMA DÜZELTMESİ
   ========================================================================== */
.login-modal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: 26px;
}

.login-modal-actions .login-modal-btn:only-child,
.login-modal-actions .login-modal-btn-primary:only-child,
.login-modal-actions .login-modal-btn-muted:only-child {
    min-width: 176px;
    margin-left: auto;
    margin-right: auto;
}

.login-modal-btn {
    padding-left: 28px;
    padding-right: 28px;
}


/* ==========================================================================
   LOGIN - ŞİFRE GÖSTER/GİZLE BUTONU
   ========================================================================== */
.password-input-wrapper .password-control {
    padding-right: 116px;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 88px;
    height: 36px;
    padding: 0 11px;
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.password-toggle-btn i {
    position: static !important;
    left: auto !important;
    color: currentColor !important;
    pointer-events: none;
    transform: none !important;
    font-size: 0.92rem;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus-visible {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(14, 165, 233, 0.20);
    outline: none;
}

.password-toggle-btn[aria-pressed="true"] {
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, var(--primary-color));
    border-color: transparent;
}

@media (max-width: 480px) {
    .password-input-wrapper .password-control {
        padding-right: 104px;
    }

    .password-toggle-btn {
        min-width: 78px;
        height: 34px;
        right: 8px;
        font-size: 0.72rem;
        gap: 5px;
    }
}
