/* Cards y KPIs */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.kpi-title {
    font-size: 0.82rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin: 8px 0;
}

.kpi-trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #16a34a;
    font-weight: 500;
}

/* Tablas */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-top: 15px;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    text-align: left;
    font-size: 0.9rem;
}

.custom-table th {
    background: #f8fafc;
    padding: 12px 16px;
    color: #475569;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.custom-table tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background: #fef9c3;
    color: #a16207;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    border: none;
    text-decoration: none;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--tenant-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--tenant-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.btn-outline:hover {
    background: #f1f5f9;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    padding: 24px;
}