/* manager/css/manager.css - Estilos completos del panel de control */
:root {
    --primary-red: #dc2626;
    --primary-gold: #d97706;
    --primary-green: #16a34a;
    --primary-blue: #1e40af;
    --primary-white: #ffffff;
    --primary-black: #000000;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --info-color: #1e40af;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== LAYOUT PRINCIPAL ===== */
.dashboard-body {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    padding: 30px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1e293b 100%);
    color: var(--primary-white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #334155;
    text-align: center;
}

.sidebar-header h2 {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5em;
    margin-bottom: 5px;
}

.sidebar-header small {
    color: #94a3b8;
    font-size: 0.9em;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.95em;
}

.nav-item:hover {
    background: #1e293b;
    color: var(--primary-white);
    border-left-color: var(--primary-red);
}

.nav-item.active {
    background: #1e293b;
    color: var(--primary-white);
    border-left-color: var(--primary-gold);
}

/* ===== HEADER SUPERIOR ===== */
.top-header {
    background: var(--primary-white);
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    display: none;
}

.menu-toggle:hover {
    background: var(--bg-light);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

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

.user-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95em;
}

.user-role {
    font-size: 0.8em;
    color: var(--text-light);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-white);
    font-weight: bold;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--primary-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    display: none;
    z-index: 1001;
}

.user-menu:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 15px;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: var(--bg-light);
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* ===== CONTENIDO PRINCIPAL ===== */
.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 2em;
    color: var(--text-dark);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.breadcrumb {
    color: var(--text-light);
    font-size: 0.9em;
}

.breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ===== ESTADÍSTICAS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--primary-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-red);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.gold {
    border-left-color: var(--primary-gold);
}

.stat-card.green {
    border-left-color: var(--primary-green);
}

.stat-card.blue {
    border-left-color: var(--primary-blue);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-dark);
}

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

/* ===== TABLAS ===== */
.table-container {
    background: var(--primary-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.table-container h3 {
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    background: #f1f5f9;
    color: var(--text-dark);
}

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

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9em;
}

.data-table tr:hover {
    background: #f8fafc;
}

/* ===== BOTONES ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-gold) 100%);
    color: var(--primary-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
    color: var(--primary-white);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(71, 85, 105, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--primary-green) 0%, #22c55e 100%);
    color: var(--primary-white);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #f59e0b 100%);
    color: var(--primary-white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85em;
}

.btn-block {
    width: 100%;
}

/* ===== BADGES DE ESTADO ===== */
.estado-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.estado-publicado {
    background: #dcfce7;
    color: #166534;
}

.estado-borrador {
    background: #fef3c7;
    color: #92400e;
}

.estado-papelera {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== ACCIONES ===== */
.acciones {
    display: flex;
    gap: 5px;
}

.btn-action {
    padding: 6px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.1em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-action:hover {
    background: #f3f4f6;
}

/* ===== ALERTAS ===== */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fed7aa;
    color: #d97706;
}

/* ===== FORMULARIOS ===== */
.form-container {
    background: var(--primary-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

/* ===== LAYOUT DE CONTENIDO ===== */
.content-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.content-col {
    display: flex;
    flex-direction: column;
}

/* ===== ACTIVIDAD ===== */
.activity-list {
    padding: 0;
}

.activity-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-user {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.activity-action {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.activity-time {
    color: #94a3b8;
    font-size: 0.8em;
}

/* ===== ACCIONES RÁPIDAS ===== */
.quick-actions {
    margin-top: 30px;
}

.quick-actions h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== BARRA DE HERRAMIENTAS ===== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--primary-white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ===== TEXTO ===== */
.text-muted {
    color: var(--text-light);
    font-size: 0.9em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .content-row {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .action-buttons {
        flex-direction: column;
    }

    .user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 15px;
    }

    .page-title {
        font-size: 1.5em;
    }

    .data-table {
        font-size: 0.85em;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

/* ===== UTILIDADES ===== */
.hidden {
    display: none !important;
}

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

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

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
/* ===== FOOTER ===== */
.main-footer {
    background: var(--bg-dark);
    color: #cbd5e1;
    padding: 20px 30px;
    border-top: 1px solid #334155;
    margin-top: auto;
    font-size: 0.9em;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-weight: 600;
    color: white;
    font-size: 1.1em;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-version {
    background: #334155;
    color: #94a3b8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-family: monospace;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

.footer-divider {
    opacity: 0.5;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.online {
    background: #22c55e;
    animation: pulse 2s infinite;
}

.footer-right {
    display: flex;
    align-items: center;
}

.footer-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-icon {
    opacity: 0.7;
}

.stat-value {
    font-family: monospace;
    font-weight: 600;
    color: white;
    font-size: 0.95em;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.85em;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 15px;
    display: flex;
    justify-content: center;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9em;
}

.footer-link:hover {
    color: white;
}

.footer-link.logout {
    color: #f87171;
}

.footer-link.logout:hover {
    color: #ef4444;
}

/* RESPONSIVE FOOTER */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 10px;
    }

    .footer-info {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-links {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .main-footer {
        padding: 15px;
    }

    .footer-stats {
        gap: 15px;
    }

    .stat-item {
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }
}