/* Fakeeh Care Group — Authentication UI */
:root {
    --auth-primary: #005778;
    --auth-primary-dark: #003244;
    --auth-primary-light: #0284c7;
    --auth-accent: #c41e6b;
    --auth-accent-soft: #e91e8c;
    --auth-neon-cyan: #00e5ff;
    --auth-neon-pink: #ff2d9a;
    --auth-neon-blue: #7ee8ff;
    --auth-surface: #ffffff;
    --auth-text: #0f172a;
    --auth-text-soft: #475569;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-radius: 1rem;
    --auth-radius-sm: 0.625rem;
    --auth-shadow: 0 24px 60px rgba(0, 50, 68, 0.12);
    --auth-font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

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

html,
body.hc-auth {
    min-height: 100%;
    margin: 0;
    font-family: var(--auth-font);
    color: var(--auth-text);
    background: #f8fafc;
    -webkit-font-smoothing: antialiased;
}

body.hc-auth .main {
    min-height: 100vh;
    padding: 0;
}

.hc-auth-page {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 100vh;
}

/* Brand panel — neon hero */
.hc-auth-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 20% 15%, rgba(255, 45, 154, 0.28), transparent 55%),
        radial-gradient(ellipse 70% 55% at 85% 80%, rgba(0, 229, 255, 0.22), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(0, 87, 120, 0.45), transparent 60%),
        linear-gradient(155deg, #001a24 0%, var(--auth-primary-dark) 28%, #004d66 62%, #002a38 100%);
}

.hc-auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 20%, transparent 75%);
    pointer-events: none;
}

.hc-auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 229, 255, 0.03) 50%, transparent 100%);
    pointer-events: none;
}

.hc-auth-brand__neon-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    animation: hc-auth-neon-float 8s ease-in-out infinite;
}

.hc-auth-brand__neon-orb--cyan {
    width: 18rem;
    height: 18rem;
    top: 8%;
    left: -4%;
    background: rgba(0, 229, 255, 0.35);
    animation-delay: 0s;
}

.hc-auth-brand__neon-orb--pink {
    width: 14rem;
    height: 14rem;
    bottom: 12%;
    right: -2%;
    background: rgba(255, 45, 154, 0.32);
    animation-delay: -4s;
}

.hc-auth-brand__neon-orb--blue {
    width: 10rem;
    height: 10rem;
    top: 42%;
    right: 18%;
    background: rgba(2, 132, 199, 0.4);
    animation-delay: -2s;
}

@keyframes hc-auth-neon-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.75;
    }
    50% {
        transform: translate(12px, -16px) scale(1.08);
        opacity: 1;
    }
}

.hc-auth-brand__glow {
    position: absolute;
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.12) 0%, transparent 68%);
    top: -10rem;
    right: -8rem;
    pointer-events: none;
    animation: hc-auth-neon-pulse 6s ease-in-out infinite;
}

@keyframes hc-auth-neon-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.06); }
}

.hc-auth-brand__inner {
    position: relative;
    z-index: 2;
    width: min(100%, 34rem);
    color: #fff;
}

.hc-auth-brand__logo-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.35rem 1.85rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: calc(var(--auth-radius) + 0.35rem);
    border: 1px solid rgba(0, 229, 255, 0.45);
    box-shadow:
        0 0 0 1px rgba(255, 45, 154, 0.12),
        0 0 24px rgba(0, 229, 255, 0.28),
        0 0 48px rgba(255, 45, 154, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.22);
    animation: hc-auth-logo-glow 4s ease-in-out infinite;
}

.hc-auth-brand__logo-wrap::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--auth-neon-cyan), var(--auth-neon-pink), var(--auth-neon-cyan));
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.65;
    animation: hc-auth-border-shift 5s linear infinite;
    pointer-events: none;
}

