/* ══════════════════════════════════════════════════
   Tabel Angajați Mini — Stiluri
   ══════════════════════════════════════════════════ */

/* ── Variabile ── */
.tam-card {
    --tam-font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --tam-mono: 'JetBrains Mono', 'SF Mono', monospace;
    --tam-black: #0f0f0f;
    --tam-white: #ffffff;
    --tam-gray-50: #f9fafb;
    --tam-gray-100: #f3f4f6;
    --tam-gray-200: #e5e7eb;
    --tam-gray-300: #d1d5db;
    --tam-gray-400: #9ca3af;
    --tam-gray-600: #4b5563;
    --tam-gray-700: #374151;
    --tam-gray-800: #1f2937;
    --tam-green-dark: #15803d;
    --tam-r-sm: 6px;
    --tam-r-xl: 16px;
    --tam-r-pill: 999px;
}

/* ── Card principal ── */
.tam-card {
    background: var(--tam-white);
    border-radius: var(--tam-r-xl);
    box-shadow: 0 2px 16px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);
    overflow: hidden;
    max-width: 1100px;
    margin: 0 auto;
    font-family: var(--tam-font);
}

/* ── Header ── */
.tam-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--tam-gray-200);
    background: var(--tam-white);
}

.tam-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tam-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tam-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tam-green-dark);
}

.tam-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tam-black);
    font-family: var(--tam-font);
}

.tam-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    background: #1a1a1a;
    color: #22c55e;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--tam-mono);
    line-height: 1;
}

/* ── Buton Șterge Selectate ── */
.tam-btn-sterge-selectate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    background: #fef2f2;
    color: #dc2626;
    font-size: .82rem;
    font-weight: 600;
    font-family: var(--tam-font);
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}

.tam-btn-sterge-selectate:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.tam-btn-sterge-selectate:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Tabel ── */
.tam-table-wrap {
    overflow-x: auto;
}

.tam-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-family: var(--tam-font);
}

.tam-table thead tr {
    background: var(--tam-gray-50);
    border-bottom: 1px solid var(--tam-gray-200);
}

.tam-table thead th {
    padding: 10px 14px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--tam-gray-400);
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
}

.tam-table tbody tr {
    border-bottom: 1px solid var(--tam-gray-200);
    transition: background .12s ease;
}

.tam-table tbody tr:last-child {
    border-bottom: none;
}

.tam-table tbody tr:hover {
    background: var(--tam-gray-50);
}

.tam-table tbody tr.tam-row-selected {
    background: #eff6ff;
}

.tam-table tbody tr.tam-row-selected:hover {
    background: #dbeafe;
}

.tam-table tbody td {
    padding: 14px 14px;
    vertical-align: middle;
    font-size: .84rem;
    color: var(--tam-gray-800);
}

/* ── Lățimi coloane ── */
.tam-table thead th.tam-col-check,
.tam-table tbody td.tam-td-check {
    width: 48px;
    padding: 14px 0 14px 14px !important;
    text-align: center !important;
    vertical-align: middle;
}
.tam-col-angajat { width: 30%; }
.tam-col-functie { width: 18%; }
.tam-col-sef     { width: 28%; }
.tam-col-actiuni { width: 14%; text-align: center; }

.tam-td-check {
    text-align: center;
    padding: 14px 0 14px 14px !important;
    vertical-align: middle;
}

/* ── Checkbox custom ── */
.tam-checkbox-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.tam-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.tam-checkbox-visual {
    width: 18px;
    height: 18px;
    border: 2px solid var(--tam-gray-300);
    border-radius: 4px;
    background: var(--tam-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s ease;
}

.tam-checkbox:checked + .tam-checkbox-visual {
    background: #2563eb;
    border-color: #2563eb;
}

.tam-checkbox:checked + .tam-checkbox-visual::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -1px;
}

.tam-checkbox-wrap:hover .tam-checkbox-visual {
    border-color: #93c5fd;
}

/* ── Avatar ── */
.tam-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: .02em;
}

/* ── Coloana Steluță NOU ── */
.tam-col-star {
    width: 20px;
    padding: 0 !important;
}

.tam-td-star {
    width: 20px;
    padding: 0 !important;
    text-align: center;
    vertical-align: middle;
}

.tam-star-nou {
    color: #f59e0b;
    display: inline-block;
    vertical-align: middle;
}

/* ── Celulă Angajat ── */
.tam-cell-angajat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tam-cell-info {
    min-width: 0;
    flex: 1;
}

.tam-cell-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--tam-black);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tam-cell-email {
    font-size: .78rem;
    font-weight: 400;
    color: var(--tam-gray-400);
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Celulă Funcție ── */
.tam-cell-functie {
    font-size: .84rem;
    font-weight: 500;
    color: var(--tam-gray-800);
    line-height: 1.3;
    display: block;
}

/* ── Celulă Șef Ierarhic ── */
.tam-cell-sef {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tam-sef-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--tam-r-sm);
    background: var(--tam-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tam-sef-icon svg {
    width: 15px;
    height: 15px;
    color: var(--tam-gray-400);
}

.tam-sef-name {
    font-size: .84rem;
    font-weight: 600;
    color: var(--tam-black);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    display: block;
}

.tam-sef-email {
    font-size: .76rem;
    font-weight: 400;
    color: var(--tam-gray-400);
    line-height: 1.3;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    display: block;
}

/* ── Text gri (dash) ── */
.tam-text-muted {
    color: var(--tam-gray-300);
    font-size: .84rem;
}

.tam-td-actiuni {
    text-align: center;
}

/* ── Buton Ștergere ── */
.tam-btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--tam-gray-200);
    border-radius: 8px;
    background: var(--tam-white);
    color: var(--tam-gray-400);
    cursor: pointer;
    transition: all .15s ease;
}

.tam-btn-delete:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.tam-btn-delete:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ── Rând gol ── */
.tam-empty {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--tam-gray-400);
    font-size: .9rem;
}

/* ── Footer ── */
.tam-footer {
    padding: 12px 20px;
    font-size: .78rem;
    color: var(--tam-green-dark);
    background: rgba(34,197,94,.04);
    border-top: 1px solid rgba(34,197,94,.15);
}

.tam-footer strong {
    font-weight: 700;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .tam-col-check   { width: 32px; }
    .tam-col-angajat { width: auto; }
    .tam-col-functie { width: auto; }
    .tam-col-sef     { width: auto; }
    .tam-col-actiuni { width: auto; }

    .tam-table {
        table-layout: auto;
    }

    .tam-sef-name,
    .tam-sef-email {
        max-width: 120px;
    }
}