/* ========================================
   VIXpass - Diseño Minimalista Profesional
   Inspirado en Linear, Vercel, Notion
   ======================================== */

/* ============ RESET & BASE ============ */

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

:root {
    /* Paleta Principal - VIX Blue */
    --vix-blue: #2563eb;
    --vix-blue-hover: #1d4ed8;
    --vix-blue-light: #3b82f6;
    --vix-blue-subtle: rgba(37, 99, 235, 0.08);
    --vix-blue-border: rgba(37, 99, 235, 0.2);
    
    /* Neutros */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --gray-950: #0a0a0a;
    
    /* Semánticos */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    
    /* Fondos */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-elevated: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    /* Texto */
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-tertiary: #a3a3a3;
    --text-inverse: #ffffff;
    
    /* Bordes */
    --border-primary: #e5e5e5;
    --border-secondary: #d4d4d4;
    --border-subtle: rgba(0, 0, 0, 0.06);
    
    /* Sombras */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08), 0 8px 10px rgba(0, 0, 0, 0.04);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-blur: 12px;
    
    /* Radios */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Tipografía */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    
    /* Espaciado */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    
    /* Iconos */
    --icon-size-sm: 14px;
    --icon-size-md: 16px;
    --icon-size-lg: 20px;
    --icon-size-xl: 24px;
}

/* ============ TIPOGRAFÍA ============ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

/* ============ UTILIDADES ============ */

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--icon-size-md);
    height: var(--icon-size-md);
    flex-shrink: 0;
}

.icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.icon-sm { width: var(--icon-size-sm); height: var(--icon-size-sm); }
.icon-md { width: var(--icon-size-md); height: var(--icon-size-md); }
.icon-lg { width: var(--icon-size-lg); height: var(--icon-size-lg); }
.icon-xl { width: var(--icon-size-xl); height: var(--icon-size-xl); }

/* ============ AUTENTICACIÓN ============ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(16, 185, 129, 0.04) 0%, transparent 50%);
    animation: authGradient 20s ease infinite;
}

@keyframes authGradient {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

.auth-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-box .logo {
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-box .logo img {
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-3);
}

.auth-box h1 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.02em;
    margin-top: var(--space-2);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: var(--space-8);
    font-weight: 400;
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--border-secondary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--vix-blue);
    box-shadow: 0 0 0 3px var(--vix-blue-subtle);
}

.btn-primary {
    width: 100%;
    padding: 10px 16px;
    background: var(--vix-blue);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    letter-spacing: -0.01em;
}

.btn-primary:hover {
    background: var(--vix-blue-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 8px 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-secondary);
}

.switch-auth {
    text-align: center;
    margin-top: var(--space-6);
    color: var(--text-secondary);
    font-size: 13px;
}

.switch-auth a {
    color: var(--vix-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.switch-auth a:hover {
    color: var(--vix-blue-hover);
    text-decoration: underline;
}

/* ============ APP LAYOUT ============ */

.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 60px 1fr;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* ============ HEADER ============ */

.app-header {
    grid-column: 1 / -1;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    padding: 0 var(--space-6);
    gap: var(--space-6);
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 200px;
}

.header-left img {
    width: 28px;
    height: 28px;
}

.header-left h1 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-center {
    flex: 1;
    max-width: 480px;
}

.header-center input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
}

.header-center input::placeholder {
    color: var(--text-tertiary);
}

.header-center input:focus {
    border-color: var(--vix-blue);
    box-shadow: 0 0 0 3px var(--vix-blue-subtle);
    background-color: var(--bg-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-left: auto;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 16px;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

/* ============ SIDEBAR ============ */

.sidebar {
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-primary);
    padding: var(--space-4) var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: var(--space-4);
}

.sidebar-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-1);
}

.sidebar-btn {
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-md);
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    letter-spacing: -0.01em;
}

.sidebar-btn .icon {
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.sidebar-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-btn:hover .icon {
    color: var(--text-primary);
}

.sidebar-btn.active {
    background: var(--vix-blue-subtle);
    color: var(--vix-blue);
    font-weight: 500;
}

.sidebar-btn.active .icon {
    color: var(--vix-blue);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-primary);
    margin: var(--space-3) 0;
}

