@import url("/sysadmintmp/assets/css/icons.css");

/* Giriş ve kayıt. Renkler ve ikonlar yönetim paneliyle aynıdır. */
body:has(.auth-shell) {
    --auth-bg: #f2f4f6;
    --auth-surface: #ffffff;
    --auth-text: #1a1f28;
    --auth-text-secondary: #5c6573;
    --auth-muted: #8b95a5;
    --auth-label: #363d48;
    --auth-border: #dce1e6;
    --auth-link: #247f79;
    --auth-danger: #b42318;
    --auth-input: #ffffff;
    --auth-invalid: #fff8f7;
    background: var(--auth-bg);
    color: var(--auth-text);
}

html.dark-theme body:has(.auth-shell) {
    --auth-bg: #1a202c;
    --auth-surface: #232b38;
    --auth-text: #ffffff;
    --auth-text-secondary: #8b95a5;
    --auth-muted: #6b7689;
    --auth-label: #c2cad6;
    --auth-border: #3a4555;
    --auth-link: #9ad9d4;
    --auth-danger: #e08b86;
    --auth-input: #232b38;
    --auth-invalid: #3a2428;
    background: var(--auth-bg);
    color: var(--auth-text);
}

body:has(.auth-shell) header,
body:has(.auth-shell) aside:not(.auth-brand),
body:has(.auth-shell) footer,
body:has(.auth-shell) .footer-three,
body:has(.auth-shell) .scroll-to-top,
body:has(.auth-shell) .mean-container,
body:has(.auth-shell) .mean-bar,
body:has(.auth-shell) #modalOverlay {
    display: none !important;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(21.25rem, 38%) minmax(0, 1fr);
    align-content: start;
    font-family: Inter, "Segoe UI", sans-serif;
    font-size: 16px;
    color: var(--auth-text);
}

@media (min-width: 992px) {
    .auth-shell {
        font-size: clamp(16px, 0.95vw + 5.8px, 28px);
    }
}

.auth-brand {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2.5rem 2.75rem 2rem;
    color: #f4f7fb;
    background:
        radial-gradient(circle at 18% 12%, rgba(45, 157, 150, 0.28), transparent 34%),
        radial-gradient(circle at 88% 78%, rgba(45, 157, 150, 0.14), transparent 28%),
        linear-gradient(165deg, #1a1f28 0%, #1c2830 58%, #16332f 100%);
    overflow: hidden;
}

.auth-brand::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.auth-brand__logo {
    display: inline-flex;
    width: fit-content;
    position: relative;
    z-index: 1;
}

.auth-brand__logo img {
    height: 2.625rem;
    width: auto;
}

.auth-brand__copy {
    position: relative;
    z-index: 1;
    max-width: none;
    margin-top: auto;
    margin-bottom: auto;
}

.auth-brand__kicker {
    margin: 0 0 12px;
    color: #9ad9d4;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-brand h1 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 2.125rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.auth-brand__lead {
    margin: 0 0 28px;
    color: rgba(244, 247, 251, 0.78);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
}

.auth-points i {
    width: 2.125rem;
    height: 2.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.1);
    color: #9ad9d4;
    font-size: 1.125rem;
    line-height: 1;
    flex: 0 0 2.125rem;
}

.auth-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    padding: 1.75rem 1.75rem 3rem;
}

.auth-toolbar {
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin-bottom: 18px;
}

.auth-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-home,
.auth-lang__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.625rem;
    border: 1px solid var(--auth-border);
    background: transparent;
    color: var(--auth-text);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.auth-home:hover,
.auth-lang__btn:hover {
    background: var(--auth-surface);
    border-color: var(--auth-border);
    color: var(--auth-text);
}

#theme-toggle-button {
    width: 2.5rem;
    min-width: 2.5rem;
    padding: 0;
    justify-content: center;
}


.auth-home i,
.auth-lang__btn i,
#theme-toggle-button i {
    font-size: 1.25rem;
    line-height: 1;
}

.auth-lang .dropdown-toggle::after {
    display: none;
}

.auth-lang {
    position: relative;
}

