/**
 * badges styles (Wave D residual)
 */

/* --- styles.css L3766-L4033 --- */
/* ===== UNIFIED BADGE / PILL SYSTEM (Tiimi-style) ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-transform: capitalize;
}

/* Semantic color variants — soft pastel bg + saturated text */
.badge-success,
.badge.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.badge-info,
.badge.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.badge-warning,
.badge.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning-text, #854d0e);
}

.badge-danger,
.badge.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error-text, #991b1b);
}

.badge-secondary,
.badge.badge-secondary {
    background: var(--bg-muted, rgba(107, 114, 128, 0.12));
    color: var(--text-secondary, #4b5563);
}

.badge-default,
.badge.badge-default {
    background: var(--bg-surface-1);
    color: var(--text-secondary);
}

.badge-primary,
.badge.badge-primary {
    background: var(--brand-tint-12, rgba(var(--brand-color-rgb), 0.12));
    color: var(--brand-fg, var(--brand-color));
}

/* Contextual status pills */
.badge-active    { background: rgba(16, 185, 129, 0.12); color: #059669; }
.badge-inactive  { background: rgba(239, 68, 68, 0.12);  color: var(--error-text, #991b1b); }
.badge-draft     { background: rgba(107, 114, 128, 0.12); color: #6b7280; }
.badge-published { background: rgba(59, 130, 246, 0.12);  color: #2563eb; }
.badge-pending   { background: rgba(245, 158, 11, 0.12);  color: var(--warning-text, #854d0e); }
.badge-verified  { background: rgba(16, 185, 129, 0.12);  color: #059669; }
.badge-unverified{ background: rgba(251, 146, 60, 0.12);  color: #ea580c; }
.badge-new-hire  { background: rgba(20, 184, 166, 0.12);  color: #0d9488; }
.badge-closed    { background: rgba(107, 114, 128, 0.12); color: #6b7280; }

/* Solid variants (for high-contrast use) */
.badge-solid.badge-success  { background: #10b981; color: #fff; }
.badge-solid.badge-info     { background: #3b82f6; color: #fff; }
.badge-solid.badge-warning  { background: #f59e0b; color: #fff; }
.badge-solid.badge-danger   { background: #ef4444; color: #fff; }
.badge-solid.badge-secondary{ background: #6b7280; color: #fff; }

/* Badge with dot indicator */
.badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--font-sm);
    min-height: 32px;
    gap: 4px;
}

/* user-management styles (L3859-L4524) → styles/modules/user-management.css */

/* ========================================
   ASSIGNMENT MATRIX TABLE
   ======================================== */
.matrix-table {
    border-collapse: separate;
    border-spacing: 0;
}

.matrix-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.matrix-table th,
.matrix-table td {
    text-align: center;
    padding: 10px 12px;
    min-width: 110px;
    white-space: nowrap;
    font-size: 0.95rem;
    line-height: 1.3;
}

.matrix-table th.sticky-col,
.matrix-table td.sticky-col {
    position: sticky;
    left: 0;
    z-index: 5;
    background: var(--bg-surface-2);
    text-align: left;
    min-width: 200px;
    max-width: 240px;
    white-space: normal;
    word-wrap: break-word;
}

.matrix-table thead th.sticky-col {
    z-index: 15;
}

.matrix-table tfoot th.sticky-col {
    z-index: 5;
}

.matrix-table th.project-col {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: none;
    height: auto;
    vertical-align: middle;
    padding: 12px 10px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: normal;
}

.matrix-table th.project-col .project-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-direction: column;
    text-align: center;
    line-height: 1.2;
}

.matrix-table th.project-col .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active { background-color: #2ecc71; }
.status-dot.planned { background-color: #f1c40f; }
.status-dot.paused { background-color: #e67e22; }
.status-dot.completed { background-color: #3498db; }
.status-dot.cancelled { background-color: #e74c3c; }

.matrix-table th.project-col input[type="checkbox"] {
    transform: none;
    margin-top: 2px;
    width: 16px;
    height: 16px;
}


@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
    .matrix-table th.project-col {
        padding: 10px 8px 8px;
        font-size: 0.8rem;
        min-width: 90px;
    }
}

.matrix-table tbody tr:hover {
    background-color: var(--bg-hover);
}

.matrix-table td.matrix-cell {
    cursor: pointer;
    transition: background-color 0.15s;
}

.matrix-table td.matrix-cell:hover {
    background-color: rgba(var(--brand-color-rgb), 0.15);
}

.matrix-table td.matrix-cell.assigned {
    background-color: rgba(var(--brand-color-rgb), 0.13);
}

.matrix-table td.matrix-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--brand-color);
}

.matrix-table td.matrix-cell.pending-change {
    background-color: rgba(255, 193, 7, 0.2);
    outline: 2px dashed var(--warning-color);
    outline-offset: -2px;
}

.matrix-table tfoot th {
    font-weight: 600;
    background-color: var(--bg-surface-2);
    border-top: 2px solid var(--border-color);
}

.matrix-table .employee-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.matrix-table tr:hover td,
.matrix-table tr:hover th.sticky-col {
    background-color: rgba(255,255,255,0.04);
}

.matrix-table .employee-name {
    font-weight: 500;
    color: var(--text-primary);
}

.matrix-table .employee-position {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.matrix-table .project-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.matrix-table .member-count {
    font-weight: 600;
    color: var(--brand-fg, var(--brand-color));
}

/* Highlight rows with many projects */
.matrix-table tr.high-workload td.sticky-col .project-count {
    color: var(--warning-text, var(--warning-color));
}

/* Role badges (inherits base .badge from unified system) */
.badge.role-user { background: rgba(25, 118, 210, 0.1); color: #1565c0; }
.badge.role-superadmin { background: rgba(194, 24, 91, 0.1); color: #ad1457; }