/* ============ MAIN CONTENT ============ */

.main-content {
    padding: var(--space-6);
    overflow-y: auto;
    max-height: calc(100vh - 60px);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    gap: var(--space-4);
}

.toolbar .btn-primary {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
}

.sync-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.sync-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============ CREDENTIALS GRID ============ */

.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-4);
}

.credential-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition-base);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.credential-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--vix-blue);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.credential-card:hover {
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.credential-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--vix-blue-subtle);
    color: var(--vix-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.card-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.favorite-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
}

.favorite-btn:hover {
    color: var(--warning);
    background: var(--warning-bg);
}

.favorite-btn.active {
    color: var(--warning);
}

.card-body {
    margin-bottom: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.card-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.field-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.field-value {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 13px;
    color: var(--text-primary);
}

.field-value a {
    color: var(--vix-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.field-value a:hover {
    color: var(--vix-blue-hover);
    text-decoration: underline;
}

.password-dots {
    font-family: var(--font-mono);
    letter-spacing: 2px;
    color: var(--text-secondary);
    font-size: 12px;
}

.copy-btn, .reveal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 12px;
}

.copy-btn:hover, .reveal-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

.card-footer {
    display: flex;
    gap: var(--space-2);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

.btn-edit, .btn-delete {
    flex: 1;
    padding: 7px 12px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: var(--bg-primary);
}

.btn-edit {
    color: var(--text-secondary);
}

.btn-edit:hover {
    background: var(--vix-blue-subtle);
    color: var(--vix-blue);
    border-color: var(--vix-blue-border);
}

.btn-delete {
    color: var(--text-secondary);
}

.btn-delete:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.card-notes {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-notes strong {
    color: var(--text-primary);
    font-weight: 500;
    display: block;
    margin-bottom: var(--space-1);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-notes p {
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============ EMPTY STATE ============ */

.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--text-secondary);
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-5);
    color: var(--text-tertiary);
    opacity: 0.5;
}

.empty-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1;
    fill: none;
}

.empty-state h3 {
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============ MODAL ============ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content.small {
    max-width: 440px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-primary);
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-6);
}

.modal-body .form-group label {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus {
    border-color: var(--vix-blue);
    box-shadow: 0 0 0 3px var(--vix-blue-subtle);
}

.input-group {
    display: flex;
    gap: var(--space-2);
}

.input-group input {
    flex: 1;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--vix-blue);
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.modal-footer .btn-primary {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
}

/* ============ GENERATOR ============ */

.generated-password {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 500;
    margin-bottom: var(--space-5);
    word-break: break-all;
    color: var(--success);
    letter-spacing: 0.5px;
    position: relative;
}

.generated-password::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, var(--vix-blue-subtle), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ============ TOAST ============ */

.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-primary);
    transform: translateX(calc(100% + var(--space-6)));
    transition: transform var(--transition-slow);
    z-index: 2000;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 360px;
}

.toast.show {
    transform: translateX(0);
}

.toast::before {
    content: '';
    width: 3px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.toast-success::before { background: var(--success); }
.toast-error::before { background: var(--danger); }
.toast-warning::before { background: var(--warning); }
.toast-info::before { background: var(--info); }

/* ============ SCROLLBAR ============ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 220px 1fr;
    }
    
    .credentials-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .app-header {
        padding: 0 var(--space-4);
    }
    
    .header-center {
        display: none;
    }
    
    .main-content {
        padding: var(--space-4);
    }
    
    .credentials-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-box {
        padding: var(--space-6);
    }
    
    .modal-content {
        max-width: 100%;
        margin: var(--space-4);
    }
}

@media (max-width: 480px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar .btn-primary {
        width: 100%;
    }
}

/* ============ ANIMACIONES ============ */

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

.loading {
    animation: spin 1s linear infinite;
}

/* ============ FOCUS VISIBLE ============ */

*:focus-visible {
    outline: 2px solid var(--vix-blue);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--vix-blue);
    outline-offset: 2px;
}

/* ============ SELECCIÓN ============ */

::selection {
    background: var(--vix-blue-subtle);
    color: var(--vix-blue);
}

/* ============ BODY MODAL OPEN ============ */

body.modal-open {
    overflow: hidden;
}