@keyframes hc-auth-logo-glow {
    0%, 100% {
        box-shadow:
            0 0 0 1px rgba(255, 45, 154, 0.12),
            0 0 24px rgba(0, 229, 255, 0.28),
            0 0 48px rgba(255, 45, 154, 0.12),
            0 20px 40px rgba(0, 0, 0, 0.22);
    }
    50% {
        box-shadow:
            0 0 0 1px rgba(0, 229, 255, 0.2),
            0 0 32px rgba(0, 229, 255, 0.42),
            0 0 56px rgba(255, 45, 154, 0.22),
            0 20px 40px rgba(0, 0, 0, 0.22);
    }
}

@keyframes hc-auth-border-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hc-auth-brand__logo {
    position: relative;
    z-index: 1;
    display: block;
    width: min(100%, 16rem);
    height: auto;
    object-fit: contain;
}

.hc-auth-brand__title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.85rem, 3vw, 2.75rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
}

.hc-auth-brand__title-line {
    display: block;
    color: #ffffff;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        0 2px 12px rgba(0, 0, 0, 0.2);
}

.hc-auth-brand__title span {
    display: block;
    color: #ffffff;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.35),
        0 2px 12px rgba(0, 0, 0, 0.2);
}

.hc-auth-brand__title strong {
    display: block;
    margin-top: 0.1rem;
    color: var(--auth-neon-blue);
    font-weight: 800;
    text-shadow:
        0 0 12px rgba(0, 229, 255, 0.9),
        0 0 32px rgba(0, 229, 255, 0.55),
        0 0 64px rgba(0, 229, 255, 0.25);
    animation: hc-auth-neon-text 3s ease-in-out infinite;
}

@keyframes hc-auth-neon-text {
    0%, 100% {
        text-shadow:
            0 0 12px rgba(0, 229, 255, 0.9),
            0 0 32px rgba(0, 229, 255, 0.55),
            0 0 64px rgba(0, 229, 255, 0.25);
    }
    50% {
        text-shadow:
            0 0 16px rgba(0, 229, 255, 1),
            0 0 40px rgba(0, 229, 255, 0.75),
            0 0 80px rgba(255, 45, 154, 0.35);
    }
}

.hc-auth-brand__subtitle {
    margin: 0 0 1.75rem;
    max-width: 28rem;
    font-size: 1.02rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.08);
}

.hc-auth-brand__features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.hc-auth-brand__feature {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hc-auth-brand__feature:hover {
    transform: translateY(-2px);
}

.hc-auth-brand__feature i {
    font-size: 1.05rem;
}

.hc-auth-brand__feature--cyan {
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.55);
    color: #b8f8ff;
    box-shadow:
        0 0 16px rgba(0, 229, 255, 0.2),
        inset 0 0 12px rgba(0, 229, 255, 0.06);
}

.hc-auth-brand__feature--cyan i {
    color: var(--auth-neon-cyan);
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.8));
}

.hc-auth-brand__feature--pink {
    background: rgba(255, 45, 154, 0.08);
    border: 1px solid rgba(255, 45, 154, 0.5);
    color: #ffc8e8;
    box-shadow:
        0 0 16px rgba(255, 45, 154, 0.18),
        inset 0 0 12px rgba(255, 45, 154, 0.06);
}

.hc-auth-brand__feature--pink i {
    color: var(--auth-neon-pink);
    filter: drop-shadow(0 0 6px rgba(255, 45, 154, 0.8));
}

.hc-auth-brand__feature--dual {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(126, 232, 255, 0.4);
    color: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 0 14px rgba(0, 229, 255, 0.15),
        0 0 14px rgba(255, 45, 154, 0.1);
}

.hc-auth-brand__feature--dual i {
    color: var(--auth-neon-blue);
    filter: drop-shadow(0 0 5px rgba(126, 232, 255, 0.7));
}

@media (prefers-reduced-motion: reduce) {
    .hc-auth-brand__neon-orb,
    .hc-auth-brand__glow,
    .hc-auth-brand__logo-wrap,
    .hc-auth-brand__logo-wrap::before,
    .hc-auth-brand__title strong {
        animation: none;
    }
}