.auth-lang__btn img {
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    object-fit: cover;
}

.auth-lang .dropdown-menu {
    min-width: 190px;
    margin-top: 6px;
    padding: 6px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: var(--auth-surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.auth-lang .dropdown-header {
    padding: 6px 10px 4px;
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-lang .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 8px 10px;
    color: var(--auth-text);
    font-size: 13.5px;
    font-weight: 600;
}

.auth-lang .dropdown-item img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-lang .dropdown-item:hover {
    background: var(--auth-bg);
    color: var(--auth-text);
}

.auth-card {
    width: min(100%, 28rem);
}

.auth-card--wide {
    width: min(100%, 40rem);
}

.auth-card__title {
    margin: 0 0 6px;
    color: var(--auth-text);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.auth-card__sub {
    margin: 0 0 26px;
    color: var(--auth-text-secondary);
    font-size: 0.90625rem;
}

.auth-shell .auth-field {
    margin-bottom: 14px;
}

.auth-shell .auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.auth-shell .auth-row .auth-field {
    margin-bottom: 0;
}

.auth-shell .auth-label {
    display: block;
    margin: 0 0 6px;
    color: var(--auth-label);
    font-size: 0.8125rem;
}

.auth-shell .auth-input {
    position: relative;
}

.auth-shell input:not([type="checkbox"]):not([type="hidden"]) {
    display: block;
    width: 100%;
    height: 3.125rem;
    margin: 0;
    padding: 0 1rem;
    border: 1px solid var(--auth-border);
    border-radius: 0.875rem;
    background: var(--auth-input);
    color: var(--auth-text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: normal;
    box-shadow: 0 1px 0 rgba(7, 25, 82, 0.02);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-shell input:not([type="checkbox"]):not([type="hidden"]):focus {
    outline: none;
    border-color: #2d9d96;
    box-shadow: 0 0 0 0.25rem rgba(45, 157, 150, 0.25);
}

.auth-shell input::placeholder {
    color: var(--auth-muted);
    font-weight: 400;
}

.auth-shell input.input-validation-error {
    border-color: var(--auth-danger);
    background: var(--auth-invalid);
}

.auth-shell .auth-input input {
    padding-right: 2.875rem;
}

.auth-shell .toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--auth-text-secondary);
    cursor: pointer;
    font-size: 0.9375rem;
}

.auth-shell .toggle-password:hover {
    color: var(--auth-text);
}

.auth-shell .auth-hint {
    display: block;
    margin-top: 5px;
    color: var(--auth-text-secondary);
    font-size: 0.75rem;
    line-height: 1.35;
}

.auth-shell .iti {
    display: block;
    width: 100%;
}

.auth-shell .iti input {
    width: 100%;
}

.auth-shell .field-error,
.auth-shell .field-validation-error,
.auth-shell label.error,
.auth-shell .text-danger {
    display: block;
    width: 100%;
    margin: 5px 0 0 !important;
    padding: 0 !important;
    color: var(--auth-danger) !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    font-family: inherit;
}

.auth-shell .field-error:empty,
.auth-shell .field-validation-valid:empty {
    display: none;
    margin: 0;
}

.auth-shell .field-validation-error > span,
.auth-shell .field-error > span,
.auth-shell label.error {
    display: inline;
    margin: 0 !important;
}

.auth-shell .validation-summary-valid,
.auth-shell .auth-summary:empty {
    display: none;
}

.auth-shell .validation-summary-errors {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--auth-invalid);
    color: var(--auth-danger);
    font-size: 0.8125rem;
}

.auth-shell .validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

.auth-shell .auth-forgot {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 18px;
}

.auth-shell .auth-forgot a {
    color: var(--auth-link);
    font-size: 0.8125rem;
    text-decoration: none;
}

.auth-shell .auth-forgot a:hover {
    text-decoration: underline;
}

.auth-shell .auth-checks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 4px 0 18px;
}

.auth-shell .auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-shell .auth-check__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-shell .auth-check input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    min-height: 1.125rem;
    margin: 2px 0 0;
    padding: 0;
    flex: 0 0 1.125rem;
    accent-color: #2d9d96;
    border-radius: 4px;
}

