/* ==================================================
   DESIGN SYSTEM
================================================== */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-active: #3730a3;
    --primary-soft: #eef2ff;

    --background: #f8fafc;
    --surface: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #94a3b8;

    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #818cf8;

    --success: #16a34a;
    --success-soft: #f0fdf4;

    --warning: #f59e0b;
    --warning-soft: #fffbeb;

    --danger: #dc2626;
    --danger-soft: #fef2f2;

    --radius-small: 10px;
    --radius-medium: 14px;
    --radius-large: 24px;

    --transition: 180ms ease;

    --shadow-soft:
        0 20px 50px rgba(15, 23, 42, 0.07);

    --shadow-modal:
        0 30px 80px rgba(15, 23, 42, 0.18);
}


/* ==================================================
   RESET
================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    font-size: 16px;
}


body {
    min-height: 100vh;

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text-primary);

    -webkit-font-smoothing: antialiased;
}


body.modal-open {
    overflow: hidden;
}


button,
input,
select {
    font: inherit;
}


button,
select {
    cursor: pointer;
}


button {
    -webkit-tap-highlight-color: transparent;
}


a {
    color: inherit;
    text-decoration: none;
}


input,
button,
select {
    outline: none;
}


/* ==================================================
   ACCESSIBILITY
================================================== */

.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


button:focus-visible,
a:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.25);
    outline-offset: 3px;
}


/* ==================================================
   PAGE LAYOUT
================================================== */

.auth-page {
    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(360px, 0.9fr)
        minmax(520px, 1.1fr);
}


/* ==================================================
   BRAND SIDE
================================================== */

.auth-brand {
    position: relative;

    min-height: 100vh;

    padding: 48px 56px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    overflow: hidden;

    color: #ffffff;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(255, 255, 255, 0.13),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(129, 140, 248, 0.45),
            transparent 40%
        ),
        linear-gradient(
            145deg,
            #312e81 0%,
            #4338ca 50%,
            #4f46e5 100%
        );
}


.auth-brand::after {
    content: "";

    position: absolute;

    width: 320px;
    height: 320px;

    top: 42%;
    right: -130px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);
}


/* ==================================================
   LOGO
================================================== */

.brand-logo {
    position: relative;

    z-index: 2;

    display: inline-flex;
    align-items: center;

    width: fit-content;

    font-size: 1.5rem;
    font-weight: 700;

    letter-spacing: -0.04em;
}


.brand-logo span {
    color: #a5b4fc;
}


/* ==================================================
   BRAND CONTENT
================================================== */

.brand-content {
    position: relative;

    z-index: 2;

    max-width: 520px;
}


.brand-label {
    display: inline-flex;

    margin-bottom: 24px;

    padding: 8px 13px;

    border:
        1px solid
        rgba(255, 255, 255, 0.2);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.08);

    font-size: 0.78rem;
    font-weight: 600;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


.brand-content h1 {
    margin-bottom: 24px;

    font-size:
        clamp(
            2.4rem,
            4vw,
            4.2rem
        );

    line-height: 1.04;

    letter-spacing: -0.055em;
}


.brand-content p {
    max-width: 460px;

    color:
        rgba(255, 255, 255, 0.74);

    font-size: 1rem;

    line-height: 1.75;
}


.brand-footer {
    position: relative;

    z-index: 2;

    color:
        rgba(255, 255, 255, 0.55);

    font-size: 0.8rem;
}


/* ==================================================
   AUTH AREA
================================================== */

.auth-main {
    position: relative;

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 80px 48px;
}


.auth-container {
    width: 100%;
    max-width: 460px;
}


.mobile-header {
    display: none;
}


/* ==================================================
   LANGUAGE
================================================== */

.language-wrapper {
    position: absolute;

    top: 32px;
    right: 36px;
}


.language-select {
    min-width: 72px;

    padding:
        9px
        30px
        9px
        13px;

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    background: var(--surface);

    color: var(--text-primary);

    font-size: 0.82rem;
    font-weight: 600;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}


.language-select:hover {
    border-color: var(--border-hover);
}


.language-select:focus {
    border-color: var(--border-focus);

    box-shadow:
        0 0 0 3px
        rgba(79, 70, 229, 0.1);
}


/* ==================================================
   HEADING
================================================== */

.auth-heading {
    margin-bottom: 30px;
}


.auth-heading h2 {
    margin-bottom: 10px;

    font-size: 2rem;
    font-weight: 700;

    letter-spacing: -0.045em;
}


.auth-heading p {
    color: var(--text-secondary);

    font-size: 0.94rem;

    line-height: 1.65;
}


/* ==================================================
   TABS
================================================== */

