/* ===========================================
   C4-AI Customer Panel - Auth Styles
   Professional Login/Register
   =========================================== */

/* Auth Container */
.auth-container {
    display: flex;
    min-height: 100vh;
    background: var(--sidebar-bg, #0f172a);
}

/* Branding Side */
.auth-branding {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--primary-dark, #4f46e5) 100%);
    position: relative;
    overflow: hidden;
}

.brand-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
}

.brand-pattern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: rotate(-15deg);
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
    text-align: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    margin-bottom: 32px;
}

.brand-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.brand-logo .logo-icon svg {
    width: 30px;
    height: 30px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.brand-content h1 {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px;
}

.brand-content > p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 40px;
    line-height: 1.7;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: right;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.brand-feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-4px);
}

.brand-feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.brand-feature-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.brand-feature span {
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    font-weight: 500;
}

/* Form Section */
.auth-form-section {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--sidebar-bg, #0f172a);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 380px;
}

/* Top Nav */
.auth-top-nav {
    margin-bottom: 32px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--sidebar-hover, #1e293b);
    color: var(--text-muted, #94a3b8);
    border-radius: 10px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.back-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light, #818cf8);
}

.back-link svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

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

.auth-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-light, #f8fafc);
    margin: 0 0 8px;
}

.auth-header p {
    color: var(--text-muted, #94a3b8);
    font-size: 14px;
    margin: 0;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--sidebar-hover, #1e293b);
    border-radius: 12px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.auth-tab:hover {
    color: var(--text-secondary, #64748b);
}

.auth-tab.active {
    background: var(--primary, #6366f1);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Message */
.auth-message {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
    text-align: center;
}

.auth-message.show {
    display: block;
}

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

.auth-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form.hidden {
    display: none;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form .form-group label {
    color: var(--text-secondary, #64748b);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.auth-form .input-wrapper {
    position: relative;
}

.auth-form .input-wrapper input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 48px;
    background: var(--sidebar-hover, #1e293b);
    border: 1px solid var(--border-dark, #334155);
    border-radius: 12px;
    color: var(--text-light, #f8fafc);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s;
}

.auth-form .input-wrapper input::placeholder {
    color: var(--text-muted, #94a3b8);
}

.auth-form .input-wrapper input:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-form .input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted, #94a3b8);
    pointer-events: none;
}

.auth-form .input-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Submit Button */
.btn-submit {
    position: relative;
    padding: 16px 24px;
    font-size: 15px;
    border-radius: 12px;
}

.btn-submit .btn-text {
    transition: opacity 0.2s;
}

.btn-submit .btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .btn-loading {
    opacity: 1;
    visibility: visible;
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border-dark, #334155);
}

.auth-footer p {
    color: var(--text-muted, #94a3b8);
    font-size: 14px;
    margin: 0;
}

.auth-footer a {
    color: var(--primary-light, #818cf8);
    font-weight: 500;
    text-decoration: none;
    margin-right: 6px;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--primary, #6366f1);
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-branding {
        display: none;
    }
    
    .auth-form-section {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-form-section {
        padding: 24px;
    }
    
    .auth-form-wrapper {
        max-width: 100%;
    }
    
    .auth-header h2 {
        font-size: 22px;
    }
}