/* Form panel */
.hc-auth-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(0, 87, 120, 0.05), transparent 35%),
        #f8fafc;
}

.hc-auth-panel__version {
    position: absolute;
    top: 1.25rem;
    inset-inline-end: 1.25rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(0, 87, 120, 0.08);
    color: var(--auth-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hc-auth-card {
    width: min(100%, 28rem);
    padding: 2rem 2rem 1.75rem;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: calc(var(--auth-radius) + 0.15rem);
    box-shadow: var(--auth-shadow);
}

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

.hc-auth-card__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(0, 87, 120, 0.12), rgba(2, 132, 199, 0.08));
    color: var(--auth-primary);
    font-size: 1.65rem;
}

.hc-auth-card__icon img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.hc-auth-card__header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.hc-auth-card__role {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 87, 120, 0.08);
    color: var(--auth-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.hc-auth-card__title {
    margin: 0 0 0.45rem;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--auth-text);
}

.hc-auth-card__subtitle {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.hc-auth-card .input-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--auth-text-soft);
    margin-bottom: 0.45rem;
}

.hc-auth-card .form-control,
.hc-auth-card .form-control-lg {
    min-height: 3rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    padding-inline: 0.95rem;
    font-size: 0.9375rem;
    color: var(--auth-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hc-auth-card .form-control:focus,
.hc-auth-card .form-control-lg:focus {
    border-color: var(--auth-primary-light);
    box-shadow: 0 0 0 4px rgba(0, 87, 120, 0.1);
}

.hc-auth-card .form-control::placeholder {
    color: #94a3b8;
}

.hc-auth-card .input-group-merge .input-group-append .input-group-text {
    border: 1.5px solid var(--auth-border);
    border-inline-start: 0;
    background: #f8fafc;
    color: var(--auth-muted);
    border-radius: 0 var(--auth-radius-sm) var(--auth-radius-sm) 0;
}

.hc-auth-card .input-group-merge .form-control {
    border-inline-end: 0;
    border-radius: var(--auth-radius-sm) 0 0 var(--auth-radius-sm);
}

.hc-auth-card .custom-control-label {
    color: var(--auth-text-soft);
    font-size: 0.875rem;
}

.hc-auth-card .text-primary,
.hc-auth-card .toggle-recovery {
    color: var(--auth-primary) !important;
    font-weight: 600;
}

.hc-auth-card .btn--primary,
.hc-auth-card .btn-primary,
.hc-auth-card .btn.btn--primary,
.hc-auth-card .btn.btn-primary {
    min-height: 3rem;
    border: none;
    border-radius: var(--auth-radius-sm);
    background-color: var(--auth-primary);
    background-image: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    line-height: 1.4;
    box-shadow: 0 10px 24px rgba(0, 87, 120, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hc-auth-card .btn--primary:hover,
.hc-auth-card .btn-primary:hover,
.hc-auth-card .btn.btn--primary:hover,
.hc-auth-card .btn.btn-primary:hover,
.hc-auth-card .btn--primary:focus,
.hc-auth-card .btn-primary:focus,
.hc-auth-card .btn.btn--primary:focus,
.hc-auth-card .btn.btn-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 87, 120, 0.28);
    background-color: var(--auth-primary-dark);
    background-image: linear-gradient(135deg, var(--auth-primary-dark) 0%, var(--auth-primary) 100%);
    color: #ffffff !important;
}

.hc-auth-card .btn--primary i,
.hc-auth-card .btn-primary i,
.hc-auth-card .btn.btn--primary i,
.hc-auth-card .btn.btn-primary i {
    color: #ffffff !important;
}

.hc-auth-card .btn-block,
.hc-auth-card .w-100 {
    width: 100%;
}

.hc-auth-card .form-group {
    margin-bottom: 1.15rem;
}

.hc-auth-card .auto-fill-data-copy {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: var(--auth-radius-sm);
    background: #f8fafc;
    border: 1px dashed var(--auth-border);
    font-size: 0.8125rem;
}

.hc-auth-card .auto-fill-data-copy .action-btn {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 0.5rem;
}

/* OTP & reset */
.hc-auth-card .otp-field {
    width: 3rem;
    height: 3.25rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--auth-text);
}

.hc-auth-card .otp-field:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(0, 87, 120, 0.1);
}

