/* ============================================================
   HAWIYYA AUTH — Premium Split Layout
   Apple-grade polish · Glassmorphism accents · Micro-interactions
   ============================================================ */

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* === Page Loader === */
.hw-auth-page-loader {
    position: fixed;
    inset: 0;
    background: var(--auth-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    z-index: 9999;
    transition: opacity 0.4s ease;
}
.hw-auth-page-loader.hide {
    opacity: 0;
    pointer-events: none;
}
.hw-auth-loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--auth-border-input, #E2E6F0);
    border-top-color: var(--auth-accent, #2563EB);
    border-radius: 50%;
    animation: hw-auth-spin 0.7s linear infinite;
}
@keyframes hw-auth-spin { to { transform: rotate(360deg); } }
.hw-auth-loader-text {
    font-size: 13px;
    color: var(--auth-text-3, #8991A8);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* === Design Tokens === */
:root {
    /* Brand gradient */
    --auth-accent: #2563EB;
    --auth-accent-2: #7C3AED;
    --auth-accent-rgb: 37, 99, 235;
    --auth-accent-2-rgb: 124, 58, 237;
    --auth-grad: linear-gradient(135deg, #2563EB, #7C3AED);
    --auth-grad-hover: linear-gradient(135deg, #1D4ED8, #6D28D9);
    --auth-grad-subtle: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(124,58,237,0.08));

    /* Surfaces */
    --auth-bg: #F0F2F8;
    --auth-bg-pure: #FFFFFF;
    --auth-bg-hover: rgba(0,0,0,0.03);
    --auth-bg-input: #F4F6FA;

    /* Text */
    --auth-text-1: #0C1024;
    --auth-text-2: #3E4459;
    --auth-text-3: #8991A8;
    --auth-text-4: #B4BAC9;

    /* Semantic */
    --auth-green: #16A34A;
    --auth-green-rgb: 22, 163, 74;
    --auth-red: #DC2626;
    --auth-red-rgb: 220, 38, 38;
    --auth-amber: #D97706;
    --auth-amber-rgb: 217, 119, 6;

    /* Borders */
    --auth-border: rgba(0,0,0,0.06);
    --auth-border-input: rgba(0,0,0,0.08);

    /* Shadows */
    --auth-shadow-xs: 0 1px 2px rgba(12, 16, 36, 0.04);
    --auth-shadow-sm: 0 1px 3px rgba(12, 16, 36, 0.06), 0 1px 2px rgba(12, 16, 36, 0.04);
    --auth-shadow-md: 0 4px 16px rgba(12, 16, 36, 0.08), 0 1px 4px rgba(12, 16, 36, 0.04);
    --auth-shadow-lg: 0 8px 32px rgba(12, 16, 36, 0.1), 0 2px 8px rgba(12, 16, 36, 0.04);
    --auth-shadow-xl: 0 16px 48px rgba(12, 16, 36, 0.12);
    --auth-shadow-glow: 0 0 20px rgba(var(--auth-accent-rgb), 0.15);
    --auth-shadow-glow-strong: 0 0 32px rgba(var(--auth-accent-rgb), 0.25);
    --auth-shadow-btn: 0 4px 16px rgba(var(--auth-accent-rgb), 0.25), 0 1px 3px rgba(var(--auth-accent-rgb), 0.1);
    --auth-shadow-btn-hover: 0 8px 28px rgba(var(--auth-accent-rgb), 0.35), 0 2px 6px rgba(var(--auth-accent-rgb), 0.15);
    --auth-shadow-green: 0 4px 16px rgba(var(--auth-green-rgb), 0.25);

    /* Glass */
    --auth-glass: rgba(255,255,255,0.15);
    --auth-glass-strong: rgba(255,255,255,0.25);
    --auth-glass-border: rgba(255,255,255,0.25);
    --auth-glass-blur: saturate(120%) blur(20px);

    /* Radii */
    --auth-r-sm: 8px;
    --auth-r-md: 12px;
    --auth-r-lg: 16px;
    --auth-r-xl: 24px;
    --auth-r-2xl: 32px;

    /* Easing */
    --auth-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --auth-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --auth-ease-out: cubic-bezier(0, 0, 0.2, 1);
    --auth-ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text-1);
    min-height: 100vh;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
}

::selection {
    background: rgba(var(--auth-accent-rgb), 0.14);
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 10px; }

/* ══════════════════════════════════════════════
   SPLIT LAYOUT
   ══════════════════════════════════════════════ */
.hw-auth-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════
   HERO SIDE
   ══════════════════════════════════════════════ */
.hw-auth-hero {
    width: 45%;
    background: var(--auth-grad);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    overflow: hidden;
}

/* Animated grid pattern */
.hw-auth-hero-bg {
    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: 40px 40px;
    pointer-events: none;
    animation: hw-auth-gridShift 30s linear infinite;
}

@keyframes hw-auth-gridShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

/* Floating orbs */
.hw-auth-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    top: -150px;
    left: -100px;
    pointer-events: none;
    animation: hw-auth-orbFloat 20s ease-in-out infinite alternate;
}

.hw-auth-hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    bottom: -120px;
    right: -80px;
    pointer-events: none;
    animation: hw-auth-orbFloat 25s ease-in-out infinite alternate-reverse;
}

@keyframes hw-auth-orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.05); }
    100% { transform: translate(-10px, 15px) scale(0.95); }
}

