/* ====================================================================
   FiberDeploy GIS — Login Page Styles
   Premium dark telecom aesthetic with glassmorphism
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────────── */
:root {
    --color-bg:          #050810;
    --color-bg-card:     rgba(10, 14, 28, 0.85);
    --color-surface:     rgba(255, 255, 255, 0.04);
    --color-surface-hover: rgba(255, 255, 255, 0.08);

    --color-primary:     #00d4ff;
    --color-primary-dim: rgba(0, 212, 255, 0.15);
    --color-primary-mid: rgba(0, 212, 255, 0.4);
    --color-accent:      #7c3aed;
    --color-accent-dim:  rgba(124, 58, 237, 0.2);
    --color-success:     #10b981;
    --color-danger:      #ef4444;
    --color-warning:     #f59e0b;

    --color-text:        #f1f5f9;
    --color-text-muted:  #94a3b8;
    --color-text-dim:    #64748b;

    --color-border:      rgba(255, 255, 255, 0.08);
    --color-border-focus: rgba(0, 212, 255, 0.5);

    --glow-primary:      0 0 20px rgba(0, 212, 255, 0.3), 0 0 60px rgba(0, 212, 255, 0.1);
    --glow-card:         0 25px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.06);

    --radius-sm:  8px;
    --radius-md:  14px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    overflow: hidden;
}

/* ── Animated Canvas Background ────────────────────────────────── */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Particles ──────────────────────────────────────────────────── */
.particle-container {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0%   { opacity: 0; transform: translateY(0) scale(1); }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-100vh) scale(0.3); }
}

/* ── Page Layout ────────────────────────────────────────────────── */
.page-wrapper {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 480px;
    height: 100vh;
    overflow: hidden;
}

/* ── Hero Panel (Left) ──────────────────────────────────────────── */
.hero-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
    background: linear-gradient(
        135deg,
        rgba(0, 212, 255, 0.04) 0%,
        rgba(124, 58, 237, 0.06) 50%,
        rgba(0, 212, 255, 0.02) 100%
    );
    border-right: 1px solid var(--color-border);
}

.hero-content {
    max-width: 520px;
    position: relative;
    z-index: 2;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 48px;
}

.logo-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-primary);
    flex-shrink: 0;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.3), 0 0 60px rgba(0, 212, 255, 0.1); }
    50%       { box-shadow: 0 0 30px rgba(0, 212, 255, 0.5), 0 0 80px rgba(0, 212, 255, 0.2); }
}

.logo-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(90deg, var(--color-primary), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-version {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.12em;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Hero Headline */
.hero-headline {
    margin-bottom: 40px;
}

.hero-headline h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--color-text);
    margin-bottom: 16px;
}

.accent-text {
    background: linear-gradient(90deg, var(--color-primary), #a78bfa, var(--color-primary));
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    max-width: 400px;
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 36px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.feature-item:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-primary-mid);
    transform: translateX(4px);
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.feature-icon svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

.feature-item strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

.feature-item span {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* Badges */
.hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 100px;
    background: var(--color-primary-dim);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: var(--color-primary);
}

/* Decorative fiber lines */
.fiber-lines {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.fiber-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0;
    animation: fiberSweep linear infinite;
}

.fl-1 { width: 60%; top: 20%; animation-duration: 6s; animation-delay: 0s; }
.fl-2 { width: 45%; top: 40%; animation-duration: 8s; animation-delay: 2s; }
.fl-3 { width: 70%; top: 65%; animation-duration: 7s; animation-delay: 1s; }
.fl-4 { width: 35%; top: 80%; animation-duration: 9s; animation-delay: 3s; }

@keyframes fiberSweep {
    0%   { left: -100%; opacity: 0; }
    10%  { opacity: 0.4; }
    80%  { opacity: 0.2; }
    100% { left: 110%; opacity: 0; }
}

/* ── Auth Panel (Right) ──────────────────────────────────────────── */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(5, 8, 16, 0.6);
    backdrop-filter: blur(20px);
}

