/**
 * Silva Auth Forms - Premium Split-Screen Edition
 * Optimized for conversion, brand consistency, and exceptional UX
 * Brand Blue: #014385
 */

:root {
    --silva-blue: #014385;
    --silva-blue-dark: #001540;
    --silva-blue-light: #0A5CAA;
    --silva-gold: #FFC107;
    --font-poppins: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Centered Single-Column Layout */
.silva-auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f1f8 100%);
    padding: 1rem;
}

.silva-auth-content {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

/* Logo Circle */
.silva-logo-circle {
    width: 90px;
    height: 90px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #014385 0%, #0A5CAA 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.125rem;
    box-shadow: 0 8px 24px rgba(1, 67, 133, 0.25);
}

.silva-logo {
    width: 100%;
    height: auto;
    display: block;
}

/* Brand Name */
.silva-brand-name {
    font-size: 1rem;
    font-weight: 700;
    color: #014385;
    letter-spacing: 0.075em;
    margin: 0 0 1rem 0;
    font-family: var(--font-poppins);
}

/* Header */
.silva-auth-header {
    margin-bottom: 1.25rem;
}

.silva-auth-header h2 {
    font-size: 1.625rem;
    font-weight: 700;
    color: #014385;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    font-family: var(--font-poppins);
}

.silva-auth-header p {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
    font-family: var(--font-poppins);
}

/* Messages */
.silva-auth-message {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-left: 3px solid;
    font-family: var(--font-poppins);
}

.silva-auth-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.silva-auth-success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

/* Form */
.silva-auth-form {
    width: 100%;
    text-align: left;
}

.silva-form-group {
    margin-bottom: 0.875rem;
}

.silva-form-group label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-family: var(--font-poppins);
}

.silva-form-control {
    width: 100%;
    padding: 0.75rem 0.875rem;
    font-size: 0.9375rem;
    color: #1e293b;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: var(--font-poppins);
}

.silva-form-control:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.silva-form-control:focus {
    outline: none;
    border-color: #014385;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(1, 67, 133, 0.1);
}

.silva-form-control::placeholder {
    color: #94a3b8;
}

/* Password Toggle */
.silva-password-wrapper {
    position: relative;
}

.silva-password-wrapper .silva-form-control {
    padding-right: 3rem;
}

.silva-password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    transform: none;
    background: transparent;
    border: none;
    border-left: 1px solid #e2e8f0;
    cursor: pointer;
    padding: 0;
    color: #6b7280;
    transition: color 0.2s ease;
    height: 100%;
    width: 2.75rem;
    border-radius: 0 10px 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.silva-password-toggle:hover {
    color: #6b7280;
    background: transparent;
}

.silva-password-toggle:focus {
    outline: none;
    background: transparent;
}

.silva-eye-icon {
    width: 18px;
    height: 18px;
}

/* Checkbox */
.silva-form-checkbox {
    margin-bottom: 1rem;
}

.silva-form-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.875rem;
}

.silva-form-checkbox input {
    margin-right: 0.5rem;
    accent-color: #014385;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Buttons */
.silva-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-poppins);
    text-decoration: none;
    display: block;
    box-shadow: none;
}

.silva-btn-primary {
    background: #014385;
    color: #ffffff;
    box-shadow: none;
}

.silva-btn-primary:hover {
    background: #0A5CAA;
    transform: none;
    box-shadow: none;
}

.silva-btn-primary:active {
    transform: none;
}

.silva-btn-secondary {
    background: transparent;
    color: #014385;
    border: 2px solid #014385;
}

.silva-btn-secondary:hover {
    background: #014385;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 67, 133, 0.2);
}

/* Links */
.silva-auth-links {
    text-align: center;
    margin-top: 0.875rem;
    font-size: 0.875rem;
}

.silva-link {
    color: #014385;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-poppins);
}

.silva-link:hover {
    color: #0A5CAA;
    text-decoration: underline;
}