.hw-auth-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.hw-auth-hero-logo {
    width: 88px;
    height: 88px;
    background: var(--auth-glass-strong);
    backdrop-filter: var(--auth-glass-blur);
    -webkit-backdrop-filter: var(--auth-glass-blur);
    border: 1.5px solid var(--auth-glass-border);
    border-radius: var(--auth-r-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-family: 'Inter', sans-serif;
    font-size: 44px;
    font-weight: 900;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.4s var(--auth-ease-bounce), box-shadow 0.4s var(--auth-ease);
}

.hw-auth-hero-logo:hover {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.25);
}

.hw-auth-hero-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 4px;
    letter-spacing: -1px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.hw-auth-hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 8px;
    font-weight: 500;
}

.hw-auth-hero-tagline {
    font-size: 18px;
    opacity: 0.55;
    margin-bottom: 48px;
    font-weight: 400;
}

.hw-auth-hero-features {
    list-style: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 320px;
}

.hw-auth-hero-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    opacity: 0.8;
    font-weight: 400;
    transition: opacity 0.3s var(--auth-ease), transform 0.3s var(--auth-ease);
}

.hw-auth-hero-features li:hover {
    opacity: 1;
    transform: translateX(-4px);
}

.hw-auth-hero-features li .feature-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 0.5px solid rgba(255,255,255,0.15);
    border-radius: var(--auth-r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s var(--auth-ease), transform 0.3s var(--auth-ease-bounce);
}

.hw-auth-hero-features li:hover .feature-icon {
    background: rgba(255,255,255,0.2);
    transform: scale(1.08);
}

.hw-auth-hero-footer {
    position: absolute;
    bottom: 32px;
    font-size: 13px;
    opacity: 0.4;
    z-index: 1;
    color: #fff;
}

/* ══════════════════════════════════════════════
   FORM SIDE
   ══════════════════════════════════════════════ */
.hw-auth-form-side {
    width: 55%;
    background: var(--auth-bg-pure);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow-y: auto;
}

/* Subtle noise texture */
.hw-auth-form-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 20%, rgba(var(--auth-accent-rgb), 0.02) 0%, transparent 60%),
                radial-gradient(ellipse at 30% 80%, rgba(var(--auth-accent-2-rgb), 0.015) 0%, transparent 60%);
    pointer-events: none;
}

.hw-auth-form-wrapper {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

/* Mobile Logo */
.hw-auth-mobile-logo {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.hw-auth-mobile-icon {
    width: 56px;
    height: 56px;
    background: var(--auth-grad);
    border-radius: var(--auth-r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
    box-shadow: var(--auth-shadow-btn);
}

.hw-auth-mobile-name {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 900;
    background: var(--auth-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Header */
.hw-auth-form-header {
    margin-bottom: 36px;
}

.hw-auth-form-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--auth-text-1);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.hw-auth-form-header p {
    font-size: 15px;
    color: var(--auth-text-3);
    line-height: 1.5;
}

/* ══════════════════════════════════════════════
   PROGRESS BAR (Register)
   ══════════════════════════════════════════════ */
.hw-auth-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 32px;
    position: relative;
}

.hw-auth-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.hw-auth-progress-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--auth-bg);
    border: 2px solid var(--auth-text-4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--auth-text-3);
    transition: all 0.4s var(--auth-ease-bounce);
    position: relative;
}

.hw-auth-progress-circle.active {
    background: var(--auth-accent);
    border-color: var(--auth-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--auth-accent-rgb), 0.15), var(--auth-shadow-glow);
    transform: scale(1.08);
}