/* Auth Card */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glow-card);
    backdrop-filter: blur(40px);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.6;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 28px;
    position: relative;
}

.auth-tab {
    flex: 1;
    padding: 9px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    border-radius: calc(var(--radius-md) - 4px);
    cursor: pointer;
    transition: color var(--transition);
    position: relative;
    z-index: 1;
}

.auth-tab.active {
    color: var(--color-text);
}

.tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(124, 58, 237, 0.15));
    border: 1px solid var(--color-border-focus);
    border-radius: calc(var(--radius-md) - 4px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-indicator.slide-right {
    transform: translateX(100%);
}

/* Form sections */
.auth-form {
    display: none;
    animation: fadeSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form.active {
    display: block;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Greeting */
.form-greeting {
    margin-bottom: 20px;
}

.form-greeting h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.form-greeting p {
    font-size: 0.83rem;
    color: var(--color-text-muted);
}

/* Google Button */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
}

.btn-google:hover {
    background: var(--color-surface-hover);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.btn-google:active { transform: translateY(0); }

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--color-text-dim);
    font-size: 0.78rem;
}

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

/* Input Groups */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-group {
    margin-bottom: 14px;
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--color-text-dim);
    pointer-events: none;
    transition: color var(--transition);
    flex-shrink: 0;
}

.input-wrapper input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

/* Inputs without left icon (last-name field etc) */
.input-row .input-group:last-child .input-wrapper input {
    padding-left: 12px;
}

.input-wrapper input::placeholder { color: var(--color-text-dim); }

.input-wrapper input:focus {
    border-color: var(--color-border-focus);
    background: rgba(0, 212, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--color-primary);
}

/* Toggle password button */
.toggle-pw {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-dim);
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color var(--transition);
}

.toggle-pw:hover { color: var(--color-primary); }
.toggle-pw svg { width: 16px; height: 16px; }

/* Input with toggle pw needs right padding */
.input-wrapper:has(.toggle-pw) input {
    padding-right: 38px;
}

/* Forgot link */
.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.78rem;
    color: var(--color-primary);
    text-decoration: none;
    margin-top: 6px;
    transition: opacity var(--transition);
}

.forgot-link:hover { opacity: 0.75; }

/* Remember me row */
.remember-row {
    margin-bottom: 16px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    color: var(--color-text-muted);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--color-border);
    border-radius: 5px;
    background: var(--color-surface);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.checkbox-label input:checked + .custom-checkbox {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.checkbox-label input:checked + .custom-checkbox::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translate(1px, -1px);
    display: block;
}

.terms-label {
    margin-bottom: 16px;
    align-items: flex-start;
}

.terms-label a {
    color: var(--color-primary);
    text-decoration: none;
}

.terms-label a:hover { text-decoration: underline; }

/* Password strength */
.pw-strength {
    height: 3px;
    border-radius: 10px;
    background: var(--color-surface);
    margin-top: 8px;
    overflow: hidden;
}

.pw-bar {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.4s ease, background 0.4s ease;
}