/* CAPTCHA de acceso */
.captcha-group small { display:block; margin-top:8px; color:var(--text-tertiary); font-size:12px; }
.captcha-row { display:grid; grid-template-columns:minmax(105px,auto) 42px 1fr; gap:8px; align-items:center; }
.captcha-challenge { min-height:44px; display:flex; align-items:center; justify-content:center; padding:0 14px; border:1px solid var(--border-primary); background:var(--bg-tertiary); border-radius:var(--radius-md); font-weight:700; letter-spacing:.04em; user-select:none; }
.captcha-refresh { min-height:44px; border:1px solid var(--border-primary); background:var(--bg-primary); border-radius:var(--radius-md); cursor:pointer; font-size:20px; transition:var(--transition-fast); }
.captcha-refresh:hover { border-color:var(--vix-blue); color:var(--vix-blue); background:var(--vix-blue-subtle); }
@media (max-width:480px){.captcha-row{grid-template-columns:1fr 42px}.captcha-row input{grid-column:1/-1}}

/* =========================================================
   VIXpass UI 2.4 — sistema visual profesional y consistente
   ========================================================= */
:root {
    --vix-blue: #1c6bff;
    --vix-blue-hover: #1558d6;
    --vix-blue-light: #4f8cff;
    --vix-blue-subtle: rgba(28, 107, 255, .08);
    --vix-blue-border: rgba(28, 107, 255, .20);
    --bg-secondary: #f5f7fb;
    --bg-tertiary: #eef2f8;
    --text-primary: #10203a;
    --text-secondary: #5b6b82;
    --text-tertiary: #8c9aaf;
    --border-primary: #dfe5ef;
    --border-secondary: #cfd7e5;
    --radius-sm: 5px;
    --radius-md: 7px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --shadow-sm: 0 1px 2px rgba(16,32,58,.04);
    --shadow-md: 0 8px 24px rgba(16,32,58,.07);
    --shadow-lg: 0 16px 42px rgba(16,32,58,.10);
    --shadow-xl: 0 24px 64px rgba(16,32,58,.12);
}

body { background: var(--bg-secondary); }
.icon svg { stroke-width: 1.8; vector-effect: non-scaling-stroke; }
button .icon, a .icon { pointer-events: none; }