.hw-auth-progress-circle.completed {
    background: var(--auth-green);
    border-color: var(--auth-green);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--auth-green-rgb), 0.12);
}

.hw-auth-progress-label {
    font-size: 12px;
    color: var(--auth-text-3);
    margin-top: 6px;
    font-weight: 500;
    transition: all 0.3s var(--auth-ease);
}

.hw-auth-progress-label.active {
    color: var(--auth-accent);
    font-weight: 600;
}

.hw-auth-progress-label.completed {
    color: var(--auth-green);
}

.hw-auth-progress-line {
    position: absolute;
    top: 18px;
    height: 2px;
    background: var(--auth-grad);
    z-index: 0;
    transition: width 0.5s var(--auth-ease);
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(var(--auth-accent-rgb), 0.3);
}

/* ══════════════════════════════════════════════
   FORM FIELDS
   ══════════════════════════════════════════════ */
.hw-auth-form-group {
    margin-bottom: 20px;
}

.hw-auth-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text-2);
    margin-bottom: 8px;
}

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

.hw-auth-input-wrapper .input-icon {
    position: absolute;
    right: 14px;
    color: var(--auth-text-4);
    display: flex;
    align-items: center;
    pointer-events: none;
    font-size: 18px;
    transition: color 0.25s var(--auth-ease);
}

.hw-auth-input-wrapper input,
.hw-auth-input-wrapper select {
    width: 100%;
    padding: 14px 44px 14px 14px;
    border: 1.5px solid var(--auth-border-input);
    border-radius: var(--auth-r-md);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--auth-text-1);
    background: var(--auth-bg-input);
    transition: all 0.25s var(--auth-ease);
    outline: none;
    direction: ltr;
}

.hw-auth-input-wrapper input::placeholder {
    color: var(--auth-text-4);
    transition: color 0.2s;
}

.hw-auth-input-wrapper input:hover {
    border-color: rgba(var(--auth-accent-rgb), 0.2);
}

.hw-auth-input-wrapper input:focus,
.hw-auth-input-wrapper select:focus {
    border-color: var(--auth-accent);
    background: var(--auth-bg-pure);
    box-shadow: 0 0 0 4px rgba(var(--auth-accent-rgb), 0.08), var(--auth-shadow-glow);
}

.hw-auth-input-wrapper input:focus::placeholder {
    color: var(--auth-text-3);
}

.hw-auth-input-wrapper input:focus ~ .input-icon {
    color: var(--auth-accent);
}

.hw-auth-input-wrapper input.error,
.hw-auth-input-wrapper select.error {
    border-color: var(--auth-red);
    background: rgba(var(--auth-red-rgb), 0.03);
}

.hw-auth-input-wrapper input.error:focus {
    box-shadow: 0 0 0 4px rgba(var(--auth-red-rgb), 0.08);
}

.hw-auth-input-wrapper.has-toggle input {
    padding-left: 44px;
}

.hw-auth-input-wrapper select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

/* Input Error Message */
.hw-auth-input-error {
    font-size: 12px;
    color: var(--auth-red);
    margin-top: 6px;
    display: none;
    animation: hw-auth-shakeIn 0.4s var(--auth-ease);
}

.hw-auth-input-error.visible {
    display: block;
}

@keyframes hw-auth-shakeIn {
    0% { transform: translateX(8px); opacity: 0; }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
    100% { transform: translateX(0); opacity: 1; }
}

/* ── Toggle PIN ── */
.hw-auth-toggle-pin {
    position: absolute;
    left: 14px;
    background: none;
    border: none;
    color: var(--auth-text-4);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: var(--auth-r-sm);
    transition: all 0.2s var(--auth-ease);
    font-size: 18px;
}

.hw-auth-toggle-pin:hover {
    color: var(--auth-accent);
    background: rgba(var(--auth-accent-rgb), 0.06);
}