.pw-label {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

/* Primary CTA Button */
.btn-primary {
    width: 100%;
    padding: 12px;
    margin-top: 4px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before { left: 100%; }

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Error & Success messages */
.auth-error, .auth-success {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    animation: fadeSlideUp 0.25s ease;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.auth-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

/* Switch hint */
.switch-hint {
    text-align: center;
    font-size: 0.83rem;
    color: var(--color-text-muted);
    margin-top: 16px;
}

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

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

/* Auth footer */
.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--color-text-dim);
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    backdrop-filter: blur(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
    z-index: 9999;
    opacity: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success { border-color: rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.toast.error   { border-color: rgba(239, 68, 68, 0.4);  color: #fca5a5; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .page-wrapper {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .hero-panel {
        padding: 40px 32px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        min-height: auto;
    }

    .hero-headline h1 { font-size: 1.8rem; }
    .feature-list { display: none; }

    .auth-panel {
        padding: 32px 20px;
        min-height: auto;
    }

    html, body { overflow: auto; }
}

@media (max-width: 480px) {
    .auth-card { padding: 24px 20px; border-radius: var(--radius-lg); }
    .input-row { grid-template-columns: 1fr; }
    .hero-panel { padding: 32px 20px; }
    .hero-badges { display: none; }
    .hero-headline h1 { font-size: 1.5rem; }
}

/* ── Multi-Tenant Space Selector (DigitallyHub Style) ── */
.tenant-redirect-box {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tenant-redirect-title {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    text-align: center;
}

.tenant-input-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.tenant-input-row:focus-within {
    border-color: #6366f1;
}

.tenant-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 13.5px;
    outline: none;
    min-width: 0;
}

.tenant-input-row .tenant-suffix {
    font-size: 12.5px;
    color: #94a3b8;
    font-family: monospace;
    padding-right: 8px;
}

.btn-tenant-go {
    background: #6366f1;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-tenant-go:hover {
    background: #4f46e5;
}

.link-superadmin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #818cf8;
    font-size: 12.5px;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.2s;
}

.link-superadmin:hover {
    background: rgba(99, 102, 241, 0.16);
    color: #a5b4fc;
}

/* ── Enterprise Security UI Components ───────────────────────────── */
.security-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 18px;
    font-size: 11.5px;
    color: #6ee7b7;
    font-weight: 600;
}

.security-status-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.security-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.portal-role-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-role-btn {
    background: transparent;
    border: none;
    border-radius: 7px;
    padding: 8px 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.portal-role-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.portal-role-btn.active {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.security-attempts-badge {
    display: none;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fcd34d;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
    text-align: center;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.security-lockout-box {
    display: none;
    background: rgba(239, 68, 68, 0.12);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 14px;
    animation: fadeIn 0.3s ease;
}

.lockout-icon {
    font-size: 36px;
    color: #ef4444;
    margin-bottom: 8px;
    animation: pulse 1.5s infinite;
}

.lockout-title {
    font-size: 15px;
    font-weight: 800;
    color: #fca5a5;
    margin-bottom: 4px;
}

.lockout-desc {
    font-size: 12.5px;
    color: #cbd5e1;
    line-height: 1.4;
    margin-bottom: 12px;
}

.lockout-timer {
    font-size: 28px;
    font-weight: 900;
    font-family: monospace;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 16px;
    border-radius: 8px;
    display: inline-block;
    border: 1px solid rgba(239, 68, 68, 0.3);
    letter-spacing: 2px;
}

/* 2FA Form Container */
.twofa-wrapper {
    display: none;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    padding: 22px;
    margin-top: 14px;
    text-align: center;
    animation: scaleIn 0.25s ease;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.twofa-header {
    margin-bottom: 16px;
}

.twofa-header i {
    font-size: 32px;
    color: #818cf8;
    margin-bottom: 8px;
}

.twofa-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
}

.twofa-subtitle {
    font-size: 12.5px;
    color: #94a3b8;
    margin-top: 4px;
}

.twofa-otp-input {
    letter-spacing: 12px;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
    font-family: monospace;
    color: #38bdf8;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #6366f1;
    border-radius: 10px;
    padding: 10px;
    width: 220px;
    max-width: 100%;
    margin: 0 auto 16px;
    outline: none;
}

.twofa-otp-input:focus {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

/* Subdomain badge inside input */
.subdomain-badge-suffix {
    position: absolute;
    right: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 3px 8px;
    border-radius: 6px;
    pointer-events: none;
    letter-spacing: 0.02em;
}

.portal-role-btn.pill-tech-active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.35)) !important;
    border-color: rgba(245, 158, 11, 0.6) !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.btn-primary.btn-tech-mode {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4) !important;
}

.btn-primary.btn-tech-mode:hover {
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.6) !important;
}

/* SuperAdmin SaaS Styling */
.portal-role-btn.pill-saas-active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(79, 70, 229, 0.4)) !important;
    border-color: rgba(129, 140, 248, 0.7) !important;
    color: #c7d2fe !important;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.35);
}

.btn-primary.btn-saas-mode {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.45) !important;
}

.btn-primary.btn-saas-mode:hover {
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.65) !important;
}

