:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #2e1065 100%);
    position: relative;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.18) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: pulseBg 8s ease-in-out infinite;
}
body::after {
    content: '';
    position: fixed;
    top: 0; right: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: pulseBg 8s ease-in-out infinite reverse;
}
@keyframes pulseBg {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Floating shapes */
.shape {
    position: fixed;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
    z-index: 0;
}
.shape-1 { width: 300px; height: 300px; top: -100px; left: -100px; animation-delay: 0s; }
.shape-2 { width: 200px; height: 200px; bottom: 50px; right: 50px; animation-delay: 5s; animation-duration: 25s; }
.shape-3 { width: 150px; height: 150px; top: 40%; right: -50px; animation-delay: 2s; animation-duration: 18s; }
.shape-4 { width: 250px; height: 250px; bottom: 20%; left: -80px; animation-delay: 7s; animation-duration: 22s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-30px) translateX(20px); }
    50% { transform: translateY(20px) translateX(-15px); }
    75% { transform: translateY(-15px) translateX(-25px); }
}

.auth-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

/* ========== LEFT CONTENT ========== */
.auth-content {
    color: white;
    animation: slideInLeft 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.content-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: #e0e7ff;
}
.content-badge i { color: #a5b4fc; }

.auth-content h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #a78bfa 60%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-content > p {
    font-size: 1rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    margin-top: 1rem;
}

.benefit-card {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.benefit-card:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(3px);
}

.benefit-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a5b4fc;
    font-size: 1.05rem;
    flex-shrink: 0;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.benefit-text h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.15rem;
}
.benefit-text p {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

/* ========== AUTH CARD ========== */
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    padding: 2rem;
    animation: slideInRight 0.8s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.auth-header {
    text-align: center;
    margin-bottom: 1.4rem;
}

.auth-header .logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35); }
    50% { transform: scale(1.05); box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5); }
}

.auth-header h2 {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, #1e293b 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: #64748b;
    font-size: 0.85rem;
}

/* ========== FORM ========== */
.auth-form {
    display: grid;
    gap: 0.75rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.input-group {
    position: relative;
    transition: all 0.3s;
}

.input-group i.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.92rem;
    transition: color 0.3s;
    z-index: 1;
    pointer-events: none;
}

.input-group .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.92rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1;
    background: transparent;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.input-group .toggle-password:hover { color: var(--primary); }

/* Inputs & Selects — SAME PADDING/HEIGHT */
.auth-form input,
.auth-form select {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 13px;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    background: #f8fafc;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    font-weight: 500;
}

.auth-form input.password-input {
    padding-right: 42px;
}

.auth-form input::placeholder {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 400;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.input-group:has(input:focus) i.input-icon,
.input-group:has(select:focus) i.input-icon {
    color: var(--primary);
}

/* ========== SELECT GROUP (Shtet & Qytet) ========== */
.input-group.select-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 38px;
    color: #0f172a;
    font-weight: 500;
}

.input-group.select-group select:required:invalid {
    color: #94a3b8;
    font-weight: 400;
}

.input-group.select-group select option {
    color: #0f172a;
    font-weight: 500;
    padding: 8px;
}

/* Shigjeta e vetme — pas select */
.input-group.select-group::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 11px;
    transition: color 0.3s;
    z-index: 2;
}

.input-group.select-group:focus-within::after {
    color: var(--primary);
}

.input-group.select-group.error select {
    border-color: var(--danger);
    background: #fef2f2;
}
.input-group.select-group.error i.input-icon,
.input-group.select-group.error::after {
    color: var(--danger);
}

/* ========== PASSWORD STRENGTH ========== */
.password-strength {
    margin-top: 0.3rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: #f8fafc;
    display: none;
    border: 1px solid #e2e8f0;
}
.password-strength.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.strength-meter {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.35rem;
}
.strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
    background: var(--danger);
}
.strength-bar.weak { width: 33%; background: linear-gradient(90deg, #ef4444, #f87171); }
.strength-bar.medium { width: 66%; background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.strength-bar.strong { width: 100%; background: linear-gradient(90deg, #10b981, #34d399); }

.strength-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}
.strength-text.weak { color: #dc2626; }
.strength-text.medium { color: #ea580c; }
.strength-text.strong { color: #059669; }

/* ========== CHECKBOX ========== */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0.6rem 0 0.2rem;
    padding: 0.65rem 0.8rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    transition: all 0.25s ease;
}
.checkbox-wrapper:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.checkbox-wrapper input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}
.checkbox-wrapper label {
    color: #475569;
    font-size: 0.78rem;
    cursor: pointer;
    line-height: 1.45;
    font-weight: 500;
}
.checkbox-wrapper a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}
.checkbox-wrapper a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ========== BUTTON ========== */
.auth-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
    margin-top: 0.4rem;
    letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.6s;
}
.auth-btn:hover::before { left: 100%; }
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.45);
}
.auth-btn:active { transform: translateY(-1px); }
.auth-btn:disabled {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px 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); } }

/* ========== MESSAGES ========== */
.message {
    padding: 0.7rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: slideDown 0.4s ease;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}
.success-message {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.input-group.error input {
    border-color: var(--danger);
    background: #fef2f2;
}
.input-group.error i.input-icon { color: var(--danger); }

/* ========== DIVIDER ========== */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0 0.8rem;
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 500;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ========== FOOTER ========== */
.auth-footer {
    text-align: center;
    padding-top: 0.8rem;
    border-top: 1px solid #e2e8f0;
}
.auth-footer p {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.auth-footer a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}
.auth-footer a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s;
}
.back-home:hover {
    color: var(--primary);
    transform: translateX(-3px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 520px;
    }
    .auth-card {
        max-width: 520px;
        margin: 0 auto;
        padding: 1.8rem;
    }
    .auth-content {
        text-align: center;
        display: none;
    }
}

@media (max-width: 640px) {
    .auth-wrapper { padding: 0.8rem; }
    .auth-card { padding: 1.4rem 1.2rem; border-radius: 22px; }
    .auth-header h2 { font-size: 1.35rem; }
    .auth-header .logo { width: 54px; height: 54px; font-size: 1.5rem; }
    .form-row { grid-template-columns: 1fr; gap: 0.75rem; }
    .auth-form input,
    .auth-form select { height: 44px; font-size: 0.88rem; }
    .input-group i.input-icon { left: 13px; font-size: 0.85rem; }
}

@media (max-height: 800px) and (min-width: 641px) {
    .auth-wrapper { padding: 1rem; }
    .auth-card { padding: 1.6rem; }
    .auth-header .logo { width: 52px; height: 52px; font-size: 1.5rem; margin-bottom: 0.8rem; }
    .auth-header h2 { font-size: 1.4rem; }
    .benefit-card { padding: 0.8rem; }
}