/* ============================================================================
   TABS.CSS - SISTEMA DE TABS
   Sistema de Permisos de Salida - Sandoval Abogados
   ============================================================================ */

/* ============================================================================
   TABS NAVIGATION
   ============================================================================ */

.tabs-nav-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    padding: 8px;
}

.tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-button {
    flex: 1;
    min-width: 150px;
    padding: 14px 20px;
    background: white;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #3f4254;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button i {
    font-size: 18px;
}

.tab-button:hover:not(.active) {
    background: #f9fafb;
    border-color: #e4e6ef;
    color: #181c32;
}

.tab-button.active {
    background: linear-gradient(135deg, #00853F 0%, #006830 100%);
    color: white;
    border-color: #00853F;
    box-shadow: 0 4px 15px rgba(0,133,63,0.3);
}

.tab-button.active i {
    animation: iconPulse 0.6s ease;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ============================================================================
   TABS CONTENT
   ============================================================================ */

.tabs-content {
    min-height: 400px;
    background: transparent;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: tabFadeIn 0.4s ease;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   TAB 2: EQUIPOS ASIGNADOS
   ============================================================================ */

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.equipment-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.equipment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: #00853F;
}

.equipment-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e4e6ef;
}

.equipment-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00853F 0%, #006830 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.equipment-card-title {
    flex: 1;
}

.equipment-name {
    font-size: 16px;
    font-weight: 700;
    color: #181c32;
    margin-bottom: 4px;
}

.equipment-type {
    font-size: 13px;
    color: #a1a5b7;
}

.equipment-card-body {
    margin-bottom: 15px;
}

.equipment-spec {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
}

.equipment-spec i {
    width: 20px;
    color: #00853F;
}

.equipment-spec-label {
    color: #a1a5b7;
    min-width: 80px;
}

.equipment-spec-value {
    color: #181c32;
    font-weight: 600;
}

.equipment-card-footer {
    display: flex;
    gap: 8px;
}

.equipment-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.equipment-btn.primary {
    background: #00853F;
    color: white;
}

.equipment-btn.primary:hover {
    background: #006830;
}

.equipment-btn.secondary {
    background: #f1f1f4;
    color: #3f4254;
}

.equipment-btn.secondary:hover {
    background: #e4e6ef;
}

.equipment-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.equipment-status-badge.available {
    background: #e8f5e9;
    color: #00853F;
}

.equipment-status-badge.in-use {
    background: #fff4e5;
    color: #f59e0b;
}

/* ============================================================================
   TAB 3: HISTORIAL
   ============================================================================ */

.history-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 30px;
}

.history-timeline {
    position: relative;
    padding-left: 40px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e4e6ef;
}

.history-item {
    position: relative;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #00853F;
    transition: all 0.3s;
}

.history-item:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transform: translateX(5px);
}

.history-item::before {
    content: '';
    position: absolute;
    left: -43px;
    top: 25px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00853F;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #e8f5e9;
}

.history-item.returned::before {
    background: #1976d2;
    box-shadow: 0 0 0 3px #e3f2fd;
}

.history-item.expired::before {
    background: #ef4444;
    box-shadow: 0 0 0 3px #fee;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.history-title {
    font-size: 16px;
    font-weight: 700;
    color: #181c32;
    margin-bottom: 4px;
}

.history-date {
    font-size: 13px;
    color: #a1a5b7;
}

.history-body {
    font-size: 14px;
    color: #3f4254;
    line-height: 1.6;
}

.history-meta {
    display: flex;
    gap: 15px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e4e6ef;
}

.history-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #a1a5b7;
}

.history-meta-item i {
    color: #00853F;
}

/* ============================================================================
   TAB 4: ESTADÍSTICAS
   ============================================================================ */

.stats-container {
    display: grid;
    gap: 25px;
}

.stats-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 25px;
}

.stats-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #181c32;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-section-title i {
    color: #00853F;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-box {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #00853F;
}

.stat-box-label {
    font-size: 13px;
    color: #a1a5b7;
    margin-bottom: 8px;
}

.stat-box-value {
    font-size: 32px;
    font-weight: 700;
    color: #181c32;
    line-height: 1;
}

.stat-box-trend {
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-box-trend.positive {
    color: #00853F;
}

.stat-box-trend.negative {
    color: #ef4444;
}

.chart-container {
    height: 300px;
    margin-top: 20px;
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.empty-state-container {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 80px;
    color: #e4e6ef;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 700;
    color: #181c32;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 14px;
    color: #a1a5b7;
    margin-bottom: 25px;
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #00853F;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.empty-state-action:hover {
    background: #006830;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,133,63,0.3);
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e4e6ef;
    border-top-color: #00853F;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 20px;
    font-size: 14px;
    color: #a1a5b7;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .tabs-nav {
        flex-direction: column;
    }
    
    .tab-button {
        min-width: 100%;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .history-timeline {
        padding-left: 30px;
    }
    
    .history-item::before {
        left: -33px;
    }

    .equipment-card-footer {
        flex-direction: column;
    }
}
