/* === CargaTime Custom Styles === */

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #0d253f 100%);
    color: #fff;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    margin-left: -260px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.sidebar-brand:hover {
    color: #4fc3f7;
}

.sidebar-body {
    padding: 15px 0;
}

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

.sidebar .nav-category {
    padding: 15px 20px 5px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-left-color: #4fc3f7;
}

.sidebar .nav-link i {
    width: 24px;
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar .nav-link .badge {
    font-size: 0.65rem;
}

/* Main Container */
.main-container {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.sidebar.collapsed + .main-container {
    margin-left: 0;
}

/* Header */
.header {
    background: #fff;
    padding: 12px 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .btn-link {
    color: #333;
    text-decoration: none;
}

/* Content */
.content-wrapper {
    flex: 1;
    padding: 24px;
    background: #f4f6f9;
}

/* Page Title */
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 6px;
}

.page-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Stat Cards */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: none;
    transition: transform 0.2s;
}

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

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e3a5f;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.bg-primary-gradient { background: linear-gradient(135deg, #4fc3f7, #1e88e5); }
.bg-success-gradient { background: linear-gradient(135deg, #66bb6a, #2e7d32); }
.bg-warning-gradient { background: linear-gradient(135deg, #ffa726, #ef6c00); }
.bg-danger-gradient { background: linear-gradient(135deg, #ef5350, #c62828); }
.bg-info-gradient { background: linear-gradient(135deg, #26c6da, #00838f); }

/* Tables */
.table-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.table-card .card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 20px;
    font-weight: 600;
    color: #1e3a5f;
}

/* Footer */
.footer {
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -260px;
    }
    .sidebar.show {
        margin-left: 0;
    }
    .main-container {
        margin-left: 0;
    }
}

/* Estancia status badges */
.badge-abierta { background: #4caf50; color: #fff; }
.badge-cerrada { background: #2196f3; color: #fff; }
.badge-cerrada-manual { background: #ff9800; color: #fff; }

/* Live pulse animation */
.pulse-live {
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
