/* ═══════════════════════════════════════════════ */
/* GEST Shared Components — Eliminates CSS duplication */
/* ═══════════════════════════════════════════════ */

/* ── Stat Cards ── */
.stat-card, .stats-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.stat-card .stat-icon, .stats-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.stat-icon.bg-primary-subtle { background: #eef2ff; color: #6366f1; }
.stat-icon.bg-success-subtle { background: #f0fdf4; color: #22c55e; }
.stat-icon.bg-warning-subtle { background: #fffbeb; color: #f59e0b; }
.stat-icon.bg-danger-subtle { background: #fef2f2; color: #ef4444; }
.stat-icon.bg-info-subtle { background: #ecfeff; color: #06b6d4; }
.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 4px 0;
}
.stat-card .stat-label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.status-badge.active, .status-badge.completed, .status-badge.delivered, .status-badge.success {
    background: #d1fae5; color: #065f46;
}
.status-badge.inactive, .status-badge.cancelled, .status-badge.failed, .status-badge.danger {
    background: #fee2e2; color: #991b1b;
}
.status-badge.pending, .status-badge.warning, .status-badge.in_progress {
    background: #fef3c7; color: #92400e;
}
.status-badge.planning, .status-badge.draft, .status-badge.info {
    background: #dbeafe; color: #1e40af;
}
.status-badge.assigned {
    background: #e0e7ff; color: #3730a3;
}

/* ── Page Header ── */
.gest-page-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}
.gest-page-header h4, .gest-page-header h5 {
    color: white;
    margin: 0;
    font-weight: 700;
}
.gest-page-header p {
    color: rgba(255,255,255,0.8);
    margin: 4px 0 0;
}

/* ── Cards ── */
.gest-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #f1f5f9;
    overflow: hidden;
}
.gest-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gest-card-body {
    padding: 20px;
}

/* ── Filter Bar ── */
.gest-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}
.gest-filter-bar .form-select,
.gest-filter-bar .form-control {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    max-width: 200px;
}

/* ── Tables ── */
.gest-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.gest-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
}
.gest-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}
.gest-table tbody tr:hover {
    background: #f8fafc;
}

/* ── Action Buttons (table) ── */
.gest-actions {
    display: flex;
    gap: 6px;
}
.gest-actions .btn-action {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.gest-actions .btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.gest-actions .btn-view { background: #eef2ff; color: #6366f1; }
.gest-actions .btn-edit { background: #ecfdf5; color: #059669; }
.gest-actions .btn-delete { background: #fef2f2; color: #dc2626; }

/* ── Empty State ── */
.gest-empty-state {
    text-align: center;
    padding: 48px 24px;
}
.gest-empty-state i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}
.gest-empty-state h5 {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
}
.gest-empty-state p {
    color: #94a3b8;
    font-size: 14px;
}

/* ── DataTables French Override ── */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    font-size: 13px;
    color: #64748b;
}
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
}

/* ── Priority Colors ── */
.priority-low { color: #3b82f6; }
.priority-normal { color: #22c55e; }
.priority-high { color: #f59e0b; }
.priority-urgent { color: #ef4444; }
.priority-critical { color: #ec4899; }

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.pulse { animation: pulse 2s infinite; }
