/* SphereSolutions Branding - Extracted from Original Project */
:root {
    --primary-color: #00D9FF;
    --primary-dark: #00B8D9;
    --primary-light: #33E5FF;
    --accent-cyan: #00D9FF;
    --accent-green: #00E5A0;
    --gradient-primary: linear-gradient(135deg, #00D9FF 0%, #00B8D9 100%);
    --gradient-secondary: linear-gradient(135deg, #00D9FF 0%, #00E5A0 100%);
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-tertiary: #64748B;
    
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --font-family: 'Overpass', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(
        135deg,
        #0F172A 0%,
        #1E293B 25%,
        #0F172A 50%,
        #1E293B 75%,
        #0F172A 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 217, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 229, 160, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .auth-container {
    direction: rtl;
}

[dir="rtl"] .form-group {
    text-align: right;
}

[dir="rtl"] .form-group input {
    text-align: right;
}

[dir="rtl"] .form-group label {
    right: 0;
    left: auto;
}

/* Auth Container */
.auth-wrapper {
    width: 100%;
    max-width: 1000px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 550px;
    position: relative;
    z-index: 1;
}

.auth-left {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    color: white;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.auth-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 25px,
            rgba(255, 255, 255, 0.08) 25px,
            rgba(255, 255, 255, 0.08) 50px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 25px,
            rgba(255, 255, 255, 0.08) 25px,
            rgba(255, 255, 255, 0.08) 50px
        );
    background-size: 200px 200px;
    animation: meshMove 15s linear infinite;
    pointer-events: none;
    z-index: 2;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.3) 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.7) 30%, rgba(0, 0, 0, 0.3) 70%, transparent 100%);
}

.auth-left .mesh-gradient-overlay {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(138, 43, 226, 0.4) 0%,
        rgba(0, 102, 255, 0.4) 25%,
        rgba(0, 217, 255, 0.4) 50%,
        rgba(255, 140, 0, 0.4) 75%,
        rgba(138, 43, 226, 0.4) 100%
    );
    background-size: 200% 100%;
    animation: meshColorShift 8s ease-in-out infinite;
    mix-blend-mode: multiply;
    opacity: 0.6;
    pointer-events: none;
    z-index: 3;
}

@keyframes meshMove {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 200px 200px, -200px -200px;
    }
}

@keyframes meshColorShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.auth-left-content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;
    padding: 15px;
}

.auth-logo {
    width: 200px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.auth-logo:hover {
    transform: scale(1.05);
}

.auth-left h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: white;
    line-height: 1.3;
}

.auth-left p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
}

.auth-features {
    list-style: none;
    text-align: right;
    margin-top: 24px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.85rem;
    justify-content: flex-end;
}

[dir="rtl"] .auth-features li {
    justify-content: flex-start;
}

.auth-features li svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.auth-right {
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-primary);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 16px;
}

.mobile-logo img {
    width: 180px;
    height: auto;
    display: inline-block;
}

.auth-header .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

.password-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 0;
    margin-top: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    font-family: var(--font-family);
}

.password-checkbox:hover {
    color: var(--primary-color);
}

.password-checkbox.active {
    color: var(--primary-color);
}

.password-checkbox.active svg {
    display: block !important;
    color: var(--primary-color);
}

.password-checkbox svg {
    width: 18px;
    height: 18px;
    display: none;
    flex-shrink: 0;
}

.checkbox-label {
    user-select: none;
}

.form-group.password-field {
    position: relative;
}

.form-group.password-field input {
    padding-left: 16px;
    padding-right: 16px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.8rem;
}

[dir="rtl"] .form-options {
    flex-direction: row-reverse;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.remember-me label {
    margin: 0;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 11px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
}

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

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

.btn-secondary {
    background: var(--bg-primary);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

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

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary-dark);
    border: 1px solid rgba(0, 217, 255, 0.2);
}

/* Decorative Elements */
.auth-stats {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-stat {
    text-align: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 70px;
}

.auth-stat-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.auth-stat-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.auth-badge {
    display: block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin: 0 auto 20px;
    width: fit-content;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-wrapper {
        max-width: 900px;
    }
    
    .auth-left {
        padding: 35px 25px;
    }
    
    .auth-left h1 {
        font-size: 1.5rem;
    }
    
    .auth-logo {
        width: 180px;
    }
}

@media (max-width: 968px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-width: 450px;
        min-height: auto;
    }
    
    .auth-left {
        display: none;
    }
    
    .auth-right {
        padding: 35px 28px;
    }

    .mobile-logo {
        display: block;
    }
}

@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .auth-wrapper {
        border-radius: 14px;
        min-height: auto;
    }
    
    .auth-right {
        padding: 30px 24px;
    }
    
    .auth-header h2 {
        font-size: 1.35rem;
    }
    
    .auth-header p {
        font-size: 0.8rem;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .form-group label {
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .auth-stats {
        gap: 10px;
        margin-top: 16px;
    }
    
    .auth-stat {
        padding: 8px 12px;
        min-width: 60px;
    }
    
    .auth-stat-number {
        font-size: 1.1rem;
    }
    
    .auth-stat-label {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .auth-wrapper {
        border-radius: 12px;
        max-width: 100%;
    }
    
    .auth-right {
        padding: 24px 20px;
    }
    
    .auth-header {
        margin-bottom: 20px;
    }
    
    .auth-header h2 {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }
    
    .auth-header p {
        font-size: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-group input {
        padding: 9px 12px;
        font-size: 0.85rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 16px;
    }
    
    [dir="rtl"] .form-options {
        align-items: flex-end;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .auth-footer {
        margin-top: 16px;
        font-size: 0.75rem;
    }
    
    .auth-stats {
        gap: 8px;
        margin-top: 14px;
    }
    
    .auth-stat {
        padding: 8px 10px;
        min-width: 55px;
    }
    
    .auth-stat-number {
        font-size: 1rem;
    }
    
    .auth-stat-label {
        font-size: 0.55rem;
    }
    
    .auth-badge {
        font-size: 0.7rem;
        padding: 5px 10px;
        margin-bottom: 12px;
    }
    
    .auth-features li {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
}

/* Loading State */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

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

/* Selection */
::selection {
    background: rgba(0, 217, 255, 0.2);
    color: var(--text-primary);
}

