/* ===== VARIABLES ===== */
:root {
    /* Colores primarios (por defecto) */
    --primary: #2563eb;
    --secondary: #10b981;
    --accent: #8b5cf6;
    
    /* Fondos y superficies */
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --surface-light: #ffffff;
    --surface-dark: #1e293b;
    --border-light: #e2e8f0;
    --border-dark: #334155;
    
    /* Texto */
    --text-light: #0f172a;
    --text-dark: #f1f5f9;
    --text-muted: #64748b;
    
    /* Estado */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Espaciado */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Transiciones */
    --transition: all 0.2s ease;
}

/* Modo oscuro */
body.dark {
    --bg-light: #0f172a;
    --bg-dark: #020617;
    --surface-light: #1e293b;
    --surface-dark: #0f172a;
    --border-light: #334155;
    --border-dark: #475569;
    --text-light: #f1f5f9;
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
}

/* Tema de impresión (modo ahorro tinta) */
@media print {
    body {
        background: white ;
        color: black ;
    }
    .sidebar, .main-header, .btn, .modal, #darkmode-toggle, .user-profile {
        display: none ;
    }
    .invoice-card {
        box-shadow: none ;
        border: 1px solid #000 ;
        background: white ;
    }
    * {
        color: black ;
        background: transparent ;
    }
}

/* ===== RESET / BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
    height: 100vh;
    overflow: hidden;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* App layout */
.app {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 80px;
    background-color: var(--surface-light);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: width 0.3s, background-color 0.3s, border-color 0.3s;
    overflow-y: auto;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}
.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none; /* Chrome/Safari */
}

/* Expandir en pantallas grandes */
@media (min-width: 1024px) {
    .sidebar {
        width: 280px;
    }
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (min-width: 1024px) {
    .sidebar-header {
        justify-content: flex-start;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.logo .material-icons-round {
    font-size: 2rem;
    color: white;
    background: var(--primary);
    padding: var(--space-xs);
    border-radius: 0.5rem;
}
.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    color: var(--text-light);
    display: none;
}
@media (min-width: 1024px) {
    .logo-text {
        display: block;
    }
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-lg) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    padding-left: var(--space-sm);
    display: none;
}
@media (min-width: 1024px) {
    .nav-section-title {
        display: block;
    }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-sm);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
    position: relative;
}
.nav-item:hover {
    background-color: rgba(0,0,0,0.05);
}
.dark .nav-item:hover {
    background-color: rgba(255,255,255,0.05);
}
.nav-item .material-icons-round {
    font-size: 1.25rem;
}
.nav-label {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    flex: 1;
}
@media (min-width: 1024px) {
    .nav-label {
        display: block;
    }
}

.nav-select {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.875rem;
    text-align: right;
    cursor: pointer;
    display: none;
}
@media (min-width: 1024px) {
    .nav-select {
        display: block;
    }
}

.color-dots {
    display: flex;
    gap: var(--space-xs);
}
@media (min-width: 1024px) {
    .color-dots {
        display: flex;
    }
}
.color-dot {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}
.color-dot:hover {
    transform: scale(1.2);
}

/* Lista de navegación */
.nav-section ul {
    list-style: none;
}
.nav-link {
     display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1rem;  
    border-radius: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 0.25rem;
    white-space: nowrap;  
}
.nav-link:hover, .nav-link.active {
    background-color: var(--primary);
    color: white;
}
.nav-link .material-icons-round {
    font-size: 1.25rem;
    min-width: 1.5rem;
}

.sidebar-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--border-light);
}

/* Switch para dark mode */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-left: auto;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-light);
    transition: .2s;
    border-radius: 20px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--primary);
}
input:checked + .slider:before {
    transform: translateX(20px);
}

/* Perfil de usuario */
.user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm);
    border-radius: 0.5rem;
    cursor: pointer;
}
.user-profile:hover {
    background-color: rgba(0,0,0,0.05);
}
.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}
.user-info {
    display: none;
}
@media (min-width: 1024px) {
    .user-info {
        display: block;
        line-height: 1.2;
    }
}
.user-info p:first-child {
    font-weight: 600;
    font-size: 0.9rem;
}
.user-info p:last-child {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-light);
}

.main-header {
    height: 4rem;
    background-color: var(--surface-light);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    flex-shrink: 0;
}
.main-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
}
.breadcrumb {
    color: var(--text-muted);
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-light);
}
.btn-outline {
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-light);
}
.btn-outline:hover {
    background: var(--bg-light);
    border-color: var(--text-muted);
}
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}
.btn-primary:hover {
    filter: brightness(0.9);
}
.btn-secondary {
    background: var(--secondary);
    color: white;
    border: none;
}
.btn-secondary:hover {
    filter: brightness(0.9);
}
.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}
.btn-danger:hover {
    filter: brightness(0.9);
}
.divider-vertical {
    width: 1px;
    height: 1.5rem;
    background: var(--border-light);
}

.view-container {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    background: var(--bg-light);
}