.auth-tabs {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 6px;

    margin-bottom: 28px;

    padding: 5px;

    border-radius: 12px;

    background: #eef2f7;
}


.auth-tab {
    min-height: 42px;

    padding: 8px 16px;

    border: 0;

    border-radius: 9px;

    background: transparent;

    color: var(--text-secondary);

    font-size: 0.86rem;
    font-weight: 600;

    transition:
        background var(--transition),
        color var(--transition),
        box-shadow var(--transition);
}


.auth-tab:hover {
    color: var(--text-primary);
}


.auth-tab.active {
    background: var(--surface);

    color: var(--text-primary);

    box-shadow:
        0 2px 7px
        rgba(15, 23, 42, 0.08);
}


/* ==================================================
   PANELS
================================================== */

.auth-panel {
    animation:
        panelFade
        180ms ease;
}


.auth-panel[hidden] {
    display: none;
}


@keyframes panelFade {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==================================================
   GOOGLE BUTTON
================================================== */

.google-button {
    width: 100%;
    min-height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 11px;

    padding: 11px 16px;

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    background: var(--surface);

    color: var(--text-primary);

    font-size: 0.9rem;
    font-weight: 600;

    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}


.google-button:hover {
    border-color: var(--border-hover);

    background: #f8fafc;

    box-shadow:
        0 4px 12px
        rgba(15, 23, 42, 0.04);
}


.google-icon {
    width: 20px;
    height: 20px;

    flex-shrink: 0;
}


/* ==================================================
   DIVIDER
================================================== */

.divider {
    display: flex;
    align-items: center;

    gap: 14px;

    margin: 24px 0;

    color: var(--text-light);

    font-size: 0.78rem;
}


.divider::before,
.divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: var(--border);
}


/* ==================================================
   FORM
================================================== */

.auth-form {
    display: flex;
    flex-direction: column;

    gap: 20px;
}


.form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;
}


.form-group {
    display: flex;
    flex-direction: column;

    gap: 8px;
}


.form-group label,
.password-label label {
    color: var(--text-primary);

    font-size: 0.82rem;
    font-weight: 600;
}


.form-group input {
    width: 100%;
    min-height: 48px;

    padding: 11px 14px;

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    background: var(--surface);

    color: var(--text-primary);

    font-size: 0.9rem;

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}


.form-group input::placeholder {
    color: #a8b2c1;
}


.form-group input:hover {
    border-color: var(--border-hover);
}


.form-group input:focus {
    border-color: var(--border-focus);

    box-shadow:
        0 0 0 3px
        rgba(79, 70, 229, 0.1);
}


.form-group input.is-invalid {
    border-color: var(--danger);

    background: #fffafa;
}


.form-group input.is-invalid:focus {
    border-color: var(--danger);

    box-shadow:
        0 0 0 3px
        rgba(220, 38, 38, 0.09);
}


/* ==================================================
   PASSWORD
================================================== */

.password-label {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
}


.password-field {
    position: relative;
}


.password-field input {
    padding-right: 52px;
}


.password-toggle {
    position: absolute;

    top: 50%;
    right: 8px;

    transform: translateY(-50%);

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: var(--text-secondary);

    transition:
        color var(--transition),
        background var(--transition);
}


.password-toggle:hover {
    color: var(--primary);

    background: var(--primary-soft);
}


.password-toggle:focus-visible {
    outline: 2px solid var(--primary);

    outline-offset: 1px;
}


.eye-icon {
    display: block;

    width: 20px;
    height: 20px;

    pointer-events: none;
}


.eye-icon[hidden] {
    display: none;
}


/* ==================================================
   PASSWORD STRENGTH
================================================== */

.password-strength {
    display: flex;
    flex-direction: column;

    gap: 7px;

    margin-top: 2px;
}


.password-strength[hidden] {
    display: none;
}


.password-strength-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    color: var(--text-light);

    font-size: 0.7rem;

    line-height: 1.35;
}


.password-strength-header strong {
    font-size: 0.7rem;
    font-weight: 700;
}


/*
   BARIN GRİ ARKA PLANI
*/

.password-strength-bar {
    position: relative;

    width: 100%;
    height: 7px;

    overflow: hidden;

    border-radius: 999px;

    background: var(--border);
}


/*
   BARIN RENKLİ DOLGUSU
*/

.password-strength-bar::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 0;
    height: 100%;

    border-radius: inherit;

    background: var(--border);

    transition:
        width var(--transition),
        background var(--transition);
}


/*
   Eski üç segment artık kullanılmıyor.
*/

.password-strength-segment {
    display: none;
}


/* -----------------------------
   ZAYIF
----------------------------- */

.password-strength[data-strength="weak"]
.password-strength-header strong {
    color: var(--danger);
}


