:root {
    --navy: #06265d;
    --navy-dark: #041f50;
    --blue: #0786f5;
    --green: #06b98a;
    --text: #38557d;
    --line: #cfdbeb;
    --surface: #ffffff;
    --surface-soft: #f7faff;
    --danger: #c92828;
    --radius: 10px;
    --shadow: 0 20px 60px rgba(13, 45, 90, .11);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    color: var(--navy);
    background: #f8fbff;
    font-family: Inter, Arial, sans-serif;
}

    body::before,
    body::after {
        position: fixed;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        content: "";
    }

    body::before {
        background: radial-gradient(circle at 10% 5%, rgba(203, 215, 230, .65) 0 5px, transparent 6px), radial-gradient(circle at 86% 8%, rgba(203, 215, 230, .65) 0 5px, transparent 6px), linear-gradient(135deg, transparent 49.7%, rgba(190, 205, 223, .28) 50%, transparent 50.3%);
        background-size: 170px 135px, 230px 175px, 190px 150px;
    }

    body::after {
        background: linear-gradient(90deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .2), rgba(255, 255, 255, .7));
    }

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    display: grid;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(12px, 2.5vh, 24px) 16px;
    place-items: center;
}

.access-card {
    position: relative;
    width: min(585px, 100%);
    overflow: hidden;
    border: 1px solid #cbd8e9;
    border-radius: 16px;
    background: rgba(255, 255, 255, .97);
    box-shadow: var(--shadow);
}

.gradient-line {
    height: 7px;
    background: linear-gradient(90deg, var(--blue), #008dcb 45%, var(--green));
}

.site-header {
    display: flex;
    height: 68px;
    padding: 0 25px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .4px;
    text-decoration: none;
}

.brand-mark {
    width: 36px;
    height: 32px;
}

.content {
    padding: clamp(16px, 2.5vh, 22px) 34px;
}

/* Dil seçimi */
.language-picker {
    position: relative;
}

.language {
    display: flex;
    height: 40px;
    padding: 0 12px;
    align-items: center;
    gap: 8px;
    border: 1px solid #d3deed;
    border-radius: 9px;
    color: var(--navy);
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}

    .language:hover,
    .language:focus-visible {
        border-color: #82a9d5;
        outline: 0;
        box-shadow: 0 0 0 3px rgba(8, 134, 245, .1);
    }

    .language .globe,
    .language .chevron {
        flex: 0 0 auto;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .language .globe {
        width: 21px;
        height: 21px;
        stroke-width: 1.8;
    }

    .language .chevron {
        width: 15px;
        height: 15px;
        stroke-width: 2;
    }

.language-code {
    line-height: 1;
}

.language-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 7px);
    right: 0;
    width: 158px;
    padding: 6px;
    border: 1px solid #cbd8e9;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(6, 38, 93, .18);
}

    .language-menu[hidden] {
        display: none;
    }

    .language-menu button {
        display: flex;
        width: 100%;
        height: 35px;
        padding: 0 9px;
        align-items: center;
        gap: 10px;
        border: 0;
        border-radius: 7px;
        color: var(--navy);
        background: transparent;
        font-size: 13px;
        text-align: left;
        cursor: pointer;
    }

        .language-menu button:hover,
        .language-menu button:focus-visible {
            outline: 0;
            background: #eef6ff;
        }

        .language-menu button.selected {
            color: #087b61;
            background: #e9f8f4;
            font-weight: 700;
        }

        .language-menu button span {
            width: 24px;
            color: #607895;
            font-size: 10px;
            font-weight: 800;
        }

html[dir="rtl"] .language-menu {
    right: auto;
    left: 0;
}

    html[dir="rtl"] .language-menu button {
        text-align: right;
    }

/* Başlık alanı */
.hero,
.mikrotik-login-view,
.success-view {
    margin-bottom: 12px;
    text-align: center;
}

.company-logo {
    display: flex;
    width: min(216px, 100%);
    aspect-ratio: 30 / 11;
    margin: 0 auto 10px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}

    .company-logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.company-symbol {
    display: none;
}

