@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap");

:root {
    --auth-font-sans: "Montserrat", "Noto Sans Arabic", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --auth-primary: #ee2630;
    --auth-primary-dark: #d91f29;
    --auth-text: #233a59;
    --auth-muted: #6b7c93;
    --auth-line: #e5ebf5;
    --auth-bg: #f5f7fb;
    --auth-card: #ffffff;
    --auth-success: #10b981;
    --auth-error: #ef4444;
    --auth-shadow: 0 18px 45px rgba(35, 58, 89, 0.12);
}

html[dir="rtl"],
html.rtl-layout {
    --auth-font-sans: "Noto Sans Arabic", "Montserrat", "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--auth-font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--auth-text);
    background: linear-gradient(180deg, #ffffff 0%, var(--auth-bg) 100%);
}

a {
    color: var(--auth-primary);
    text-decoration: none;
}

a:hover {
    color: var(--auth-primary-dark);
}

img {
    max-width: 100%;
}

.nk-app-root,
.nk-main,
.nk-wrap,
.nk-content {
    min-height: 100vh;
}

.nk-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 16px;
}

.nk-block-middle {
    margin: auto;
}

.nk-auth-body {
    width: 100%;
}

.wide-xs {
    max-width: 430px;
}

.brand-logo {
    display: flex;
    justify-content: center;
}

.logo-link {
    display: inline-flex;
    align-items: center;
}

.logo-dark,
.logo-img {
    display: block;
    width: auto;
    max-height: 42px;
}

.pb-4 {
    padding-bottom: 24px;
}

.pt-4 {
    padding-top: 24px;
}

.text-center {
    text-align: center;
}

.text-soft {
    color: var(--auth-muted);
}

.card {
    background: var(--auth-card);
    border: 1px solid var(--auth-line);
    border-radius: 10px;
    box-shadow: var(--auth-shadow);
}

.card-inner {
    padding: 28px;
}

.card-inner-lg {
    padding: 34px;
}

.nk-block-head {
    margin-bottom: 24px;
}

.nk-block-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--auth-text);
}

.nk-block-des p {
    margin: 0;
    color: var(--auth-muted);
}

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

.form-label-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--auth-text);
}

.form-label-group .form-label {
    margin-bottom: 0;
}

.form-control-wrap {
    position: relative;
}

.form-control {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #d9e1ee;
    border-radius: 8px;
    background: #ffffff;
    color: var(--auth-text);
    font: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-control-lg {
    min-height: 50px;
    padding: 12px 15px;
}

.form-control:focus {
    outline: 0;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(238, 38, 48, 0.1);
}

.form-control::placeholder {
    color: #98a6ba;
}

.form-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 2;
    transform: translateY(-50%);
}

.form-icon + .form-control,
.form-control-wrap .form-control[type="password"],
.form-control-wrap .form-control[type="text"] {
    padding-right: 70px;
}

.passcode-switch {
    min-width: 45px;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    color: var(--auth-primary);
}

.passcode-switch::after {
    content: "Show";
}

.passcode-switch.is-visible::after {
    content: "Hide";
}

.passcode-icon {
    display: none;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled,
.btn.is-loading {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.btn-lg {
    min-height: 50px;
    padding: 12px 18px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--auth-primary);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(238, 38, 48, 0.2);
}

.btn-primary:hover {
    background: var(--auth-primary-dark);
    color: #ffffff;
}

.link-sm {
    font-size: 12px;
    font-weight: 700;
}

.form-note-s2 {
    color: var(--auth-muted);
}

.nk-footer {
    width: 100%;
    margin-top: 28px;
    color: var(--auth-muted);
}

.nk-footer p {
    margin: 0;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.auth-lite-notices {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10000;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
}

.auth-lite-notice {
    padding: 14px 16px;
    border: 1px solid var(--auth-line);
    border-left-width: 4px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(35, 58, 89, 0.16);
    color: var(--auth-text);
}

.auth-lite-notice strong {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
}

.auth-lite-notice p {
    margin: 0;
    color: var(--auth-muted);
}

.auth-lite-notice.is-success {
    border-left-color: var(--auth-success);
}

.auth-lite-notice.is-error {
    border-left-color: var(--auth-error);
}

.auth-lite-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    background: rgba(245, 247, 251, 0.58);
    backdrop-filter: blur(2px);
}

.auth-lite-overlay::after {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(238, 38, 48, 0.18);
    border-top-color: var(--auth-primary);
    border-radius: 50%;
    content: "";
    animation: authLiteSpin 0.72s linear infinite;
}

.auth-lite-loading .auth-lite-overlay {
    display: grid;
}

@keyframes authLiteSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 520px) {
    .nk-content {
        padding: 22px 14px;
    }

    .card-inner-lg {
        padding: 26px 20px;
    }

    .nk-block-title {
        font-size: 22px;
    }
}