.password-strength[data-strength="weak"]
.password-strength-bar::before {
    width: 33.333%;

    background: var(--danger);
}


/* -----------------------------
   ORTA
----------------------------- */

.password-strength[data-strength="medium"]
.password-strength-header strong {
    color: var(--warning);
}


.password-strength[data-strength="medium"]
.password-strength-bar::before {
    width: 66.666%;

    background: var(--warning);
}


/* -----------------------------
   GÜÇLÜ
----------------------------- */

.password-strength[data-strength="strong"]
.password-strength-header strong {
    color: var(--success);
}


.password-strength[data-strength="strong"]
.password-strength-bar::before {
    width: 100%;

    background: var(--success);
}


/* ==================================================
   FORGOT PASSWORD BUTTON
================================================== */

.forgot-link {
    padding: 2px 0;

    border: 0;

    background: transparent;

    color: var(--primary);

    font-size: 0.77rem;
    font-weight: 600;
}


.forgot-link:hover {
    text-decoration: underline;
}


/* ==================================================
   HELPER / ERROR
================================================== */

.field-helper {
    color: var(--text-light);

    font-size: 0.72rem;

    line-height: 1.5;
}


.field-error {
    color: var(--danger);

    font-size: 0.72rem;
    font-weight: 500;

    line-height: 1.45;
}


.field-error[hidden] {
    display: none;
}


/* ==================================================
   FORM MESSAGES
================================================== */

.form-message {
    margin-bottom: 20px;

    padding: 12px 14px;

    border-radius: var(--radius-small);

    font-size: 0.78rem;

    line-height: 1.55;
}


.form-message[hidden] {
    display: none;
}


.form-message.error {
    border: 1px solid #fecaca;

    background: var(--danger-soft);

    color: #991b1b;
}


.form-message.success {
    border: 1px solid #bbf7d0;

    background: var(--success-soft);

    color: #166534;
}


.form-message.info {
    border: 1px solid #c7d2fe;

    background: var(--primary-soft);

    color: #4338ca;
}


/* ==================================================
   CHECKBOX
================================================== */

.checkbox-row {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    cursor: pointer;

    color: var(--text-secondary);

    font-size: 0.76rem;

    line-height: 1.55;
}


.checkbox-row input {
    width: 17px;
    height: 17px;

    flex-shrink: 0;

    margin-top: 2px;

    accent-color: var(--primary);
}


/* ==================================================
   PRIMARY BUTTON
================================================== */

.primary-button {
    width: 100%;
    min-height: 49px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    padding: 12px 18px;

    border: 0;

    border-radius: var(--radius-small);

    background: var(--primary);

    color: #ffffff;

    font-size: 0.9rem;
    font-weight: 600;

    box-shadow:
        0 8px 20px
        rgba(79, 70, 229, 0.18);

    transition:
        background var(--transition),
        transform var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);
}


.primary-button:hover:not(:disabled) {
    background: var(--primary-hover);

    box-shadow:
        0 10px 24px
        rgba(79, 70, 229, 0.23);
}


.primary-button:active:not(:disabled) {
    transform: translateY(1px);

    background: var(--primary-active);
}


.primary-button:disabled {
    cursor: not-allowed;

    opacity: 0.7;
}


/* ==================================================
   LOADING SPINNER
================================================== */

.button-spinner {
    width: 17px;
    height: 17px;

    border:
        2px solid
        rgba(255, 255, 255, 0.4);

    border-top-color: #ffffff;

    border-radius: 50%;

    animation:
        buttonSpin
        700ms linear infinite;
}


.button-spinner[hidden] {
    display: none;
}


@keyframes buttonSpin {
    to {
        transform: rotate(360deg);
    }
}


/* ==================================================
   APPROVAL NOTICE
================================================== */

.approval-note {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    padding: 13px 14px;

    border: 1px solid #dfe4ff;

    border-radius: var(--radius-small);

    background: var(--primary-soft);

    color: #4c51a5;
}


.approval-icon {
    width: 19px;
    height: 19px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary);

    color: #ffffff;

    font-size: 0.65rem;
    font-weight: 700;
}


.approval-note p {
    font-size: 0.74rem;

    line-height: 1.55;
}


/* ==================================================
   REGISTRATION SUCCESS
================================================== */

.registration-success {
    text-align: center;

    animation:
        panelFade
        220ms ease;
}


.registration-success[hidden] {
    display: none;
}


.success-icon {
    width: 66px;
    height: 66px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 22px;

    border-radius: 50%;

    background: var(--success-soft);

    color: var(--success);
}


.success-icon svg {
    width: 30px;
    height: 30px;
}


.registration-success h2 {
    margin-bottom: 12px;

    font-size: 1.8rem;

    letter-spacing: -0.04em;
}