/* Footer - Signup Section */
.silva-auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
}

.silva-auth-footer span {
    margin-right: 0.375rem;
}

.silva-signup-link {
    color: #014385;
    text-decoration: none;
    font-weight: 600;
}

.silva-signup-link:hover {
    color: #0A5CAA;
    text-decoration: underline;
}

/* Responsive Design */

/* Tablet Landscape & Small Desktops (768px - 1024px) */
@media (max-width: 1024px) {
    .silva-auth-container {
        padding: 2rem 1.5rem;
    }
    
    .silva-auth-content {
        max-width: 400px;
    }
}

/* Tablet Portrait (641px - 768px) */
@media (max-width: 768px) {
    .silva-auth-container {
        padding: 1.75rem 1.25rem;
    }
    
    .silva-logo-circle {
        width: 90px;
        height: 90px;
        margin-bottom: 1.25rem;
    }
    
    .silva-brand-name {
        font-size: 1.0625rem;
        margin-bottom: 1.75rem;
    }
    
    .silva-auth-header h2 {
        font-size: 1.625rem;
    }
    
    .silva-auth-header p {
        font-size: 0.8125rem;
    }
}

/* Mobile Devices (375px - 640px) */
@media (max-width: 640px) {
    .silva-auth-container {
        padding: 1.5rem 1rem;
    }
    
    .silva-logo-circle {
        width: 85px;
        height: 85px;
        margin-bottom: 1.25rem;
        padding: 1rem;
    }
    
    .silva-brand-name {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .silva-auth-header {
        margin-bottom: 1.5rem;
    }
    
    .silva-auth-header h2 {
        font-size: 1.5rem;
    }
    
    .silva-auth-header p {
        font-size: 0.8125rem;
        line-height: 1.4;
    }
    
    .silva-form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.8125rem 0.875rem;
    }
    
    .silva-btn {
        padding: 0.9375rem 1.5rem;
    }
    
    .silva-form-group {
        margin-bottom: 1rem;
    }
}

/* Small Mobile Devices (below 375px) */
@media (max-width: 374px) {
    .silva-auth-container {
        padding: 1rem 0.75rem;
    }
    
    .silva-logo-circle {
        width: 75px;
        height: 75px;
        padding: 0.875rem;
    }
    
    .silva-brand-name {
        font-size: 0.9375rem;
        margin-bottom: 1.25rem;
    }
    
    .silva-auth-header h2 {
        font-size: 1.375rem;
    }
    
    .silva-auth-header p {
        font-size: 0.75rem;
    }
    
    .silva-form-control {
        padding: 0.75rem 0.75rem;
    }
    
    .silva-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .silva-auth-footer {
        font-size: 0.8125rem;
    }
}

/* Landscape Mode on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .silva-auth-container {
        padding: 1rem;
        align-items: flex-start;
        overflow-y: auto;
    }
    
    .silva-logo-circle {
        width: 70px;
        height: 70px;
        margin-bottom: 0.75rem;
    }
    
    .silva-brand-name {
        margin-bottom: 1rem;
        font-size: 0.9375rem;
    }
    
    .silva-auth-header {
        margin-bottom: 1rem;
    }
    
    .silva-auth-header h2 {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }
    
    .silva-auth-header p {
        font-size: 0.75rem;
    }
    
    .silva-form-group {
        margin-bottom: 0.75rem;
    }
    
    .silva-form-control {
        padding: 0.625rem 0.75rem;
    }
    
    .silva-btn {
        padding: 0.75rem 1.25rem;
    }
    
    .silva-auth-footer {
        margin-top: 1rem;
    }
}

/* Toast Notifications */
.silva-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.silva-toast {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    gap: 0.75rem;
    min-width: 300px;
    animation: silvaToastIn 0.3s ease-out;
    border-left: 4px solid #014385;
}

.silva-toast.success { border-left-color: #22c55e; }
.silva-toast.error { border-left-color: #ef4444; }

@keyframes silvaToastIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