.auth-shell .auth-check label {
    margin: 0;
    color: var(--auth-label);
    font-size: 0.84375rem;
    font-weight: 500;
    line-height: 1.45;
    cursor: pointer;
}

.auth-shell .auth-check a {
    color: var(--auth-link);
    font-weight: 700;
    text-decoration: underline;
}

.auth-shell .auth-check input.is-invalid {
    outline: 2px solid var(--auth-danger);
    outline-offset: 1px;
}

.auth-shell .otp-field {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 4px 0 0;
}

.auth-shell .otp-field input {
    width: 3.125rem;
    flex: 0 0 3.125rem;
    height: 3.5rem;
    padding: 0;
    text-align: center;
    font-size: 1.375rem;
    font-weight: 700;
}

.auth-shell .otp-field + .field-error {
    text-align: center;
}

.auth-shell button.auth-submit {
    appearance: none;
    -webkit-appearance: none;
    display: block;
    width: 100%;
    height: 3.25rem;
    margin-top: 8px;
    padding: 0 1.125rem;
    border: 0;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, #2d9d96 0%, #247f79 100%);
    color: #fff !important;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}

.auth-shell button.auth-submit:hover {
    background: linear-gradient(135deg, #247f79 0%, #1a615d 100%);
    color: #fff !important;
}

.auth-shell .auth-resend {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--auth-link);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.4;
    cursor: pointer;
}

.auth-shell .auth-resend:hover:not(:disabled) {
    text-decoration: underline;
}

.auth-shell .auth-resend:disabled {
    color: var(--auth-muted);
    cursor: not-allowed;
    text-decoration: none;
}

.auth-shell .auth-switch {
    margin-top: 16px;
    text-align: center;
}

.auth-shell .auth-switch p {
    margin: 0;
    color: var(--auth-text-secondary);
    font-size: 0.875rem;
}

.auth-shell .auth-switch a {
    color: var(--auth-link);
    font-weight: 700;
    text-decoration: none;
}

.auth-shell .auth-switch a:hover {
    text-decoration: underline;
}

.gate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gate-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 6.75rem;
    padding: 1rem;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    background: var(--auth-surface);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.gate-card:hover {
    border-color: #2d9d96;
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(45, 157, 150, 0.12);
}

.gate-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    border-radius: 12px;
    background: #eef8f7;
    color: #247f79;
    font-size: 1.375rem;
}

.gate-card strong {
    display: block;
    margin-bottom: 4px;
    color: var(--auth-text);
    font-size: 0.9375rem;
    line-height: 1.3;
}

.gate-card__copy {
    min-width: 0;
}

.gate-card__copy span {
    display: block;
    color: var(--auth-text-secondary);
    font-size: 0.78125rem;
    font-weight: 500;
    line-height: 1.45;
}

.auth-logout {
    margin-top: 18px;
    text-align: center;
}

.auth-logout button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--auth-text-secondary);
    font-family: inherit;
    font-size: 0.84375rem;
    font-weight: 700;
    cursor: pointer;
}

.auth-logout button:hover {
    color: var(--auth-text);
}

.auth-contract-body {
    color: #1f2933;
    font-size: 14px;
    line-height: 1.65;
}

.auth-contract-body h1,
.auth-contract-body h2,
.auth-contract-body h3 {
    color: #0b1728;
    font-size: 1.05rem;
    margin: 1.15rem 0 0.5rem;
}

.auth-contract-body p,
.auth-contract-body li {
    margin-bottom: 0.6rem;
}

.auth-contract-body ul,
.auth-contract-body ol {
    padding-left: 1.2rem;
}

@media (min-width: 1100px) {
    .auth-shell {
        grid-template-columns: minmax(25rem, 42%) minmax(0, 1fr);
    }

    .auth-brand {
        padding: 3.25rem 3.5rem 2.75rem;
    }

    .auth-panel {
        padding: 2.5rem 5vw 4rem;
    }

    .auth-card {
        width: min(100%, 78%);
    }

    .auth-card--wide {
        width: min(100%, 92%);
    }
}

