/* ==========================================================================
   SITIOWEBPYME - SISTEMA DE DISEÑO GLASSMORPHIC PREMIUM PARA DASHBOARDS
   ========================================================================== */

:root {
    --bg-dark: #090a10;
    --card-bg: rgba(20, 22, 37, 0.45);
    --card-border: rgba(255, 255, 255, 0.07);
    --card-border-glow: rgba(0, 242, 254, 0.2);
    
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.4);
    --secondary: #4facfe;
    --accent: #f35588;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-green: #10b981;
    --text-red: #ef4444;
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Fondo dinámico con orbes brillantes de fondo */
.dashboard-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.25;
    animation: orbFloat 12s infinite alternate ease-in-out;
}

.orb-blue {
    top: -10%;
    right: 15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--primary) 0%, rgba(79, 172, 254, 0) 70%);
}

.orb-pink {
    bottom: -10%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent) 0%, rgba(243, 85, 136, 0) 70%);
    animation-delay: 3s;
}

@keyframes orbFloat {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.1); }
}

/* Contenedor Principal con Sidebar Colateral */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Barra Lateral (Sidebar) Glassmorphic */
.sidebar {
    width: 280px;
    background: rgba(13, 15, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--card-border);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-bottom: 40px;
    display: block;
}

.sidebar-logo span {
    color: var(--primary);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: var(--transition);
}

.menu-item a:hover,
.menu-item.active a {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.menu-item.active a {
    border-left: 3px solid var(--primary);
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #090a10;
}

.user-info h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.user-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-logout {
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    color: var(--text-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Área de Contenido Principal */
.main-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 40px;
    min-height: 100vh;
}

.header-dashboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 5px;
}

.tenant-badge-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-green);
    box-shadow: 0 0 10px var(--text-green);
}

/* Tarjetas de Métricas Premium (Grid) */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.metric-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-5px);
    border-color: var(--card-border-glow);
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.05);
}

.metric-info h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-info p {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-top: 8px;
    color: #fff;
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Contenedores de Secciones (TABS) */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out forwards;
}

.tab-content.active {
    display: block;
}

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

/* Tarjetas y Formularios de Contenido */
.content-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.content-card h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

/* Formularios Premium */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    background: rgba(255, 255, 255, 0.05);
}

/* Botones Premium */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #090a10;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    opacity: 0.95;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    background: rgba(10, 14, 26, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 0.92rem !important;
    outline: none !important;
    transition: var(--transition) !important;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 12px var(--primary-glow) !important;
    background: rgba(15, 20, 35, 0.95) !important;
}

select option {
    background: #111827;
    color: #fff;
}

/* Tablas Premium Interactivas */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

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

.custom-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-heading);
    border-bottom: 1px solid var(--card-border);
}

.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

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

/* Píldoras de Estado (Status Pills) */
.pill {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pill-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--text-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.pill-yellow {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.pill-red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--text-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Vista de Login Premium */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 450px;
    background: rgba(20, 22, 37, 0.55);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.login-card h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.login-card form {
    text-align: left;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--text-red);
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    display: none;
}
