/* ===========================================
   Sistema de Cuentas - Cyberpunk Theme CSS
   =========================================== */

:root {
    /* Colores Cyberpunk */
    --cyber-primary: #00f5ff;
    --cyber-secondary: #ff00ff;
    --cyber-accent: #ffff00;
    --cyber-success: #00ff88;
    --cyber-warning: #ff9500;
    --cyber-danger: #ff3366;

    /* Fondos */
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-surface: #1a1a2e;
    --bg-surface-light: #252545;
    --bg-card: rgba(26, 26, 46, 0.8);

    /* Texto */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #00f5ff 0%, #ff00ff 100%);
    --gradient-secondary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --gradient-success: linear-gradient(135deg, #00f5ff 0%, #00ff88 100%);

    /* Sombras Neón */
    --glow-primary: 0 0 20px rgba(0, 245, 255, 0.5);
    --glow-secondary: 0 0 20px rgba(255, 0, 255, 0.5);
    --glow-success: 0 0 20px rgba(0, 255, 136, 0.5);

    /* Bordes */
    --border-color: rgba(0, 245, 255, 0.2);
    --border-glow: 1px solid rgba(0, 245, 255, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
}

/* Background Grid Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   Typography
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-shadow: var(--glow-primary);
}

.text-glow {
    text-shadow: 0 0 10px currentColor;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-dark);
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.7);
}

.btn-secondary {
    background: transparent;
    color: var(--cyber-primary);
    border: 2px solid var(--cyber-primary);
}

.btn-secondary:hover {
    background: rgba(0, 245, 255, 0.1);
    box-shadow: var(--glow-primary);
}

.btn-danger {
    background: var(--cyber-danger);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--bg-dark);
}

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--bg-card);
    border: var(--border-glow);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--cyber-primary);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.1);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    padding: 0;
}

/* ============================================
   Forms
   ============================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--cyber-primary);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.2);
}

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

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2300f5ff' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   Tables
   ============================================ */

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: var(--border-glow);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
}

.table th {
    background: var(--bg-surface);
    color: var(--cyber-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(0, 245, 255, 0.05);
}

.table td {
    color: var(--text-secondary);
}

/* ============================================
   Badges
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(0, 245, 255, 0.2);
    color: var(--cyber-primary);
    border: 1px solid var(--cyber-primary);
}

.badge-success {
    background: rgba(0, 255, 136, 0.2);
    color: var(--cyber-success);
    border: 1px solid var(--cyber-success);
}

.badge-warning {
    background: rgba(255, 149, 0, 0.2);
    color: var(--cyber-warning);
    border: 1px solid var(--cyber-warning);
}

.badge-danger {
    background: rgba(255, 51, 102, 0.2);
    color: var(--cyber-danger);
    border: 1px solid var(--cyber-danger);
}

.badge-info {
    background: rgba(0, 245, 255, 0.2);
    color: var(--cyber-primary);
    border: 1px solid var(--cyber-primary);
}

.badge-secondary {
    background: rgba(160, 160, 160, 0.2);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: var(--border-glow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Navbar transparente para hero fullscreen */
.navbar.navbar-transparent {
    position: absolute;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom: none;
}

/* Body con hero fullscreen */
body.has-hero {
    padding-top: 0;
}

body.has-hero .hero {
    padding-top: calc(6rem + 80px);
    /* Hero + altura del navbar */
}

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

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyber-primary);
    text-decoration: none;
    text-shadow: var(--glow-primary);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyber-primary);
    background: rgba(0, 245, 255, 0.1);
}

/* ============================================
   Sidebar (Admin)
   ============================================ */

.layout-admin {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-surface);
    border-right: var(--border-glow);
    padding: 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cyber-primary);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    margin-bottom: 2rem;
    text-shadow: var(--glow-primary);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    color: var(--cyber-primary);
    background: rgba(0, 245, 255, 0.1);
}

.sidebar-nav-link.active {
    border-left: 3px solid var(--cyber-primary);
}

.sidebar-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding-left: 1rem;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
}

/* ============================================
   Stats Cards
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: var(--border-glow);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.1;
}

/* ============================================
   Service Cards (Homepage)
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    border: var(--border-glow);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--glow-primary);
    border-color: var(--cyber-primary);
}

.service-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.service-card-body {
    padding: 1.5rem;
}

.service-card-category {
    font-size: 0.75rem;
    color: var(--cyber-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.service-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.service-card-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.service-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyber-success);
}

.service-card-slots {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ============================================
   Kanban Board
   ============================================ */

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    min-height: 600px;
}

