/* Clientricks - Authentication Pages Styles */
/* Developed by Vedatricks Technologies Pvt Ltd */

:root {
    /* Professional Indigo Theme */
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #6366F1;
    --secondary: #1E293B;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #4338CA 100%);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-50);
    min-height: 100vh;
}

.auth-container {
    display: flex;
    min-height: 100vh;
}

.auth-left {
    flex: 1;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-branding {
    position: relative;
    z-index: 1;
    max-width: 480px;
    color: var(--white);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 48px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 22px;
}

.logo-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
}

.logo-text .highlight {
    opacity: 0.9;
}

.auth-branding h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.auth-branding p {
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 40px;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.feature-item i {
    font-size: 20px;
    opacity: 0.9;
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--white);
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 15px;
    color: var(--gray-500);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
}

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

.input-wrapper i:first-child {
    position: absolute;
    left: 16px;
    color: var(--gray-400);
    font-size: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--white);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--gray-400);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

.toggle-password:hover {
    color: var(--gray-500);
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-500);
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.forgot-link {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: var(--white);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: var(--gray-500);
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

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

.auth-divider span {
    padding: 0 16px;
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-400);
}

.badge i {
    color: var(--success);
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
}

.alert i {
    font-size: 18px;
    margin-top: 2px;
}

.alert-success {
    background: rgba(79, 70, 229, 0.1);
    color: var(--success);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

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

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-warning div {
    flex: 1;
}

.alert-warning strong {
    display: block;
    margin-bottom: 4px;
}

.alert-warning p {
    margin-bottom: 8px;
    font-size: 13px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Plan Selection */
.plan-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.plan-option {
    position: relative;
}

.plan-option input {
    position: absolute;
    opacity: 0;
}

.plan-option label {
    display: block;
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.plan-option input:checked + label {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.plan-option .plan-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.plan-option .plan-price {
    font-size: 13px;
    color: var(--gray-500);
}

.plan-option.popular label {
    border-color: var(--primary);
}

.plan-option.popular::after {
    content: 'Popular';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .auth-right {
        padding: 20px 16px;
    }

    .auth-card {
        padding: 24px 20px;
    }

    /* Prevent iOS zoom on inputs */
    .form-group input,
    .form-group select {
        font-size: 16px !important;
    }
}

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

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .plan-selector {
        grid-template-columns: 1fr;
    }

    .auth-header h2 {
        font-size: 24px;
    }

    .auth-header p {
        font-size: 14px;
    }

    .auth-card {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .btn-auth {
        padding: 14px 20px;
        font-size: 15px;
    }

    .form-group label {
        font-size: 13px;
    }

    .auth-footer {
        font-size: 13px;
    }

    .logo-text {
        font-size: 24px;
    }
}

/* ============================================= */
/* MOBILE-FIRST AUTH ENHANCEMENTS               */
/* ============================================= */

/* Mobile Logo Header */
.mobile-auth-logo {
    display: none;
    text-align: center;
    padding: 24px 20px;
    background: var(--gradient-primary);
}

.mobile-auth-logo .logo {
    display: inline-flex;
    justify-content: center;
}

.mobile-auth-logo .logo-icon {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-auth-logo .logo-text {
    color: var(--white);
}

.mobile-auth-logo .logo-text .highlight {
    color: rgba(255, 255, 255, 0.9);
}

/* Mobile-specific auth styles */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        min-height: 100vh;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .mobile-auth-logo {
        display: block;
    }

    .auth-form-container {
        flex: 1;
        padding: 24px 20px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
        display: flex;
        flex-direction: column;
    }

    .auth-form {
        flex: 1;
    }

    /* Touch-friendly inputs */
    .input-wrapper input {
        min-height: 52px;
        font-size: 16px !important;
        padding: 16px 16px 16px 48px;
    }

    .input-wrapper i:first-child {
        left: 16px;
        font-size: 18px;
    }

    .toggle-password {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Touch-friendly submit button */
    .btn-submit {
        min-height: 54px;
        font-size: 16px;
        border-radius: 14px;
    }

    /* Touch-friendly checkbox */
    .checkbox-label {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .checkbox-label input {
        width: 22px;
        height: 22px;
    }

    /* Forgot password link */
    .forgot-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 10px 0;
    }

    /* Auth footer */
    .auth-footer {
        padding: 16px 0;
        margin-top: auto;
    }

    .auth-footer a {
        padding: 8px 12px;
        display: inline-block;
    }

    /* Security badges */
    .security-badges {
        padding: 16px 0;
        margin-top: 16px;
        border-top: 1px solid var(--gray-100);
    }

    .badge {
        font-size: 11px;
    }

    /* Alerts */
    .alert {
        padding: 14px;
        font-size: 13px;
        border-radius: 10px;
    }

    .alert i {
        font-size: 16px;
    }

    /* Device conflict alert */
    .alert-warning .btn-link {
        min-height: 44px;
        padding: 10px 0;
    }

    /* Plan selector mobile */
    .plan-option label {
        min-height: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 16px;
    }
}

/* Extra small devices */
@media (max-width: 380px) {
    .auth-form-container {
        padding: 20px 16px;
    }

    .auth-header h2 {
        font-size: 22px;
    }

    .input-wrapper input {
        min-height: 48px;
        padding: 14px 14px 14px 44px;
    }

    .btn-submit {
        min-height: 50px;
    }

    .security-badges {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* iOS Safe Areas */
@supports (padding: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .auth-form-container {
            padding-bottom: calc(24px + env(safe-area-inset-bottom));
        }

        .btn-submit {
            margin-bottom: env(safe-area-inset-bottom);
        }
    }
}

/* Smooth transitions */
.input-wrapper input,
.btn-submit,
.toggle-password {
    transition: all 0.2s ease;
}

/* Focus states for accessibility */
.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.btn-submit:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.3);
}

/* Disable double-tap zoom on buttons */
.btn-submit,
.toggle-password,
.forgot-link,
.checkbox-label {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Loading state */
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit i.fa-spin {
    margin-right: 8px;
}