.hc-auth-card .otp-input,
.hc-auth-card .recovery-input {
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
}

.hc-auth-card .otp-input {
    font-size: 1.65rem;
    letter-spacing: 0.55rem;
    text-align: center;
    font-weight: 800;
    padding: 0.85rem 0.5rem;
}

.hc-auth-card .recovery-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1rem;
    letter-spacing: 0.12rem;
    text-align: center;
}

.hc-auth-card .toggle-recovery {
    cursor: pointer;
    font-weight: 600;
}

.hc-auth-card .toggle-recovery:hover {
    text-decoration: underline;
}

.hc-auth-card .btn-outline-primary {
    border-color: rgba(0, 87, 120, 0.35);
    color: var(--auth-primary);
    font-weight: 600;
    border-radius: var(--auth-radius-sm);
}

.hc-auth-card .btn-outline-primary:hover {
    background: rgba(0, 87, 120, 0.08);
    color: var(--auth-primary-dark);
}

.hc-auth-card .setup-steps,
.hc-auth-card .qr-code-container,
.hc-auth-card .warning-box,
.hc-auth-card .recovery-codes-container {
    border-radius: var(--auth-radius-sm);
    border: 1px solid var(--auth-border);
    background: #f8fafc;
}

.hc-auth-card .secret-key {
    border-radius: var(--auth-radius-sm);
    background: #eef2f7;
    color: var(--auth-text);
}

.hc-auth-card .shield-icon,
.hc-auth-card .success-icon {
    color: var(--auth-primary) !important;
}

/* Modals */
.hc-auth .modal-content {
    border: none;
    border-radius: calc(var(--auth-radius) + 0.1rem);
    box-shadow: var(--auth-shadow);
}

.hc-auth .forget-pass-content {
    text-align: center;
    padding: 0.5rem 0 1rem;
}

.hc-auth .forget-pass-content img {
    width: 4.5rem;
    margin-bottom: 1rem;
}

.hc-auth .forget-pass-content h4 {
    font-weight: 800;
    color: var(--auth-text);
}

.hc-auth .forget-pass-content p {
    color: var(--auth-muted);
}

.hc-auth .close-modal-icon {
    cursor: pointer;
    color: var(--auth-muted);
    font-size: 1.25rem;
}

/* RTL */
html[dir="rtl"] .hc-auth-card .input-group-merge .form-control {
    border-radius: 0 var(--auth-radius-sm) var(--auth-radius-sm) 0;
}

html[dir="rtl"] .hc-auth-card .input-group-merge .input-group-append .input-group-text {
    border-radius: var(--auth-radius-sm) 0 0 var(--auth-radius-sm);
    border-inline-start: 1.5px solid var(--auth-border);
    border-inline-end: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .hc-auth-page {
        grid-template-columns: 1fr;
    }

    .hc-auth-brand {
        min-height: auto;
        padding: 2rem 1.25rem 1.75rem;
    }

    .hc-auth-brand__logo-wrap {
        margin-bottom: 1.25rem;
        padding: 1rem 1.25rem;
    }

    .hc-auth-brand__logo {
        width: min(100%, 12rem);
    }

    .hc-auth-brand__title {
        font-size: 1.65rem;
    }

    .hc-auth-brand__subtitle {
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }

    .hc-auth-brand__features {
        display: flex;
        gap: 0.5rem;
    }

    .hc-auth-brand__feature {
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
    }

    .hc-auth-panel {
        padding: 1.25rem 1rem 2rem;
    }

    .hc-auth-card {
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 575px) {
    .hc-auth-panel__version {
        position: static;
        display: inline-block;
        margin: 0 auto 1rem;
    }

    .hc-auth-panel {
        flex-direction: column;
        align-items: stretch;
    }
}