.kanban-column {
    background: var(--bg-surface);
    border: var(--border-glow);
    border-radius: 12px;
    padding: 1rem;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.kanban-column-pending .kanban-column-header {
    background: rgba(255, 149, 0, 0.1);
    border-left: 3px solid var(--cyber-warning);
}

.kanban-column-progress .kanban-column-header {
    background: rgba(0, 245, 255, 0.1);
    border-left: 3px solid var(--cyber-primary);
}

.kanban-column-resolved .kanban-column-header {
    background: rgba(0, 255, 136, 0.1);
    border-left: 3px solid var(--cyber-success);
}

.kanban-column-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.kanban-column-count {
    background: var(--bg-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.kanban-cards {
    min-height: 400px;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: grab;
    transition: all 0.3s ease;
}

.kanban-card:hover {
    border-color: var(--cyber-primary);
    box-shadow: var(--glow-primary);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   Chat
   ============================================ */

.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    max-height: 700px;
    background: var(--bg-card);
    border: var(--border-glow);
    border-radius: 12px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    max-width: 80%;
}

.chat-message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.chat-message-content {
    background: var(--bg-surface);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.chat-message.sent .chat-message-content {
    background: var(--cyber-primary);
    color: var(--bg-dark);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 4px;
}

.chat-message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
}

.chat-input {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.chat-input:focus {
    outline: none;
    border-color: var(--cyber-primary);
}

.chat-send-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--glow-primary);
}

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--cyber-success);
    color: var(--cyber-success);
}

.alert-danger {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid var(--cyber-danger);
    color: var(--cyber-danger);
}

.alert-warning {
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid var(--cyber-warning);
    color: var(--cyber-warning);
}

.alert-info {
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--cyber-primary);
    color: var(--cyber-primary);
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-link {
    padding: 0.5rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-link:hover,
.pagination-link.active {
    background: var(--cyber-primary);
    color: var(--bg-dark);
    border-color: var(--cyber-primary);
}

/* ============================================
   Utilities
   ============================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   Animations
   ============================================ */

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 245, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 245, 255, 0.8);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Hero compacto para móvil */
    .hero {
        padding: 2rem 0 3rem !important;
        min-height: auto !important;
    }

    body.has-hero .hero {
        padding-top: calc(2rem + 60px) !important;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .hero-buttons .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
        width: 100%;
    }

    .hero-buttons .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Container más compacto en móvil */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Secciones más compactas */
    section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* Títulos de sección más pequeños */
    section h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem;
    }

    section h2+p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    /* Cards de servicios más compactos */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card-body {
        padding: 1rem;
    }

    .service-card-title {
        font-size: 1.1rem;
    }

    .service-card-price {
        font-size: 1.25rem;
    }

    /* Stats en 2 columnas en móvil */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.875rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-icon {
        font-size: 2rem;
        right: 0.75rem;
    }

    /* Navbar más compacto */
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar-container {
        padding: 0 1rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-nav {
        display: none;
    }

    /* Cards compactas */
    .card {
        padding: 1rem;
    }

    /* Título de cards más pequeño */
    .card-header {
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .card-title {
        font-size: 1rem;
    }

    /* Tablas con scroll horizontal en móvil */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
        border-radius: 8px;
    }

    .table {
        min-width: 400px;
        font-size: 0.75rem;
    }

    .table th {
        padding: 0.5rem 0.4rem;
        font-size: 0.65rem;
        letter-spacing: 0.3px;
    }

    .table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .table .badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Prevenir scroll horizontal en móvil */
html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Dashboard/Sidebar compacto en móvil */
@media (max-width: 768px) {
    .layout-admin {
        flex-direction: column;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .sidebar {
        display: none;
        position: fixed;
        width: 100%;
        height: auto;
        max-height: 70vh;
        top: 0;
        left: 0;
        z-index: 1001;
        padding: 1rem;
        border-radius: 0 0 16px 16px;
    }

    .sidebar.open {
        display: block;
    }

    .sidebar-brand {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .sidebar-nav-link {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }

    .sidebar-section {
        margin-top: 1rem;
        padding-top: 0.75rem;
    }

    .sidebar-section-title {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-bottom: 100px;
    }

    /* Títulos más compactos */
    h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem;
    }

    h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem;
    }

    h3 {
        font-size: 1.1rem !important;
    }

    /* Tablas más compactas */
    .table th,
    .table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }

    .table th {
        font-size: 0.75rem;
    }

    /* Formularios compactos */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.35rem;
    }

    .form-control {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Grids compactas */
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    /* Espaciado entre elementos reducido */
    .mb-1 {
        margin-bottom: 0.3rem;
    }

    .mb-2 {
        margin-bottom: 0.6rem;
    }

    .mb-3 {
        margin-bottom: 1rem;
    }

    /* Badges más pequeños */
    .badge {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }

    /* Alerts compactos */
    .alert {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Dashboard compacto en tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 220px;
        padding: 1rem;
    }

    .sidebar-brand {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }

    .sidebar-nav-link {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    .main-content {
        margin-left: 220px;
        padding: 1.5rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }
}