/* Acceso */
.auth-container {
    background:
      linear-gradient(rgba(245,247,251,.92), rgba(245,247,251,.96)),
      linear-gradient(120deg, rgba(28,107,255,.08), transparent 42%);
}
.auth-container::before {
    width: 520px; height: 520px; top: -220px; right: -180px; left: auto;
    background: radial-gradient(circle, rgba(28,107,255,.13), transparent 68%);
    animation: none;
}
.auth-box {
    max-width: 440px;
    padding: 38px;
    border-radius: 14px;
    border-color: rgba(207,215,229,.86);
    box-shadow: 0 24px 70px rgba(16,32,58,.10);
}
.auth-box .logo img { width: 52px; height: 52px; margin-bottom: 12px; }
.auth-box h1 { font-size: 25px; font-weight: 700; }
.subtitle { margin-bottom: 28px; color: var(--text-secondary); }
.form-group label { font-size: 12.5px; font-weight: 600; color: #32435d; }
.form-group input, .form-group select, .form-group textarea {
    min-height: 44px;
    padding: 10px 13px;
    background: #fff;
    border-color: #d8e0eb;
    box-shadow: 0 1px 0 rgba(16,32,58,.02);
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: #bdc8d8; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--vix-blue);
    box-shadow: 0 0 0 3px rgba(28,107,255,.10);
    outline: none;
}
.btn-primary {
    min-height: 44px;
    border-radius: 7px;
    background: var(--vix-blue);
    box-shadow: 0 6px 14px rgba(28,107,255,.18);
    font-weight: 650;
}
.btn-primary:hover { background: var(--vix-blue-hover); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(28,107,255,.22); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.captcha-row { grid-template-columns: 112px 42px 1fr; }
.captcha-challenge { min-height: 44px; border-radius: 7px; background: #f4f7fb; color: #203451; }
.captcha-refresh { min-height: 44px; display:flex; align-items:center; justify-content:center; font-size:inherit; border-radius:7px; color:#63728a; }
.captcha-refresh:hover { color:var(--vix-blue); }

/* Estructura principal */
.app-container { grid-template-columns: 246px minmax(0,1fr); grid-template-rows: 64px minmax(0,1fr); }
.app-header {
    height: 64px;
    background: rgba(255,255,255,.96);
    border-bottom-color: #e2e8f1;
    backdrop-filter: blur(12px);
    box-shadow: none;
}
.header-left { width: 246px; gap: 10px; }
.header-left img { width: 32px; height: 32px; }
.header-left h1 { font-size: 17px; font-weight: 700; letter-spacing: -.025em; }
.header-center { max-width: 560px; }
.header-center input {
    height: 38px;
    border-radius: 7px;
    background: #f7f9fc;
    border-color: transparent;
    box-shadow: inset 0 0 0 1px #e2e8f1;
}
.header-center input:focus { background:#fff; box-shadow:0 0 0 3px rgba(28,107,255,.09), inset 0 0 0 1px var(--vix-blue); }
.user-badge { background:#f5f7fb; border:1px solid #e2e8f1; border-radius:7px; color:#40516a; }
.btn-icon { border-radius:7px; color:#64748b; }
.btn-icon:hover { background:#f0f4f9; color:#173256; }

.sidebar { padding: 20px 14px; border-right-color:#e2e8f1; background:#fff; }
.sidebar-section { margin-bottom: 22px; }
.sidebar-label { padding: 0 10px 8px; font-size:10px; font-weight:700; letter-spacing:.09em; color:#94a0b1; }
.sidebar-btn {
    min-height: 38px;
    margin-bottom: 2px;
    padding: 8px 10px;
    border-radius: 7px;
    color:#586981;
    font-weight:550;
    gap:10px;
}
.sidebar-btn .icon { color:#8090a5; }
.sidebar-btn:hover { background:#f5f7fa; color:#213754; }
.sidebar-btn.active { background:rgba(28,107,255,.09); color:#1558d6; box-shadow:inset 3px 0 0 var(--vix-blue); }
.sidebar-btn.active .icon { color:var(--vix-blue); }
.sidebar-divider { background:#e9edf3; margin:4px 10px 20px; }

.main-content { padding: 28px 30px 40px; }
.toolbar { margin-bottom:24px; }
.toolbar .btn-primary { width:auto; min-height:40px; padding:0 16px; }
.sync-status { font-size:12px; color:#68788e; background:#fff; border:1px solid #e0e6ef; border-radius:999px; padding:6px 10px; }
.sync-status::before { width:7px; height:7px; }
.credentials-grid { grid-template-columns:repeat(auto-fill,minmax(286px,1fr)); gap:14px; }
.credential-card {
    border-radius:10px;
    border-color:#e0e6ef;
    box-shadow:0 1px 2px rgba(16,32,58,.025);
    transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.credential-card:hover { transform:translateY(-2px); border-color:#c9d4e3; box-shadow:0 10px 28px rgba(16,32,58,.07); }
.credential-icon { border-radius:8px; box-shadow:none; }
.credential-actions button { border-radius:6px; }

/* Modales y mensajes */
.modal { background:rgba(15,28,48,.45); backdrop-filter:blur(3px); }
.modal-content { border-radius:12px; border:1px solid rgba(207,215,229,.9); box-shadow:0 26px 80px rgba(15,28,48,.22); }
.modal-header { padding:18px 22px; }
.modal-header h2 { font-size:17px; }
.modal-body { padding:22px; }
.modal-footer { padding:14px 22px; border-radius:0 0 12px 12px; }
.modal-close { width:34px; height:34px; border-radius:7px; }
.toast { border-radius:8px; box-shadow:0 16px 42px rgba(16,32,58,.14); }
.generated-password { border-radius:8px; background:#f7f9fc; }
.generated-password::before { display:none; }

@media (max-width: 1024px) {
    .app-container { grid-template-columns: 220px minmax(0,1fr); }
    .header-left { width:220px; }
}
@media (max-width: 768px) {
    .app-header { height:58px; }
    .header-left { width:auto; }
    .header-left h1 { display:block; }
    .main-content { padding:20px 16px 32px; }
    .auth-box { padding:28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after { animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}