/* ── PIN Strength ── */
.hw-auth-pin-strength {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.hw-auth-pin-bars {
    display: flex;
    gap: 4px;
    flex: 1;
}

.hw-auth-pin-bar {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: var(--auth-bg);
    transition: background 0.4s var(--auth-ease), box-shadow 0.4s var(--auth-ease);
}

.hw-auth-pin-strength-text {
    font-size: 12px;
    font-weight: 600;
    min-width: 48px;
    text-align: start;
    transition: color 0.3s var(--auth-ease);
}

/* ══════════════════════════════════════════════
   INFO NOTE
   ══════════════════════════════════════════════ */
.hw-auth-info-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--auth-r-sm);
    font-size: 13px;
    line-height: 1.6;
    color: var(--auth-text-2);
    margin-bottom: 24px;
    border: 1px solid transparent;
    transition: transform 0.2s var(--auth-ease);
}

.hw-auth-info-note.blue {
    background: rgba(var(--auth-accent-rgb), 0.05);
    border-color: rgba(var(--auth-accent-rgb), 0.1);
    color: #1E40AF;
}

.hw-auth-info-note.amber {
    background: rgba(var(--auth-amber-rgb), 0.06);
    border-color: rgba(var(--auth-amber-rgb), 0.12);
    color: #92400E;
}

.hw-auth-info-note i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 18px;
}

/* ══════════════════════════════════════════════
   AVATAR GRID (Register Step 1)
   ══════════════════════════════════════════════ */
.hw-auth-avatar-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text-2);
    margin-bottom: 12px;
}

.hw-auth-avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

/* Skeleton loading */
.hw-auth-avatar-skeleton {
    aspect-ratio: 1;
    border-radius: var(--auth-r-md);
    background: var(--auth-bg-input);
    border: 2px solid var(--auth-border-input);
    overflow: hidden;
    position: relative;
}

.hw-auth-avatar-skeleton-img {
    width: 100%;
    height: 100%;
    border-radius: calc(var(--auth-r-md) - 4px);
    background: linear-gradient(
        110deg,
        var(--auth-bg-input) 30%,
        rgba(var(--auth-accent-rgb), 0.06) 50%,
        var(--auth-bg-input) 70%
    );
    background-size: 200% 100%;
    animation: hw-auth-shimmer 1.4s ease-in-out infinite;
}

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

.hw-auth-avatar-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--auth-border-input);
    border-radius: var(--auth-r-md);
    background: var(--auth-bg-input);
    cursor: pointer;
    transition: all 0.25s var(--auth-ease-bounce);
    user-select: none;
    overflow: hidden;
    padding: 6px;
    position: relative;
    animation: hw-auth-fadeIn 0.3s ease;
}

@keyframes hw-auth-fadeIn {
    0%   { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.hw-auth-avatar-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: var(--auth-grad-subtle);
    transition: opacity 0.25s var(--auth-ease);
}

.hw-auth-avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--auth-r-md) - 4px);
    transition: transform 0.25s var(--auth-ease-bounce);
}

.hw-auth-avatar-item:hover {
    border-color: rgba(var(--auth-accent-rgb), 0.3);
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-md);
}

.hw-auth-avatar-item:hover::after {
    opacity: 1;
}

.hw-auth-avatar-item:hover img {
    transform: scale(1.05);
}

.hw-auth-avatar-item:active {
    transform: translateY(0) scale(0.96);
}

.hw-auth-avatar-item.selected {
    border-color: var(--auth-accent);
    background: rgba(var(--auth-accent-rgb), 0.06);
    box-shadow: 0 0 0 3px rgba(var(--auth-accent-rgb), 0.15), var(--auth-shadow-glow);
    transform: translateY(-2px) scale(1.04);
}

.hw-auth-avatar-item.selected img {
    transform: scale(1.05);
}

/* Selected checkmark */
.hw-auth-avatar-item.selected::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    background: var(--auth-accent);
    border-radius: 50%;
    z-index: 2;
    box-shadow: var(--auth-shadow-sm);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-size: 14px;
    background-repeat: no-repeat;
    background-position: center;
    animation: hw-auth-popIn 0.3s var(--auth-ease-spring);
}

@keyframes hw-auth-popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ══════════════════════════════════════════════
   CERTIFICATE UPLOAD (Login)
   ══════════════════════════════════════════════ */
.hw-auth-cert-upload {
    border: 2px dashed var(--auth-text-4);
    border-radius: var(--auth-r-md);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s var(--auth-ease);
    background: var(--auth-bg-input);
    position: relative;
    overflow: hidden;
}

