:root {
    --sidebar-width: 250px;
    --primary-color: #4e73df;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --dark-color: #5a5c69;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f8f9fc;
    overflow-x: hidden;
}

#wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-color) 0%, #224abe 100%);
    color: white;
    min-height: 100vh;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
    border-left-color: white;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Page content */
#page-content-wrapper {
    flex: 1;
    overflow-x: hidden;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.3;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #858796;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Badges */
.badge-online {
    background-color: var(--success-color);
    color: white;
}

.badge-offline {
    background-color: var(--danger-color);
    color: white;
}

.badge-abierta {
    background-color: var(--warning-color);
    color: black;
}

.badge-cerrada {
    background-color: var(--dark-color);
    color: white;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    padding: 1.5rem;
}

.table-container .table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 8rem auto;
}

.login-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
}

.login-card .card-header {
    background: linear-gradient(180deg, var(--primary-color) 0%, #224abe 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.login-card .card-body {
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
        position: fixed;
        z-index: 1000;
        transition: margin-left 0.3s;
    }

    .sidebar.active {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 100vw;
    }
}

/* Detail grid */
.detail-grid dt {
    font-weight: 600;
    color: #5a5c69;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #858796;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Heartbeat pulse animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

.offline-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--danger-color);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 1.5rem;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e3e6f0;
}

.timeline-item:last-child:before {
    display: none;
}

.timeline-item .timeline-icon {
    position: absolute;
    left: -0.25rem;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
}