/* ===== INVOICE EDITOR VIEW ===== */
.invoice-card {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--surface-light);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    position: relative;
    transition: background-color 0.3s;
}
.invoice-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.invoice-badge .material-icons-round {
    font-size: 1rem;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.logo-upload:hover .upload-overlay {
    opacity: 1;
}
.invoice-title {
    text-align: right;
}
.invoice-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -0.025em;
    margin-bottom: var(--space-sm);
}
.invoice-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}
.invoice-meta label {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.invoice-meta input {
    width: 100px;
    text-align: right;
    border: none;
    border-bottom: 1px dashed var(--border-light);
    background: transparent;
    color: var(--text-light);
    font-family: monospace;
    padding: 0.125rem 0;
}
.invoice-meta input:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

.invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-top: 2rem;
    margin-bottom: var(--space-xl);
}
.party label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}
.party input, .party textarea {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.95rem;
}
.party input {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}
.party textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}
.party input:focus, .party textarea:focus {
    outline: none;
    border-bottom: 1px dashed var(--border-light);
}

/* Tabla de items */
.items-table {
    margin-bottom: var(--space-xl);
}
.table-header {
    display: grid;
    grid-template-columns: 6fr 1fr 1fr 1fr 0.5fr;
    gap: var(--space-sm);
    background: var(--bg-light);
    padding: var(--space-sm) var(--space-md);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}
.item-row {
    display: grid;
    grid-template-columns: 6fr 1fr 1fr 1fr 0.5fr;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: 0.5rem;
    transition: var(--transition);
    border: 1px solid transparent;
    align-items: start;
}
.item-row:hover {
    background: var(--bg-light);
    border-color: var(--border-light);
}
.item-row textarea, .item-row input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 0.25rem 0;
}
.item-row textarea {
    resize: vertical;
    min-height: 40px;
}
.item-row input {
    text-align: right;
}
.item-row .item-amount {
    font-weight: 600;
    color: var(--text-light);
    text-align: right;
}
.delete-item {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.item-row:hover .delete-item {
    opacity: 1;
}
.add-item-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: var(--space-sm);
}
.add-item-btn:hover {
    text-decoration: underline;
}

/* Totales */
.invoice-totals {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
}
.notes {
    flex: 1;
    max-width: 400px;
}
.notes label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: var(--space-sm);
}
.notes textarea {
    width: 100%;
    background: var(--bg-light);
    border: none;
    border-radius: 0.5rem;
    padding: var(--space-md);
    color: var(--text-light);
    resize: vertical;
    min-height: 100px;
}
.totals {
    width: 300px;
}
.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    font-size: 0.875rem;
}
.total-row.total {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}
.totals input {
    width: 80px;
    text-align: right;
    border: none;
    border-bottom: 1px dashed var(--border-light);
    background: transparent;
    color: var(--text-light);
}
.totals input:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

/* Vista de facturas list */
.invoices-list, .clients-list {
    background: var(--surface-light);
    border-radius: 1rem;
    padding: var(--space-lg);
}
.invoice-item, .client-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}
.invoice-item:last-child, .client-item:last-child {
    border-bottom: none;
}
.invoice-actions, .client-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.modal-content {
    background-color: var(--surface-light);
    margin: 10% auto;
    padding: var(--space-xl);
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    position: relative;
}
.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}
#email-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-md);
}
#email-form input, #email-form textarea {
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    border-radius: 0.25rem;
    background: var(--surface-light);
    color: var(--text-light);
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-light);
}
.login-container {
    width: 100%;
    max-width: 400px;
    padding: var(--space-lg);
}
.login-card {
    background: var(--surface-light);
    border-radius: 1rem;
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.login-card .logo {
    justify-content: center;
    margin-bottom: var(--space-lg);
}
.login-card h2 {
    margin-bottom: var(--space-lg);
}
.btn-block {
    width: 100%;
    margin-bottom: var(--space-md);
}
.text-muted {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Mejoras para el modal de registro */
#register-modal .modal-content {
    max-width: 400px;
}

#register-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

#register-form label {
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-muted);
}

#register-form input {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    background: var(--surface-light);
    color: var(--text-light);
    width: 100%;
}

#register-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.company-logo {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    object-fit: cover;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--surface-light);
    color: var(--text-light);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    border-left: 4px solid;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast .material-icons-round {
    font-size: 1.25rem;
}

.toast.success .material-icons-round {
    color: var(--success);
}

