:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-gray: #ecf0f1;
    --dark-gray: #34495e;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f7fa;
    color: var(--text-color);
    line-height: 1.6;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--secondary-color);
    color: white;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
}

.sidebar-nav ul {
    list-style: none;
    padding: 20px 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav li.active a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-nav i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.main-header h1 {
    font-size: 2rem;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.total-tickets {
    background: var(--primary-color);
}

.stat-icon.open-tickets {
    background: var(--warning-color);
}

.stat-icon.urgent-tickets {
    background: var(--danger-color);
}

.stat-icon.closed-today {
    background: var(--success-color);
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-light);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.recent-tickets,
.alerts-panel {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.recent-tickets h2,
.alerts-panel h2 {
    margin-bottom: 20px;
    font-weight: 500;
}

.ticket-list {
    margin-bottom: 20px;
}

.ticket-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.ticket-item:last-child {
    border-bottom: none;
}

.ticket-code {
    font-weight: 500;
    color: var(--primary-color);
}

.ticket-priority,
.ticket-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
}

.ticket-priority.urgente {
    background: #ffeaea;
    color: var(--danger-color);
}

.ticket-priority.alta {
    background: #fff4e6;
    color: var(--warning-color);
}

.ticket-priority.media {
    background: #e8f4fd;
    color: var(--primary-color);
}

.ticket-priority.baja {
    background: #e6f7ed;
    color: var(--success-color);
}

.ticket-status.en-proceso {
    background: #e8f4fd;
    color: var(--primary-color);
}

.ticket-status.pendiente {
    background: #fff4e6;
    color: var(--warning-color);
}

.ticket-status.resuelto {
    background: #e6f7ed;
    color: var(--success-color);
}

.ticket-status.cerrado {
    background: #f8f9fa;
    color: var(--text-light);
}

.view-all {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Alerts */
.alert-item {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.alert-item.critical {
    background: #ffeaea;
    border-left-color: var(--danger-color);
}

.alert-item.danger {
    background: #ffeaea;
    border-left-color: var(--danger-color);
}

.alert-item.warning {
    background: #fff4e6;
    border-left-color: var(--warning-color);
}

.alert-item.info {
    background: #e8f4fd;
    border-left-color: var(--primary-color);
}

.alert-item.no-alerts {
    background: #f8f9fa;
    border-left-color: var(--text-light);
    text-align: center;
    color: var(--text-light);
}

.alert-message {
    margin-bottom: 5px;
}

.alert-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .ticket-item {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}