/* ==========================================================
   Mexsport FeedBack v2 — estilos
   ========================================================== */

:root {
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --transition: all 0.2s ease;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
}

body {
    background: var(--bs-body-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ----- LOGIN ----- */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1a4f3a 0%, #2c8451 50%, #4eb87f 100%);
    padding: 2rem 1rem;
}
.login-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
}
[data-bs-theme="dark"] .login-card {
    background: #1f2937;
    color: #fff;
}
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}
.login-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}
.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}
.login-form .form-floating > label {
    color: var(--bs-secondary-color);
}

/* ----- SIDEBAR ----- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: #1f2937;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: var(--transition);
    overflow-y: auto;
}
.sidebar-header {
    padding: 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    background: #1f2937;
    z-index: 1;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
}
.brand-icon { font-size: 1.4rem; }

.sidebar-nav { flex: 1; padding: 0.75rem 0; }
.sidebar-nav .nav { padding: 0; }
.sidebar-nav .nav-item { padding: 0 0.75rem; }
.sidebar-nav .nav-link {
    color: #cbd5e1;
    padding: 0.6rem 0.85rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    transition: var(--transition);
    margin-bottom: 0.15rem;
}
.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, #2c8451, #4eb87f);
    color: #fff;
    font-weight: 600;
}
.sidebar-nav .nav-link i { font-size: 1.05rem; flex-shrink: 0; }
.nav-section {
    padding: 1rem 1.25rem 0.4rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #6b7280;
    font-weight: 700;
}
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1030;
}

/* ----- TOPBAR ----- */
.topbar {
    height: var(--topbar-height);
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 1rem; }
.topbar-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
}
.topbar-right { display: flex; align-items: center; gap: 0.5rem; }

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--bs-body-color);
    transition: var(--transition);
}
.btn-icon:hover { background: var(--bs-tertiary-bg); }

.btn-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bs-tertiary-bg);
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--bs-body-color);
}
.btn-user:hover { background: var(--bs-secondary-bg); }
.user-avatar i { font-size: 1.5rem; color: var(--bs-success); }
.user-name { font-weight: 600; font-size: 0.9rem; }
.user-role { font-size: 0.75rem; }

/* ----- MAIN CONTENT ----- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}
.main-content-full { min-height: 100vh; }
.content-wrapper { padding: 0; }

/* ----- DASHBOARD ----- */
.welcome-banner {
    background: linear-gradient(135deg, #2c8451 0%, #4eb87f 100%);
    color: #fff;
    padding: 2rem 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}
.welcome-banner h2 { font-weight: 700; margin: 0 0 0.5rem; }
.welcome-banner p { color: rgba(255,255,255,0.9) !important; }

.stat-card {
    background: var(--bs-body-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--bs-primary);
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    flex-shrink: 0;
}
.stat-card .stat-label { font-size: 0.85rem; color: var(--bs-secondary-color); }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }

.stat-success { border-left-color: #10b981; }
.stat-success .stat-icon { background: #d1fae5; color: #059669; }
.stat-info    { border-left-color: #3b82f6; }
.stat-info    .stat-icon { background: #dbeafe; color: #2563eb; }
.stat-warning { border-left-color: #f59e0b; }
.stat-warning .stat-icon { background: #fef3c7; color: #d97706; }
.stat-primary { border-left-color: #8b5cf6; }
.stat-primary .stat-icon { background: #ede9fe; color: #7c3aed; }

[data-bs-theme="dark"] .stat-success .stat-icon { background: rgba(16,185,129,0.15); }
[data-bs-theme="dark"] .stat-info    .stat-icon { background: rgba(59,130,246,0.15); }
[data-bs-theme="dark"] .stat-warning .stat-icon { background: rgba(245,158,11,0.15); }
[data-bs-theme="dark"] .stat-primary .stat-icon { background: rgba(139,92,246,0.15); }

.panel {
    background: var(--bs-body-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.panel-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}
.panel-header h5 { margin: 0; font-weight: 600; }
.panel-body { padding: 0.5rem 0; }
.panel-body.padded { padding: 1.5rem; }

/* ----- EMBED ----- */
.embed-wrapper {
    padding: 1.5rem;
    height: calc(100vh - var(--topbar-height));
    display: flex;
    flex-direction: column;
}
.embed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.embed-frame-container {
    flex: 1;
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.embed-frame-container iframe {
    display: block;
    width: 100%;
    height: calc(100vh - 160px);
    min-height: 600px;
    border: 0;
}

/* ----- TABLES ----- */
.table-card {
    background: var(--bs-body-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.table-card .table { margin: 0; }
.table-card .table thead { background: var(--bs-tertiary-bg); }

/* ----- RESPONSIVE ----- */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open ~ .sidebar-overlay { display: block; }
    .main-content { margin-left: 0; }
}
