/* ============================================================
   CyberSentinel — Auth (login / register / forgot-password)
   About sahifasidagi dizayn tilidagi uslublar
   ============================================================ */

:root {
    --auth-primary: #2563eb;
    --auth-primary-dark: #1d4ed8;
    --auth-secondary: #7c3aed;
    --auth-accent: #06b6d4;
    --auth-success: #10b981;
    --auth-danger: #ef4444;
    --auth-dark: #0f172a;
    --auth-dark-2: #1e293b;
    --auth-gray: #64748b;
    --auth-gray-light: #94a3b8;
    --auth-bg: #f8fafc;
    --auth-bg-2: #f1f5f9;
    --auth-border: #e2e8f0;
    --auth-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    --auth-shadow-lg: 0 32px 64px rgba(15, 23, 42, 0.16);
    --auth-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* ============================================================
   Page wrapper
   ============================================================ */
.auth-page {
    min-height: 100vh;
    background: var(--auth-bg);
    padding: 100px 0 60px;
    position: relative;
    isolation: isolate;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 5% 10%, rgba(37, 99, 235, 0.08) 0, transparent 35%),
        radial-gradient(circle at 95% 85%, rgba(124, 58, 237, 0.08) 0, transparent 35%);
    z-index: -1;
    pointer-events: none;
}

.auth-shell {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--auth-shadow-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 640px;
}

/* ============================================================
   LEFT — Brand / showcase panel (dark, gradient)
   ============================================================ */
.auth-side {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
    color: #fff;
    padding: 3rem 2.75rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
}

.auth-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 30%, rgba(124, 58, 237, 0.4) 0, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.3) 0, transparent 45%);
    z-index: -1;
    animation: auth-bg-pulse 14s ease-in-out infinite alternate;
}

.auth-side::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    z-index: -1;
}

@keyframes auth-bg-pulse {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.1) rotate(2deg); opacity: 0.85; }
}

.auth-side__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.auth-side__brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-side__brand-logo img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.auth-side__brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.auth-side__brand-tagline {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.1rem;
}

.auth-side__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e0e7ff;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    align-self: flex-start;
    margin-bottom: 1.5rem;
}

.auth-side__badge i {
    color: var(--auth-success);
}

.auth-side__title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-side__title .hl {
    background: linear-gradient(135deg, #06b6d4 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-side__lead {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.auth-side__features {
    list-style: none;
    padding: 0;
    margin: 0 0 auto 0;
}

.auth-side__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    color: #e2e8f0;
    font-size: 0.925rem;
    line-height: 1.5;
}

.auth-side__features li i {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-side__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-side__stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #06b6d4 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.auth-side__stat-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.3rem;
}

/* ============================================================
   RIGHT — Form panel
   ============================================================ */
.auth-form {
    padding: 3rem 2.75rem;
    display: flex;
    flex-direction: column;
}

.auth-form__head {
    margin-bottom: 1.75rem;
}

.auth-form__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--auth-dark);
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem 0;
}

.auth-form__subtitle {
    color: var(--auth-gray);
    font-size: 0.95rem;
    margin: 0;
}

.auth-form__alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    animation: auth-shake 0.4s ease;
}

.auth-form__alert--error {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-form__alert--success {
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-form__alert i {
    margin-top: 2px;
    flex-shrink: 0;
}

@keyframes auth-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Field */
.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-dark-2);
    margin-bottom: 0.45rem;
    letter-spacing: 0.01em;
}

.auth-field__hint {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--auth-gray-light);
}

/* Phone input group: country select + tel input */
.auth-phone-group {
    display: flex;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.auth-phone-group:focus-within {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-phone-group .country-code {
    border: none;
    background: var(--auth-bg-2);
    padding: 0.85rem 0.6rem 0.85rem 0.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--auth-dark);
    border-right: 1px solid var(--auth-border);
    max-width: 130px;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2364748b' d='M5 6 0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 1.75rem;
}

.auth-phone-group input[type="tel"] {
    flex: 1;
    border: none;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    color: var(--auth-dark);
    outline: none;
    background: transparent;
    font-family: 'SF Mono', 'Menlo', monospace;
    letter-spacing: 0.02em;
}

.auth-phone-group input[type="tel"]::placeholder {
    color: var(--auth-gray-light);
    font-family: inherit;
}

/* Generic text input */
.auth-input {
    width: 100%;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    color: var(--auth-dark);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-input::placeholder {
    color: var(--auth-gray-light);
}

.auth-input--icon {
    padding-left: 2.75rem;
}

.auth-field__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-gray-light);
    font-size: 0.95rem;
    pointer-events: none;
}

.auth-field--icon-wrap {
    position: relative;
}

/* Toggle password visibility */
.auth-toggle-eye {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--auth-gray-light);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.25rem;
    border-radius: 6px;
}

.auth-toggle-eye:hover {
    color: var(--auth-primary);
}

/* Primary submit button */
.auth-submit {
    width: 100%;
    border: none;
    background: var(--auth-gradient);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.9rem 1.25rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.28);
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.35);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1.75rem 0 1.25rem;
    color: var(--auth-gray-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* Social login grid */
.auth-social {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.auth-social__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1.5px solid var(--auth-border);
    background: #fff;
    color: var(--auth-dark-2);
    padding: 0.7rem 0.4rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.825rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-social__btn:hover {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

.auth-social__btn i {
    font-size: 1rem;
}

.auth-social__btn--google:hover     { background: #fff; color: #ea4335; border-color: #ea4335; }
.auth-social__btn--yandex:hover     { background: #fff; color: #ff0000; border-color: #ff0000; }
.auth-social__btn--github:hover     { background: #24292e; color: #fff; }
.auth-social__btn--facebook:hover   { background: #1877f2; color: #fff; }
.auth-social__btn--telegram:hover   { background: #2aabee; color: #fff; }
.auth-social__btn--instagram:hover  { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }

/* Footer links */
.auth-form__footer {
    margin-top: auto;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--auth-gray);
}

.auth-form__footer a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

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

.auth-form__footer-row {
    margin: 0.4rem 0;
}

.auth-form__footer-row + .auth-form__footer-row {
    margin-top: 0.6rem;
}

/* Checkbox + label (remember me / agree to terms) */
.auth-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.875rem;
    color: var(--auth-dark-2);
    cursor: pointer;
}

.auth-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--auth-border);
    border-radius: 5px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

/* Login type tabs (admin / client) — for register and admin login if needed */
.auth-tabs {
    display: flex;
    background: var(--auth-bg-2);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.auth-tabs__btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tabs__btn.is-active {
    background: #fff;
    color: var(--auth-primary);
    box-shadow: var(--auth-shadow);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 540px;
    }
    .auth-side {
        padding: 2.5rem 2rem;
        min-height: auto;
    }
    .auth-side__features { display: none; }
    .auth-side__stats { display: none; }
    .auth-form { padding: 2.5rem 2rem; }
}

@media (max-width: 575.98px) {
    .auth-page { padding: 90px 0 40px; }
    .auth-shell { border-radius: 18px; margin: 0 0.75rem; }
    .auth-side { padding: 2rem 1.5rem; }
    .auth-form { padding: 2rem 1.5rem; }
    .auth-form__title { font-size: 1.5rem; }
    .auth-social { grid-template-columns: repeat(2, 1fr); }
    .auth-phone-group .country-code { max-width: 110px; font-size: 0.875rem; }
}