.hw-auth-cert-upload::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--auth-grad-subtle);
    opacity: 0;
    transition: opacity 0.3s var(--auth-ease);
}

.hw-auth-cert-upload:hover {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(var(--auth-accent-rgb), 0.06);
}

.hw-auth-cert-upload:hover::before {
    opacity: 1;
}

.hw-auth-cert-upload.drag-over {
    border-color: var(--auth-accent);
    background: rgba(var(--auth-accent-rgb), 0.06);
    transform: scale(1.01);
    box-shadow: var(--auth-shadow-glow);
}

.hw-auth-cert-upload.has-file {
    border-color: var(--auth-green);
    border-style: solid;
    background: rgba(var(--auth-green-rgb), 0.04);
    box-shadow: 0 0 0 4px rgba(var(--auth-green-rgb), 0.06);
}

.hw-auth-cert-upload.has-file::before { opacity: 0; }

.hw-auth-cert-upload-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(var(--auth-accent-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-accent);
    font-size: 24px;
    transition: all 0.3s var(--auth-ease-bounce);
    position: relative;
    z-index: 1;
}

.hw-auth-cert-upload:hover .hw-auth-cert-upload-icon {
    transform: translateY(-2px) scale(1.05);
    background: rgba(var(--auth-accent-rgb), 0.12);
}

.hw-auth-cert-upload.has-file .hw-auth-cert-upload-icon {
    background: rgba(var(--auth-green-rgb), 0.1);
    color: var(--auth-green);
}

.hw-auth-cert-upload-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.hw-auth-cert-upload-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text-2);
}

.hw-auth-cert-upload-hint {
    font-size: 12px;
    color: var(--auth-text-4);
}

.hw-auth-cert-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(var(--auth-green-rgb), 0.05);
    border: 1px solid rgba(var(--auth-green-rgb), 0.15);
    border-radius: var(--auth-r-sm);
    margin-top: 8px;
    animation: hw-auth-slideDown 0.3s var(--auth-ease);
}

@keyframes hw-auth-slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.hw-auth-cert-file-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-text-2);
}

.hw-auth-cert-file-details i {
    color: var(--auth-green);
    font-size: 18px;
}

.hw-auth-cert-remove {
    background: none;
    border: none;
    color: var(--auth-text-4);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--auth-r-sm);
    display: flex;
    align-items: center;
    transition: all 0.2s var(--auth-ease);
    font-size: 16px;
}

.hw-auth-cert-remove:hover {
    color: var(--auth-red);
    background: rgba(var(--auth-red-rgb), 0.06);
    transform: scale(1.1);
}

/* ══════════════════════════════════════════════
   CERTIFICATE GENERATED (Register Step 4)
   ══════════════════════════════════════════════ */
.hw-auth-cert-generated {
    text-align: center;
    padding: 32px 24px;
    background: rgba(var(--auth-green-rgb), 0.04);
    border: 1px solid rgba(var(--auth-green-rgb), 0.12);
    border-radius: var(--auth-r-lg);
    animation: hw-auth-fadeIn 0.5s var(--auth-ease);
}

.hw-auth-cert-icon-wrap {
    width: 72px;
    height: 72px;
    background: rgba(var(--auth-green-rgb), 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 40px;
    color: var(--auth-green);
    animation: hw-auth-certPulse 2s ease-in-out infinite;
}

@keyframes hw-auth-certPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--auth-green-rgb), 0.2); }
    50% { box-shadow: 0 0 0 12px rgba(var(--auth-green-rgb), 0); }
}

.hw-auth-cert-gen-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--auth-text-1);
    margin-bottom: 6px;
}

.hw-auth-cert-gen-desc {
    font-size: 13px;
    color: var(--auth-text-3);
    margin-bottom: 20px;
    line-height: 1.6;
}

.hw-auth-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--auth-grad);
    color: #fff;
    border: none;
    border-radius: var(--auth-r-md);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s var(--auth-ease-bounce);
    box-shadow: var(--auth-shadow-btn);
    position: relative;
    overflow: hidden;
}

.hw-auth-btn-download::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.1));
    opacity: 0;
    transition: opacity 0.25s;
}

.hw-auth-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-btn-hover);
}

.hw-auth-btn-download:hover::before { opacity: 1; }

.hw-auth-btn-download:active {
    transform: translateY(0) scale(0.97);
}

