/* ==========================================================================
   ComfyUI Secure Portal - Premium Light-Theme Styling System
   ========================================================================== */

:root {
    /* Color Palette (LinkedIn Style Elegance) */
    --bg-dark: #f3f2ef;           /* LinkedIn Gray Canvas */
    --card-bg: #ffffff;           /* Clean White Cards */
    --border-color: #e0e0e0;      /* Subtle border */
    
    --text-primary: #191919;      /* LinkedIn Rich Black */
    --text-secondary: #5e5e5e;    /* Corporate Slate Gray */
    --text-muted: #848484;        /* Caption and Muted text */
    
    --violet-glow: #0a66c2;       /* LinkedIn Blue */
    --pink-glow: #004182;         /* LinkedIn Dark Blue for Active states */
    --rose-glow: #cc1016;         /* Standard Alert Red */
    
    --btn-grad: #0a66c2;          /* Solid Brand Blue */
    
    --success: #057642;           /* LinkedIn Green Success */
    --error: #cc1016;             /* LinkedIn Red Error */
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding: 40px 0;
}

/* Ambient glow (Completely Hidden for clean design) */
.bg-glow {
    display: none !important;
}

/* Container & Layout */
.container {
    width: 100%;
    max-width: 460px;
    padding: 24px;
    z-index: 10;
}

/* Elegant Light Card Styling */
.glass-card {
    background: var(--card-bg);
    border: 1px solid rgba(140, 140, 140, 0.2);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    animation: cardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.logo-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.logo {
    width: 64px;
    height: 64px;
    transition: transform 0.3s ease;
}

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

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.45;
    padding: 0 10px;
}

/* Loader Spinner Component */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    border-top-color: var(--violet-glow);
    animation: spin 0.8s linear infinite;
}

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

/* Forms styling */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.4s ease-out forwards;
}

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

.hidden {
    display: none !important;
}

/* Form Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.input-group input {
    width: 100%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.6);
    border-radius: 4px; /* LinkedIn Input Corner Radius */
    padding: 12px 14px;
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Input Focus States */
.input-group input:focus {
    border-color: var(--violet-glow);
    box-shadow: 0 0 0 1px var(--violet-glow);
}

.input-group:focus-within label {
    color: var(--violet-glow);
}

/* Buttons styling */
.btn-primary {
    position: relative;
    width: 100%;
    background: var(--violet-glow);
    border: none;
    border-radius: 24px; /* LinkedIn Pill shape */
    padding: 13px 20px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.15s ease-in-out;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary:hover {
    background: var(--pink-glow);
    box-shadow: 0 2px 8px rgba(10, 102, 194, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button loader */
.btn-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Notifications/Alerts */
.alert {
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(-10px);
}

.alert.show {
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 16px;
}

.alert.error {
    background: #fdf2f2;
    border: 1px solid rgba(240, 185, 185, 0.6);
    color: var(--error);
}

.alert.success {
    background: #e6f4ea;
    border: 1px solid rgba(190, 225, 205, 0.6);
    color: var(--success);
}

/* Footer layout */
.footer {
    margin-top: 24px;
    text-align: center;
}

.footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .input-group input,
    .input-group select,
    .input-group textarea,
    .pix-key-input {
        font-size: 16px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .glass-card {
        padding: 24px 20px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}

/* Password Complexity Requirements Indicator */
.password-requirements {
    background: #f9f9fb;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.password-requirements-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.requirement-item.valid {
    color: var(--success);
}

.requirement-item .req-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: bold;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.requirement-item.valid .req-icon {
    border-color: var(--success);
    background: rgba(5, 118, 66, 0.1);
    color: var(--success);
}