.toast.error .material-icons-round {
    color: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mejoras para el logo upload */
.logo-upload {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: var(--transition);
    min-width: 100px;
    min-height: 60px;
    max-width: 300px;
    max-height: 150px;
    border: 2px dashed var(--border-light);
    background: var(--bg-light);
    color: var(--text-muted);
}
/* Cuando no hay imagen, tamaño fijo y texto */
.logo-upload:not(:has(img[src]:not([src=""]))) {
    width: 200px;
    height: 100px;
}
.logo-upload:not(:has(img[src]:not([src=""])))::before {
    content: "🖼️ Logo";
    font-size: 0.875rem;
    opacity: 0.7;
}
/* La imagen dentro */
.logo-upload img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
/* Overlay para hover */
.logo-upload .upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.875rem;
}
.logo-upload:hover .upload-overlay {
    opacity: 1;
}
/* Cuando hay imagen y se hace hover, mostrar borde sólido para indicar que es clickeable */
.logo-upload:has(img[src]:not([src=""])):hover {
    border-color: var(--primary);
}
/* Cuando hay imagen, el contenedor se adapta al tamaño de la imagen */
.logo-upload:has(img[src]:not([src=""])) {
    border: 2px solid transparent; /* Borde invisible por defecto */
    background: transparent;
    width: auto;
    height: auto;
    padding: 0; /* Sin padding extra */
}
.logo-upload:has(img[src]:not([src=""]))::before {
    display: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE PROFESIONAL ===== */
@media (max-width: 1023px) {
    .sidebar {
        width: 80px;
    }
    
    /* Selectores de idioma y moneda */
    .nav-item .nav-select {
        display: block;
        width: 60px;
        margin-left: auto;
        background: transparent;
        border: 1px solid var(--border-light);
        border-radius: 4px;
        padding: 4px;
    }
    
    .nav-item {
        justify-content: flex-end;
        padding: var(--space-sm) var(--space-xs);
    }
    
    .nav-label {
        display: none;
    }
    
    /* Color picker y presets */
    #theme-colors {
        min-width: 0;
    }

    #theme-colors > div {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    #color-picker {
        width: 25px;
        height: 25px;
    }
    
    .color-dot {
        width: 18px;
        height: 18px;
    }
    
    /* Dark mode toggle */
    #darkmode-toggle {
        justify-content: center;
        padding: var(--space-sm) 0;
    }
    
    #darkmode-toggle .nav-label {
        display: none;
    }
    
    .switch {
        margin-left: 0;
    }
}

/* ===== BOTÓN CERRAR SESIÓN ===== */
#logout-sidebar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-light);
    background: transparent;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 0.5rem;
    margin-top: 10px;
}

#logout-sidebar:hover {
    background-color: rgba(0,0,0,0.05);
}

.dark #logout-sidebar:hover {
    background-color: rgba(255,255,255,0.05);
}

#logout-sidebar .material-icons-round {
    font-size: 1.2rem;
}

#logout-sidebar span:last-child {
    font-size: 0.875rem;
}

/* Móvil: solo ícono */
@media (max-width: 1023px) {
    #logout-sidebar {
        justify-content: center;
        padding: var(--space-sm) 0;
        border: none;
    }
    
    #logout-sidebar span:last-child {
        display: none;
    }
    
    #logout-sidebar .material-icons-round {
        font-size: 1.5rem;
    }
}

/* Desktop: ícono + texto */
@media (min-width: 1024px) {
    #logout-sidebar {
        justify-content: flex-start;
        padding: var(--space-sm) var(--space-md);
    }
    
    #logout-sidebar span:last-child {
        display: inline;
        font-size: 0.875rem;
    }
}

/* ===== LOGIN MODERNO ===== */
.modern-bar {
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    padding: 8px 20px;
    border-radius: 50px;
    gap: 20px;
}

.modern-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-icon {
    font-size: 1.2rem;
    color: var(--primary);
}

.modern-select {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.modern-select:hover {
    background: var(--bg-light);
}

.modern-color {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.modern-color:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

.modern-color-value {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.modern-divider {
    width: 1px;
    height: 24px;
    background: var(--border-light);
}

.modern-card {
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.modern-logo {
    margin-bottom: 1.5rem;
}

.modern-logo span:first-child {
    font-size: 2.5rem;
    background: var(--primary);
    color: white;
    padding: 0.5rem;
    border-radius: 12px;
}

.modern-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.modern-btn-google {
    background: white;
    color: #333;
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.modern-btn-google:hover {
    background: var(--bg-light);
}

.modern-divider-text {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.modern-divider-text::before,
.modern-divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border-light);
}

.modern-divider-text::before {
    left: 0;
}

.modern-divider-text::after {
    right: 0;
}

.modern-divider-text span {
    background: var(--surface-light);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modern-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.modern-input-group input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--surface-light);
    color: var(--text-light);
    transition: var(--transition);
}

.modern-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modern-input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.modern-btn-submit {
    margin-top: 0.5rem;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
}

.modern-register-link {
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.modern-register-link a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.modern-register-link a:hover {
    text-decoration: underline;
}

.modal.modern-modal .modal-content {
    border-radius: 20px;
    padding: 2rem;
}

.modern-close {
    font-size: 2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.modern-close:hover {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 768px) {
    .modern-bar {
        flex-direction: column;
        left: 10px;
        right: 10px;
        border-radius: 20px;
        padding: 12px;
    }
    
    .modern-divider {
        display: none;
    }
    
    .modern-color-value {
        display: none;
    }
    
    .modern-card {
        padding: 1.5rem;
    }
}