.registration-success > p {
    color: var(--text-secondary);

    font-size: 0.9rem;

    line-height: 1.7;
}


.pending-status {
    display: inline-flex;
    align-items: center;

    gap: 9px;

    margin: 24px 0;

    padding: 10px 14px;

    border: 1px solid #fde68a;

    border-radius: 999px;

    background: var(--warning-soft);

    color: #92400e;

    font-size: 0.77rem;
    font-weight: 600;
}


.status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--warning);
}


.secondary-button {
    width: 100%;
    min-height: 47px;

    padding: 11px 16px;

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    background: var(--surface);

    color: var(--text-primary);

    font-size: 0.85rem;
    font-weight: 600;

    transition:
        border-color var(--transition),
        background var(--transition);
}


.secondary-button:hover {
    border-color: var(--border-hover);

    background: #f8fafc;
}


/* ==================================================
   FORGOT PASSWORD MODAL
================================================== */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(15, 23, 42, 0.48);

    backdrop-filter: blur(4px);

    animation:
        modalOverlayIn
        180ms ease;
}


.modal-overlay[hidden] {
    display: none;
}


@keyframes modalOverlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.modal-card {
    position: relative;

    width: 100%;
    max-width: 430px;

    padding: 34px;

    border: 1px solid var(--border);

    border-radius: 20px;

    background: var(--surface);

    box-shadow: var(--shadow-modal);

    animation:
        modalCardIn
        200ms ease;
}


@keyframes modalCardIn {
    from {
        opacity: 0;

        transform:
            translateY(8px)
            scale(0.985);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


.modal-close {
    position: absolute;

    top: 16px;
    right: 16px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: var(--text-secondary);

    transition:
        color var(--transition),
        background var(--transition);
}


.modal-close:hover {
    color: var(--text-primary);

    background: #f1f5f9;
}


.modal-close svg {
    width: 19px;
    height: 19px;
}


.modal-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 12px;

    background: var(--primary-soft);

    color: var(--primary);
}


.modal-icon svg {
    width: 23px;
    height: 23px;
}


.modal-card h2 {
    margin-bottom: 10px;

    padding-right: 35px;

    font-size: 1.45rem;

    letter-spacing: -0.035em;
}


.modal-description {
    margin-bottom: 24px;

    color: var(--text-secondary);

    font-size: 0.85rem;

    line-height: 1.65;
}


.modal-back-button {
    display: block;

    margin: 18px auto 0;

    padding: 5px 8px;

    border: 0;

    background: transparent;

    color: var(--text-secondary);

    font-size: 0.78rem;
    font-weight: 600;
}


.modal-back-button:hover {
    color: var(--primary);
}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 1000px) {

    .auth-page {
        grid-template-columns:
            minmax(300px, 0.7fr)
            minmax(470px, 1.3fr);
    }


    .auth-brand {
        padding: 42px 36px;
    }


    .brand-content h1 {
        font-size: 2.7rem;
    }


    .auth-main {
        padding: 80px 36px;
    }
}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 800px) {

    body {
        background: var(--surface);
    }


    .auth-page {
        display: block;
    }


    .auth-brand {
        display: none;
    }


    .auth-main {
        min-height: 100vh;

        display: block;

        padding:
            24px
            22px
            50px;
    }


    .mobile-header {
        display: flex;
        align-items: center;

        min-height: 45px;

        margin-bottom: 45px;
    }


    .mobile-logo {
        color: var(--text-primary);
    }


    .mobile-logo span {
        color: var(--primary);
    }


    .language-wrapper {
        top: 24px;
        right: 22px;
    }


    .auth-container {
        max-width: 520px;

        margin: 0 auto;
    }


    .auth-heading h2 {
        font-size: 1.8rem;
    }
}


/* ==================================================
   SMALL MOBILE
================================================== */

@media (max-width: 520px) {

    .auth-main {
        padding:
            20px
            18px
            40px;
    }


    .language-wrapper {
        top: 20px;
        right: 18px;
    }


    .mobile-header {
        margin-bottom: 35px;
    }


    .form-row {
        grid-template-columns: 1fr;
    }


    .auth-heading {
        margin-bottom: 24px;
    }


    .auth-tabs {
        margin-bottom: 24px;
    }


    .modal-overlay {
        align-items: flex-end;

        padding: 0;
    }


    .modal-card {
        max-width: none;

        padding:
            30px
            20px
            24px;

        border-radius:
            20px
            20px
            0
            0;

        border-bottom: 0;
    }
}


/* ==================================================
   VERY SMALL DEVICES
================================================== */

@media (max-width: 360px) {

    html {
        font-size: 15px;
    }


    .auth-main {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* ==================================================
   REDUCED MOTION
================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}