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

:root {
    --primary: #7c6cfc;
    --primary-dark: #5a4de6;
    --secondary: #a777e3;
    --accent: #f093fb;
    --dark: #0f0e17;
    --surface: #1a1a2e;
    --light: #f8f9ff;
    --text-muted: #a0aec0;
    --border: rgba(255, 255, 255, 0.08);
    --danger: #ff6b6b;
    --success: #51cf66;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
    --shadow-glow: 0 0 40px rgba(124, 108, 252, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
}

body {
    background: var(--dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 15% 40%, rgba(124, 108, 252, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 85% 15%, rgba(167, 119, 227, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 85%, rgba(240, 147, 251, 0.1) 0%, transparent 50%);
    animation: bgMove 18s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes bgMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-4%, 4%) rotate(1.5deg); }
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(124,108,252,0.35) 1px, transparent 1px),
        radial-gradient(circle, rgba(167,119,227,0.25) 1px, transparent 1px);
    background-size: 80px 80px, 120px 120px;
    background-position: 0 0, 40px 40px;
    opacity: 0.25;
    z-index: 0;
}

/* Register Container */
.register-container {
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.register-form {
    background: rgba(26, 26, 46, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.4),
        var(--shadow-glow),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Brand */
.brand {
    text-align: center;
    margin-bottom: 32px;
}

.brand-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(124, 108, 252, 0.5);
}

.register-form h2 {
    text-align: center;
    color: #fff;
    margin-bottom: 6px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
}

/* Form Elements */
.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #c8d3e8;
    font-weight: 500;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.3s;
    pointer-events: none;
}

.form-group input,
.form-group select,
.form-control {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 11px !important;
    font-size: 14px;
    color: #fff !important;
    transition: all 0.3s ease;
    outline: none;
    -webkit-appearance: none;
}

.form-group input::placeholder,
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group input:focus,
.form-group select:focus,
.form-control:focus {
    border-color: var(--primary) !important;
    background: rgba(124, 108, 252, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(124, 108, 252, 0.15) !important;
    color: #fff !important;
}

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

/* Input group (for password toggle) */
.input-group {
    position: relative;
    display: flex;
}

.input-group .form-control {
    border-right: none !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.input-group .btn-outline-secondary {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-left: none !important;
    color: var(--text-muted) !important;
    padding: 10px 14px;
    border-top-right-radius: 11px !important;
    border-bottom-right-radius: 11px !important;
    cursor: pointer;
    transition: all 0.3s;
}

.input-group .btn-outline-secondary:hover {
    background: rgba(124,108,252,0.15) !important;
    color: var(--primary) !important;
}

/* Password strength */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.strength-meter {
    height: 100%;
    width: 0%;
    transition: width 0.4s, background-color 0.4s;
    border-radius: 4px;
}

.text-muted {
    color: var(--text-muted) !important;
    font-size: 12px;
}

.text-danger { color: #ff9999 !important; font-size: 12px; }
.text-warning { color: #ffd166 !important; font-size: 12px; }
.text-success { color: #82e09c !important; font-size: 12px; }

/* Form row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* Register button */
.btn-register,
.btn.btn-primary.btn-register {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(124, 108, 252, 0.4) !important;
    letter-spacing: 0.3px;
}

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

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

.btn-register:hover,
.btn.btn-primary.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(124, 108, 252, 0.5) !important;
}

/* Login link */
.login-link {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.login-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.login-link a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.alert-error {
    background: rgba(255, 107, 107, 0.12);
    color: #ff9999;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.alert-success {
    background: rgba(81, 207, 102, 0.12);
    color: #82e09c;
    border: 1px solid rgba(81, 207, 102, 0.3);
}

/* Password match indicator */
#password-match {
    font-size: 12px;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 540px) {
    .register-form {
        padding: 36px 20px;
        border-radius: 20px;
    }

    .register-form h2 { font-size: 22px; }
}
