/* ============================================
   ESTILOS GLOBALES
   ============================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1f5f9;
    color: #111827;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
}

/* ============================================
   TABLAS
   ============================================ */

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    text-align: left;
    padding: 10px 12px;
    background: #f8fafc;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

table tr:hover td {
    background: #f8fafc;
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #374151;
}

.form-group .help {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-success {
    background: #22c55e;
    color: #fff;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-secondary {
    background: #6b7280;
    color: #fff;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* ============================================
   NOTIFICACIONES
   ============================================ */

.notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.notice-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.notice-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.notice-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.notice-info {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

/* ============================================
   TOOLTIP
   ============================================ */

.tooltip-trigger {
    position: relative;
    cursor: help;
}

.tooltip-trigger .tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    width: 320px;
    max-width: 90vw;
    font-weight: 400;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    margin-bottom: 8px;
}

.tooltip-trigger .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

.tooltip-trigger:hover .tooltip {
    display: block;
}

/* ============================================
   TAGS / CHIPS
   ============================================ */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: #eef2ff;
    color: #1e40af;
    margin: 2px;
}

.chip .remove {
    cursor: pointer;
    opacity: 0.6;
    font-weight: 700;
}

.chip .remove:hover {
    opacity: 1;
}

/* ============================================
   STATUS BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================
   IMPACT TABLE (PRICING)
   ============================================ */

.impact-high {
    background: #fee2e2 !important;
}

.impact-medium {
    background: #fef3c7 !important;
}

.impact-low {
    background: #dcfce7 !important;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 16px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}