.hw-auth-btn-download.downloaded {
    background: var(--auth-green);
    box-shadow: var(--auth-shadow-green);
    pointer-events: none;
}

.hw-auth-btn-download:disabled {
    opacity: 0.7;
    cursor: wait;
}

.hw-auth-cert-downloaded-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--auth-green);
    animation: hw-auth-fadeIn 0.4s var(--auth-ease);
}

/* ══════════════════════════════════════════════
   ERROR ALERT (Login)
   ══════════════════════════════════════════════ */
.hw-auth-error-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(var(--auth-red-rgb), 0.05);
    border: 1px solid rgba(var(--auth-red-rgb), 0.12);
    border-radius: var(--auth-r-sm);
    font-size: 13px;
    color: var(--auth-red);
    margin-bottom: 4px;
    animation: hw-auth-shakeIn 0.4s var(--auth-ease);
}

.hw-auth-error-alert i {
    flex-shrink: 0;
    font-size: 16px;
}

/* ══════════════════════════════════════════════
   CHECKBOX
   ══════════════════════════════════════════════ */
.hw-auth-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
}

.hw-auth-checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--auth-text-4);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    margin-top: 2px;
    transition: all 0.2s var(--auth-ease-bounce);
}

.hw-auth-checkbox-group input[type="checkbox"]:hover {
    border-color: rgba(var(--auth-accent-rgb), 0.4);
}

.hw-auth-checkbox-group input[type="checkbox"]:checked {
    background: var(--auth-accent);
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(var(--auth-accent-rgb), 0.12);
    animation: hw-auth-popIn 0.25s var(--auth-ease-spring);
}

.hw-auth-checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 10px;
    height: 6px;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(-45deg) scaleX(-1);
}

.hw-auth-checkbox-group label {
    font-size: 13px;
    color: var(--auth-text-2);
    cursor: pointer;
    line-height: 1.6;
}

.hw-auth-checkbox-group label a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
    position: relative;
}

.hw-auth-checkbox-group label a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0;
    left: 0;
    height: 1px;
    background: var(--auth-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s var(--auth-ease);
}

.hw-auth-checkbox-group label a:hover::after {
    transform: scaleX(1);
}

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.hw-auth-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.hw-auth-btn {
    flex: 1;
    padding: 14px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--auth-r-md);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s var(--auth-ease-bounce);
}

.hw-auth-btn:active {
    transform: scale(0.96) !important;
}

.hw-auth-btn i {
    font-size: 18px;
    transition: transform 0.25s var(--auth-ease);
}

/* Primary Button */
.hw-auth-btn-primary {
    background: var(--auth-grad);
    color: #fff;
    box-shadow: var(--auth-shadow-btn);
}

.hw-auth-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.12));
    opacity: 0;
    transition: opacity 0.25s;
}

.hw-auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-btn-hover);
}

.hw-auth-btn-primary:hover::before { opacity: 1; }

.hw-auth-btn-primary:hover i {
    transform: translateX(-3px);
}

.hw-auth-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

.hw-auth-btn-primary:disabled::before { display: none; }

/* Secondary Button */
.hw-auth-btn-secondary {
    background: var(--auth-bg);
    color: var(--auth-text-2);
    border: 1.5px solid var(--auth-border-input);
}

.hw-auth-btn-secondary:hover {
    background: var(--auth-bg-hover);
    border-color: rgba(var(--auth-accent-rgb), 0.15);
    color: var(--auth-accent);
    transform: translateY(-1px);
    box-shadow: var(--auth-shadow-sm);
}

.hw-auth-btn-secondary:hover i {
    transform: translateX(3px);
}

/* Login Button */
.hw-auth-btn-login {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--auth-r-md);
    background: var(--auth-grad);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--auth-shadow-btn);
    transition: all 0.25s var(--auth-ease-bounce);
}

.hw-auth-btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.12));
    opacity: 0;
    transition: opacity 0.25s;
}

/* Shimmer effect on hover */
.hw-auth-btn-login::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: right 0.5s var(--auth-ease);
}

.hw-auth-btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--auth-shadow-btn-hover);
}

.hw-auth-btn-login:hover::before { opacity: 1; }
.hw-auth-btn-login:hover::after { right: 100%; }

.hw-auth-btn-login:active {
    transform: translateY(0) scale(0.97);
}