@media (min-width: 1600px) {
    .auth-shell {
        grid-template-columns: minmax(30rem, 44%) minmax(0, 1fr);
    }

    .auth-brand {
        padding: 3.5rem 4rem 3rem;
    }

    .auth-card {
        width: min(100%, 72%);
    }

    .auth-card--wide {
        width: min(100%, 88%);
    }
}

@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
        font-size: 16px;
    }

    .auth-brand {
        position: relative;
        height: auto;
        padding: 14px 20px;
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .auth-brand__copy,
    .auth-brand::after {
        display: none;
    }

    .auth-brand__logo img {
        height: 1.875rem;
    }

    .auth-panel {
        min-height: 0;
        justify-content: flex-start;
        padding: 18px 20px max(28px, env(safe-area-inset-bottom));
    }

    .auth-toolbar {
        margin-bottom: 16px;
        gap: 8px;
    }

    .auth-card,
    .auth-card--wide {
        width: 100%;
    }

    .auth-card__title {
        font-size: 1.625rem;
    }

    .auth-card__sub {
        margin-bottom: 20px;
        line-height: 1.45;
    }

    .auth-shell .auth-field {
        margin-bottom: 16px;
    }

    .auth-shell .auth-row,
    .gate-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 16px;
    }

    .auth-shell .auth-forgot {
        margin: 0 0 16px;
    }

    .auth-shell .auth-checks {
        gap: 14px;
        margin: 2px 0 16px;
    }

    .auth-shell input:not([type="checkbox"]):not([type="hidden"]) {
        height: 3.25rem;
        font-size: 1rem;
        border-radius: 1rem;
    }

    .auth-shell .otp-field {
        gap: 6px;
        justify-content: space-between;
    }

    .auth-shell .otp-field input {
        width: auto;
        flex: 1 1 0;
        max-width: 3.375rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }

    .auth-shell button.auth-submit {
        height: 3.375rem;
        margin-top: 10px;
        font-size: 1rem;
        border-radius: 1rem;
    }

    .auth-shell .auth-switch {
        margin-top: 18px;
    }
}

@media (max-width: 640px) {
    .auth-panel {
        padding-left: 16px;
        padding-right: 16px;
    }

    .auth-home {
        padding: 0 0.625rem;
    }

    .auth-home span,
    .auth-lang__btn span {
        display: none;
    }
}

html.dark-theme .auth-brand {
    background:
        radial-gradient(circle at 18% 12%, rgba(45, 157, 150, 0.22), transparent 36%),
        radial-gradient(circle at 88% 80%, rgba(45, 157, 150, 0.1), transparent 30%),
        linear-gradient(165deg, #1a202c 0%, #1e2836 58%, #1a2c32 100%);
}

html.dark-theme .gate-card__icon {
    background: rgba(45, 157, 150, 0.16);
    color: #9ad9d4;
}

html.dark-theme .auth-shell .iti__selected-flag {
    background: transparent;
}

html.dark-theme body:has(.auth-shell) .iti__country-list {
    background: #232b38;
    border-color: #3a4555;
    color: #ffffff;
}

html.dark-theme body:has(.auth-shell) .iti__country.iti__highlight {
    background: #1a202c;
}

html.dark-theme body:has(.auth-shell) .modal-content {
    background: #232b38;
    color: #ffffff;
}

html.dark-theme body:has(.auth-shell) .modal-header,
html.dark-theme body:has(.auth-shell) .modal-footer {
    border-color: #3a4555;
}

html.dark-theme body:has(.auth-shell) .modal-title,
html.dark-theme body:has(.auth-shell) .auth-contract-body,
html.dark-theme body:has(.auth-shell) .auth-contract-body h1,
html.dark-theme body:has(.auth-shell) .auth-contract-body h2,
html.dark-theme body:has(.auth-shell) .auth-contract-body h3 {
    color: #ffffff;
}

html.dark-theme body:has(.auth-shell) .btn-close {
    filter: invert(1);
}