.eyebrow {
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

.hero h1,
.sub-title,
.success-view h1,
.mikrotik-login-view h1 {
    margin: 10px 0 7px;
    font-size: clamp(26px, 4vw, 32px);
    line-height: 1.1;
    letter-spacing: -1.1px;
}

.hero p,
.sub-copy,
.success-view p,
.mikrotik-login-view .muted {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.4;
}

.sub-title,
.sub-copy {
    text-align: center;
}

.sub-copy {
    max-width: 490px;
    margin: 0 auto 16px;
}

.network {
    display: flex;
    margin: 10px 0 12px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
}

.wifi {
    color: var(--green);
    font-size: 25px;
    transform: rotate(-35deg);
}

/* Giriş seçenekleri */
.login-options {
    display: grid;
    gap: 8px;
}

.login-option-form {
    width: 100%;
    margin: 0;
}

.login-button {
    display: grid;
    width: 100%;
    height: 50px;
    padding: 0 17px;
    grid-template-columns: 45px 1fr 18px;
    align-items: center;
    border: 1px solid #d0dced;
    border-radius: 10px;
    color: var(--navy);
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

    .login-button:hover,
    .login-button:focus-visible {
        border-color: #79a9df;
        outline: 0;
        box-shadow: 0 6px 16px rgba(8, 49, 104, .1);
        transform: translateY(-1px);
    }

    .login-button.primary {
        border-color: var(--navy);
        color: #fff;
        background: linear-gradient(100deg, var(--navy-dark), #083477);
        box-shadow: inset 4px 0 #08aaf3;
    }

    .login-button b {
        font-size: 28px;
        font-weight: 300;
        text-align: right;
    }

    .login-button .method-icon {
        display: grid;
        width: 29px;
        height: 29px;
        margin: 0;
        place-items: center;
        flex: none;
        border-radius: 8px;
        font-size: 20px;
        font-weight: 800;
    }

    .login-button .facebook {
        border-radius: 50%;
        color: #fff;
        background: #1688ee;
    }

    .login-button .google {
        color: #1688ee;
    }

    .login-button .identity {
        color: #e31616;
    }

    .login-button .apple {
        color: #000;
    }

    .login-button .sms {
        border: 2px solid currentColor;
        background: transparent;
        font-size: 0;
    }

        .login-button .sms::after {
            width: 6px;
            height: 6px;
            border-bottom: 2px solid currentColor;
            border-left: 2px solid currentColor;
            content: "";
            transform: translate(-7px, 13px) skew(-20deg);
        }

/* Formlar */
.access-form {
    width: 100%;
    max-width: 505px;
    margin: 16px auto 0;
}

    .access-form label {
        display: block;
        margin: 10px 0 5px;
        color: var(--text);
        font-size: 13px;
        font-weight: 600;
    }

    .access-form input {
        width: 100%;
        height: 46px;
        padding: 0 14px;
        border: 1px solid #d0dced;
        border-radius: 10px;
        outline: none;
        color: var(--navy);
        background: #fff;
        font-size: 16px;
        font-weight: 500;
        transition: border-color .2s, box-shadow .2s;
    }

        .access-form input:focus,
        .phone-field:focus-within {
            border-color: #1688ee;
            box-shadow: 0 0 0 3px rgba(22, 136, 238, .1);
        }

.phone-field {
    display: flex;
    overflow: hidden;
    border: 1px solid #d0dced;
    border-radius: 10px;
    transition: border-color .2s, box-shadow .2s;
}

    .phone-field span {
        display: grid;
        padding: 0 14px;
        place-items: center;
        color: var(--text);
        background: #f1f5fa;
        font-size: 13px;
        font-weight: 600;
    }

    .phone-field input {
        border: 0;
        border-radius: 0;
        box-shadow: none !important;
    }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.submit-button,
.primary-button {
    display: flex;
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    padding: 10px 17px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(100deg, var(--navy-dark), #083477);
    box-shadow: 0 6px 15px rgba(4, 38, 91, .15);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

    .submit-button:hover,
    .primary-button:hover {
        filter: brightness(1.08);
    }

    .submit-button b {
        font-size: 28px;
        font-weight: 300;
    }

.back-link {
    display: block;
    margin-top: 12px;
    color: #46688f;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.validation,
.validation-summary,
.field-validation {
    display: block;
    margin-top: 5px;
    color: var(--danger);
    font-size: 12px;
}

.validation-summary,
.field-validation {
    margin-bottom: 8px;
}

    .validation-summary:empty,
    .field-validation:empty {
        display: none;
    }

.input-validation-error {
    border-color: #d83a3a !important;
}

.code-input {
    font-size: 21px !important;
    letter-spacing: 7px;
    text-align: center;
}

/* Güvenlik ve powered by alanı */
.security-footer {
    margin-top: 12px;
}

.secure-note {
    padding-bottom: 8px;
    color: var(--text);
    font-size: 12px;
    text-align: center;
}

.lock-icon {
    margin-right: 5px;
    color: var(--green);
    font-size: 17px;
}

.trust-row {
    display: flex;
    padding-top: 8px;
    align-items: center;
    justify-content: space-around;
    border-top: 1px solid #d8e1ed;
    color: var(--text);
    font-size: 11px;
}

    .trust-row span {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .trust-row i {
        height: 21px;
        border-left: 1px solid #d8e1ed;
    }

.footer,
.site-footer {
    position: static;
    width: 100%;
    padding: 8px 16px 10px;
    border-top: 1px solid rgba(207, 219, 235, .75);
    color: #71849e;
    background: rgba(247, 250, 255, .72);
    font-size: 10px;
    line-height: 1.35;
    text-align: center;
}

    .footer a,
    .site-footer a {
        color: #536d8e;
        text-decoration: none;
    }

        .footer a:hover,
        .footer a:focus-visible,
        .site-footer a:hover,
        .site-footer a:focus-visible {
            color: var(--navy);
            text-decoration: underline;
        }

    .footer .brand,
    .site-footer .brand {
        display: inline;
        font-size: inherit;
        letter-spacing: 0;
    }

/* Sosyal giriş ve sonuç ekranları */
.social-panel {
    max-width: 505px;
    margin: 16px auto;
    padding: 18px;
    border: 1px solid #d8e2ef;
    border-radius: 14px;
    background: var(--surface-soft);
    text-align: center;
}

.social-large {
    display: grid;
    width: 62px;
    height: 62px;
    margin: auto;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #111;
    font-size: 42px;
    font-weight: 800;
}

.social-panel.facebook .social-large {
    background: #1688ee;
}

.social-panel.google .social-large {
    border: 1px solid #dae2ed;
    color: #1688ee;
    background: #fff;
}

.social-panel p {
    color: var(--text);
    font-size: 15px;
    line-height: 1.45;
}

.success-view {
    padding: 45px 20px;
}

.success-icon,
.error-icon,
.verification-success-icon {
    display: grid;
    margin: 0 auto 16px;
    place-items: center;
    border-radius: 50%;
}

.success-icon,
.error-icon {
    width: 75px;
    height: 75px;
    color: var(--green);
    background: #e4faf4;
    font-size: 44px;
}

.error-icon {
    color: #d32f2f;
    background: #fff0f0;
}

.success-view .submit-button {
    max-width: 385px;
    margin: 24px auto 0;
}

.mikrotik-login-view {
    max-width: 505px;
    margin: 0 auto;
}

.verification-success-icon {
    width: 62px;
    height: 62px;
    margin-top: 14px;
    border: 1px solid #bcebdd;
    background: linear-gradient(145deg, #e2faf3, #f5fffc);
    box-shadow: 0 8px 22px rgba(6, 185, 138, .14);
}

    .verification-success-icon svg {
        width: 34px;
        height: 34px;
        fill: none;
        stroke: var(--green);
        stroke-width: 2.4;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.connection-progress {
    display: flex;
    min-height: 60px;
    margin: 17px auto 0;
    padding: 10px 16px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid #d5e2ef;
    border-radius: 11px;
    color: var(--text);
    background: var(--surface-soft);
    font-size: 13px;
    font-weight: 600;
}

.spinner {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    border: 3px solid #d6e3ef;
    border-top-color: var(--green);
    border-right-color: var(--blue);
    border-radius: 50%;
    animation: antreta-spin .8s linear infinite;
}

.manual-login-button {
    margin: 12px auto 0;
    border: 0;
    color: #315c8c;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

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

/* Radyo ile giriş yöntemi seçimi */
.method-list {
    display: flex;
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    flex-direction: column;
    gap: 8px;
}

.method-item {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 58px;
    padding: 8px 12px;
    align-items: center;
    border: 1px solid #e1e5ea;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, background-color .2s, box-shadow .2s, transform .2s;
}

    .method-item:hover {
        border-color: #2563eb;
        background: #f8faff;
        box-shadow: 0 4px 12px rgba(37, 99, 235, .1);
        transform: translateY(-1px);
    }

    .method-item:has(input:checked) {
        border-color: #2563eb;
        background: #eff6ff;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, .12);
    }

    .method-item:has(input:focus-visible) {
        outline: 3px solid rgba(37, 99, 235, .25);
        outline-offset: 2px;
    }

    .method-item > input[type="radio"] {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        padding: 0;
        opacity: 0;
        pointer-events: none;
    }

    .method-item .method-icon {
        display: inline-flex;
        width: 36px;
        height: 36px;
        margin-right: 10px;
        flex: 0 0 36px;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
    }

        .method-item .method-icon.sms {
            color: #fff;
            background: #16a34a;
        }

        .method-item .method-icon.identity {
            color: #fff;
            background: #dc2626;
        }

        .method-item .method-icon.google {
            border: 1px solid #e1e5ea;
            color: #4285f4;
            background: #fff;
        }

        .method-item .method-icon.facebook {
            color: #fff;
            background: #1877f2;
        }

        .method-item .method-icon.apple {
            color: #fff;
            background: #111;
        }

.method-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

    .method-copy strong {
        color: #172033;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.25;
    }

    .method-copy small {
        overflow: hidden;
        color: #6b7280;
        font-size: 11px;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.method-item .arrow {
    margin-left: 10px;
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    transition: color .2s, transform .2s;
}

.method-item:hover .arrow,
.method-item:has(input:checked) .arrow {
    color: #2563eb;
    transform: translateX(2px);
}

.login-method-form {
    width: 100%;
}

/* Tablet ve telefon */
@media (max-width: 650px) {
    body {
        background: #fff;
    }

        body::before,
        body::after {
            display: none;
        }

    .page-shell {
        display: block;
        min-height: 100dvh;
        padding: 0;
    }

    .access-card {
        display: flex;
        width: 100%;
        min-height: 100dvh;
        flex-direction: column;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .gradient-line {
        height: 5px;
        flex: 0 0 5px;
    }

    .site-header {
        height: 54px;
        padding: 0 14px;
        flex: 0 0 54px;
    }

    .brand {
        font-size: 17px;
    }

    .brand-mark {
        width: 29px;
        height: 26px;
    }

    .language {
        height: 34px;
        padding: 0 9px;
        gap: 5px;
        font-size: 13px;
    }

        .language .globe {
            width: 18px;
            height: 18px;
        }

        .language .chevron {
            width: 13px;
            height: 13px;
        }

    .content {
        display: flex;
        padding: 10px 14px 8px;
        flex: 1 0 auto;
        flex-direction: column;
    }

    .company-logo {
        width: min(205px, 65vw);
        margin-bottom: 7px;
    }

    .eyebrow {
        font-size: 11px;
    }

    .hero h1,
    .sub-title,
    .success-view h1,
    .mikrotik-login-view h1 {
        margin: 6px 0 4px;
        font-size: clamp(21px, 6.5vw, 25px);
        letter-spacing: -.7px;
    }

    .hero p,
    .sub-copy,
    .success-view p,
    .mikrotik-login-view .muted {
        font-size: 12px;
        line-height: 1.35;
    }

    .sub-copy {
        margin-bottom: 8px;
    }

    .network {
        margin: 6px 0 8px;
        gap: 7px;
        font-size: 13px;
    }

    .wifi {
        font-size: 20px;
    }

    .login-options,
    .method-list {
        gap: 6px;
    }

    .login-button {
        height: 46px;
        padding: 0 13px;
        grid-template-columns: 40px 1fr 16px;
        border-radius: 9px;
        font-size: 14px;
    }

        .login-button b {
            font-size: 25px;
        }

        .login-button .method-icon {
            width: 27px;
            height: 27px;
            font-size: 18px;
        }

    .access-form {
        margin-top: 8px;
    }

        .access-form label {
            margin: 6px 0 3px;
            font-size: 11px;
        }

        input,
        select,
        textarea,
        .access-form input,
        .phone-field input {
            font-size: 16px !important;
        }

        .access-form input {
            height: 40px;
        }

    .phone-field span {
        padding: 0 10px;
        font-size: 12px;
    }

    .form-grid {
        gap: 7px;
    }

    .submit-button,
    .primary-button {
        min-height: 44px;
        margin-top: 9px;
        padding: 8px 13px;
        font-size: 14px;
    }

    .back-link {
        margin-top: 8px;
        font-size: 11px;
    }

    .method-item {
        min-height: 52px;
        padding: 6px 10px;
    }

        .method-item .method-icon {
            width: 34px;
            height: 34px;
            margin-right: 9px;
            flex-basis: 34px;
            font-size: 17px;
        }

    .method-copy strong {
        font-size: 13px;
    }

    .method-copy small {
        font-size: 10px;
        white-space: normal;
    }

    .security-footer {
        margin-top: auto;
        padding-top: 7px;
    }

    .secure-note {
        padding-bottom: 5px;
        font-size: 10px;
    }

    .trust-row {
        padding-top: 5px;
        font-size: 9px;
    }

        .trust-row span {
            gap: 3px;
        }

        .trust-row i {
            height: 16px;
        }

    .footer,
    .site-footer {
        margin-top: auto;
        padding: 6px 8px 7px;
        flex: 0 0 auto;
        font-size: 8px;
    }

    .social-panel {
        width: 100%;
        margin: 9px auto;
        padding: 12px;
    }

    .social-large {
        width: 44px;
        height: 44px;
        font-size: 29px;
    }

    .social-panel p {
        font-size: 12px;
    }

    .success-view {
        padding: 28px 4px;
    }

    .success-icon,
    .error-icon {
        width: 58px;
        height: 58px;
        font-size: 34px;
    }

    .mikrotik-login-view {
        display: flex;
        min-height: 0;
        flex: 1;
        flex-direction: column;
        justify-content: center;
    }

    .verification-success-icon {
        width: 54px;
        height: 54px;
        margin-top: 9px;
    }

        .verification-success-icon svg {
            width: 29px;
            height: 29px;
        }

    .connection-progress {
        width: 100%;
        min-height: 52px;
        margin-top: 12px;
        padding: 8px;
        font-size: 12px;
    }

    .spinner {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
    }
}

/* Çok kısa ekranlarda dikey alanı korur. */
@media (max-height: 760px) and (min-width: 651px) {
    .page-shell {
        padding-block: 8px;
    }

    .site-header {
        height: 60px;
    }

    .content {
        padding-block: 13px;
    }

    .company-logo {
        width: 190px;
        margin-bottom: 6px;
    }

    .hero h1 {
        margin-block: 6px 4px;
        font-size: 27px;
    }

    .network {
        margin-block: 6px 8px;
    }

    .login-button {
        height: 46px;
    }

    .security-footer {
        margin-top: 8px;
    }
}

@media (max-width: 650px) and (max-height: 700px) {
    .site-header {
        height: 49px;
        flex-basis: 49px;
    }

    .content {
        padding-top: 7px;
    }

    .company-logo {
        width: min(175px, 58vw);
        margin-bottom: 4px;
    }

    .hero h1 {
        font-size: 20px;
    }

    .login-button {
        height: 42px;
    }

    .method-item {
        min-height: 48px;
    }

    .secure-note {
        display: none;
    }
}

@media (max-width: 390px) {
    .content {
        padding-inline: 11px;
    }

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

    .login-button {
        padding-inline: 11px;
        grid-template-columns: 37px 1fr 14px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}