.hw-auth-btn-login.loading {
    pointer-events: none;
    opacity: 0.85;
}

.hw-auth-btn-login .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hw-auth-spin 0.7s linear infinite;
}

.hw-auth-btn-login.loading .spinner { display: block; }
.hw-auth-btn-login.loading .btn-text { display: none; }

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

/* ══════════════════════════════════════════════
   STEP PANELS (Register)
   ══════════════════════════════════════════════ */
.hw-auth-step-panel {
    display: none;
}

.hw-auth-step-panel.active {
    display: block;
    animation: hw-auth-fadeIn 0.4s var(--auth-ease-out);
}

@keyframes hw-auth-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   SUCCESS STATE
   ══════════════════════════════════════════════ */
.hw-auth-success-state {
    display: none;
    text-align: center;
    padding: 40px 0;
}

.hw-auth-success-state.active {
    display: block;
    animation: hw-auth-fadeIn 0.5s var(--auth-ease);
}

.hw-auth-success-icon-wrap {
    width: 88px;
    height: 88px;
    background: rgba(var(--auth-green-rgb), 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 44px;
    color: var(--auth-green);
    animation: hw-auth-successPulse 1.8s ease-in-out infinite;
}

@keyframes hw-auth-successPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--auth-green-rgb), 0.2); transform: scale(1); }
    50% { box-shadow: 0 0 0 18px rgba(var(--auth-green-rgb), 0); transform: scale(1.02); }
}

.hw-auth-success-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--auth-text-1);
    margin-bottom: 8px;
}

.hw-auth-success-subtitle {
    font-size: 14px;
    color: var(--auth-text-3);
}

.hw-auth-success-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--auth-text-3);
    font-size: 13px;
}

.hw-auth-success-loader .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--auth-bg);
    border-top-color: var(--auth-accent);
    border-radius: 50%;
    animation: hw-auth-spin 0.8s linear infinite;
}

/* ══════════════════════════════════════════════
   BOTTOM LINK / FOOTER
   ══════════════════════════════════════════════ */
.hw-auth-bottom-link {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: var(--auth-text-3);
}

.hw-auth-bottom-link a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s var(--auth-ease);
    position: relative;
}

.hw-auth-bottom-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    left: 0;
    height: 1.5px;
    background: var(--auth-grad);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s var(--auth-ease);
}

.hw-auth-bottom-link a:hover::after {
    transform: scaleX(1);
}

/* Security Badge */
.hw-auth-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-border);
    font-size: 12px;
    color: var(--auth-text-4);
}

.hw-auth-security-badge i {
    font-size: 14px;
    color: var(--auth-green);
}

/* Footer Links */
.hw-auth-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 12px;
}

.hw-auth-footer-links a {
    color: var(--auth-text-4);
    text-decoration: none;
    transition: color 0.2s var(--auth-ease);
}

.hw-auth-footer-links a:hover {
    color: var(--auth-accent);
}

.hw-auth-footer-links span {
    color: var(--auth-text-4);
}

/* ══════════════════════════════════════════════
   DIVIDER
   ══════════════════════════════════════════════ */
.hw-auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

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

.hw-auth-divider span {
    font-size: 13px;
    color: var(--auth-text-4);
    font-weight: 500;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .hw-auth-hero {
        display: none;
    }

    .hw-auth-form-side {
        width: 100%;
        background: var(--auth-bg);
        padding: 32px 24px;
    }

    .hw-auth-form-wrapper {
        background: var(--auth-bg-pure);
        padding: 32px 24px;
        border-radius: var(--auth-r-xl);
        box-shadow: var(--auth-shadow-lg);
        border: 1px solid var(--auth-border);
    }

    .hw-auth-mobile-logo {
        display: flex;
    }
}

@media (max-width: 480px) {
    .hw-auth-form-side {
        padding: 20px 16px;
    }

    .hw-auth-form-wrapper {
        padding: 24px 16px;
    }

    .hw-auth-form-header h1 {
        font-size: 22px;
    }

    .hw-auth-avatar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .hw-auth-btn-row {
        flex-direction: column-reverse;
    }

    .hw-auth-btn-login {
        padding: 14px;
    }
}

/* ══════════════════════════════════════════════
   FOCUS RING — Accessibility
   ══════════════════════════════════════════════ */
:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible {
    outline: none;
}

/* ══════════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
