/* ==============================================================================
   Traductor LSP — Modern Glassmorphism & High-Performance Design System
   ============================================================================== */

:root {
    --bg-dark: #090d16;
    --bg-card: rgba(18, 24, 38, 0.7);
    --bg-card-hover: rgba(26, 35, 54, 0.85);
    --bg-surface: #101726;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.35);
    --secondary: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.3);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

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

html, body {
    min-height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* Ambient dynamic background glows */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.25;
}

.glow-1 {
    width: 500px;
    height: 500px;
    top: -150px;
    left: -100px;
    background: radial-gradient(circle, #6366f1, #3b82f6);
}

.glow-2 {
    width: 600px;
    height: 600px;
    bottom: -200px;
    right: -150px;
    background: radial-gradient(circle, #ec4899, #8b5cf6);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-cyan {
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 13, 22, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: transform 0.25s ease;
}

.navbar-brand:hover .brand-icon {
    transform: rotate(-8deg) scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: #818cf8;
}

.nav-item.highlight {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #fff;
}

.nav-item.highlight:hover {
    background: rgba(99, 102, 241, 0.25);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.badge-live {
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 1.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* User Profile Menu */
.user-menu {
    position: relative;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-badge:hover, .user-badge:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-highlight);
}

.avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    width: 230px;
    background: #111827;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
    padding: 0.75rem 0;
    display: none;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.user-menu:hover .dropdown-panel,
.user-menu:focus-within .dropdown-panel {
    display: block;
    animation: fadeInSlide 0.2s ease;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
    padding: 0.5rem 1rem 0.75rem 1rem;
}

.dropdown-divider {
    border: 0;
    border-top: 1px solid var(--border-subtle);
    margin: 0.4rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.86rem;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

/* Role Pills */
.role-pill {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-top: 0.35rem;
}

.role-admin {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.role-usuario {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

/* Buttons */
.btn-primary, .btn-primary-sm {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary {
    padding: 0.85rem 1.6rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-primary-sm {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
}

.btn-primary:hover, .btn-primary-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-highlight);
    color: #fff;
}

.btn-danger-sm {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-sm:hover {
    background: #ef4444;
    color: #fff;
}

.btn-success-sm {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-success-sm:hover {
    background: #10b981;
    color: #fff;
}

/* Page Containers */
.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    position: relative;
    z-index: 10;
    min-height: calc(100vh - 280px);
}

/* Flash Toasts */
.flash-toast {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.3rem;
    border-radius: var(--radius-md);
    background: #1e293b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-subtle);
    max-width: 420px;
    animation: slideInRight 0.3s ease;
}

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

.flash-toast.flash-success {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(12px);
}
.flash-toast.flash-success .toast-icon { color: #10b981; font-size: 1.3rem; }

.flash-toast.flash-error {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.15);
    backdrop-filter: blur(12px);
}
.flash-toast.flash-error .toast-icon { color: #ef4444; font-size: 1.3rem; }

.toast-content {
    font-size: 0.92rem;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    margin-left: auto;
}

/* Cards & Glass Containers */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-glass);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.glass-card:hover {
    border-color: var(--border-highlight);
}

/* Forms */
.form-group {
    margin-bottom: 1.4rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    color: #fff;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: rgba(15, 23, 42, 0.85);
}

.form-control::placeholder {
    color: var(--text-dim);
}

select.form-control {
    cursor: pointer;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.custom-table td {
    padding: 1rem 1.25rem;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.custom-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--border-subtle);
    background: rgba(6, 9, 15, 0.9);
    padding: 3.5rem 1.5rem 2rem 1.5rem;
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.8rem;
}

.footer-brand i {
    color: var(--primary-light);
}

.footer-description {
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 480px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.model-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tech-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.tech-tag i {
    color: var(--accent);
}

.footer-right {
    display: flex;
    gap: 4rem;
}

.footer-links-group h4 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-links-group ul {
    list-style: none;
}

.footer-links-group li {
    margin-bottom: 0.6rem;
}

.footer-links-group a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.footer-links-group a:hover {
    color: #fff;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-left: 4px;
    box-shadow: 0 0 8px #10b981;
}

.footer-bottom {
    max-width: 1280px;
    margin: 3rem auto 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* Utilities */
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* Responsive */
@media (max-width: 868px) {
    .navbar-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #0d131f;
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-subtle);
        gap: 1rem;
    }

    .navbar-links.open {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-right {
        gap: 2rem;
    }
}
