* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        "IBM Plex Sans",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background-color: #ffffff;
    color: #18181b;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 64px 48px;
}

/* Header */
.header {
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 768px) {
    .header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.header-text .label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #71717a;
    margin-bottom: 8px;
}

.header-text h1 {
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #09090b;
    line-height: 1.1;
}

.header-text .count {
    font-size: 16px;
    color: #52525b;
    margin-top: 8px;
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 640px) {
    .controls {
        flex-direction: row;
    }
}

.search-box {
    position: relative;
}

.search-box svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a1aa;
    width: 18px;
    height: 18px;
}

.search-input {
    height: 48px;
    width: 100%;
    min-width: 260px;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    padding: 0 16px 0 48px;
    font-size: 14px;
    font-family: inherit;
    color: #18181b;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #0033ff;
    box-shadow: 0 0 0 1px #0033ff;
}

.search-input::placeholder {
    color: #a1a1aa;
}

.filter-select {
    height: 48px;
    min-width: 180px;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    padding: 0 16px;
    font-size: 14px;
    font-family: inherit;
    color: #18181b;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #0033ff;
}

/* Grid */
.employee-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
}

@media (min-width: 640px) {
    .employee-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .employee-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .employee-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Employee Card */
.employee-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    padding: 24px;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    cursor: pointer;
}

.employee-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
    border-color: #a1a1aa;
}

.employee-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid #f4f4f5;
    margin-bottom: 20px;
    background: #f4f4f5;
    flex-shrink: 0;
}

.employee-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.employee-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.employee-name {
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #18181b;
}

.employee-title {
    font-size: 14px;
    font-weight: 500;
    color: #0033ff;
}

.employee-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: #f4f4f5;
    color: #3f3f46;
    border: 1px solid #e4e4e7;
    margin-top: 8px;
    width: fit-content;
}

.employee-meta {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f4f4f5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #71717a;
}

.meta-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    margin-bottom: 16px;
}

.empty-state-icon svg {
    width: 32px;
    height: 32px;
    color: #a1a1aa;
}

.empty-state h3 {
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #18181b;
    margin-bottom: 8px;
}

.empty-state p {
    color: #71717a;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.employee-card {
    animation: fadeInUp 0.5s ease forwards;
}

.employee-card:nth-child(1) {
    animation-delay: 0ms;
}
.employee-card:nth-child(2) {
    animation-delay: 50ms;
}
.employee-card:nth-child(3) {
    animation-delay: 100ms;
}
.employee-card:nth-child(4) {
    animation-delay: 150ms;
}
.employee-card:nth-child(5) {
    animation-delay: 200ms;
}
.employee-card:nth-child(6) {
    animation-delay: 250ms;
}

.directory-controls-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.directory-controls-row::-webkit-scrollbar {
    height: 8px;
}

.directory-controls-row::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 999px;
}

.directory-search .search-input {
    min-width: 260px;
    height: 44px;
    border-radius: 12px;
}

.directory-filter {
    min-width: 160px;
    height: 44px;
    border-radius: 12px;
}

.directory-project-filter {
    min-width: 220px;
}

.directory-reset {
    height: 44px;
    border-radius: 12px;
    padding: 0 14px;
    white-space: nowrap;
    flex: 0 0 auto;
}

/* Directory UI enhancements (cards/pills/invite) */
.employee-grid {
    gap: 18px;
}

.employee-card {
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.employee-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        rgba(17, 205, 239, 0.9),
        rgba(130, 94, 228, 0.9),
        rgba(245, 54, 92, 0.9)
    );
    opacity: 0.85;
}

.employee-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.10);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

.employee-name {
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.employee-name-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.employee-name-row .employee-name {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.status-dot-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
    flex: 0 0 auto;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #86efac, #16a34a 55%, #14532d);
    box-shadow:
        0 0 0 2px rgba(34, 197, 94, 0.18),
        0 0 0 6px rgba(34, 197, 94, 0.06);
}

.employee-card:hover .status-dot {
    filter: saturate(1.05);
}

.employee-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.role-pill {
    --role-color: #11cdef;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--role-color) 14%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--role-color) 24%, rgba(0, 0, 0, 0.06));
    color: color-mix(in srgb, var(--role-color) 84%, #1f2937);
    font-weight: 700;
    font-size: 12px;
    line-height: 1;
}

.role-pill-icon {
    font-size: 14px;
    line-height: 1;
}

.xid-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 205, 239, 0.10);
    border: 1px solid rgba(17, 205, 239, 0.22);
    color: rgba(31, 41, 55, 0.86);
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
}

.xid-pill-value {
    font-variant-numeric: tabular-nums;
}

.employee-meta {
    margin-top: 14px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    padding-top: 12px;
}

.meta-muted {
    opacity: 0.55;
}

.meta-item {
    color: rgba(31, 41, 55, 0.78);
}

.meta-item svg {
    opacity: 0.75;
}

.meta-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.meta-link {
    color: inherit;
    text-decoration: none;
}

.meta-link:hover {
    text-decoration: underline;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
    flex: 0 0 auto;
}

.copy-btn:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: rgba(17, 205, 239, 0.18);
    border-color: rgba(17, 205, 239, 0.35);
}

.copy-btn i {
    font-size: 13px;
    opacity: 0.85;
}

.meta-truncate {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: bottom;
}

.last-login-pill strong {
    font-weight: 800;
}

.employee-info {
    position: relative;
}

.invite-icon-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, rgba(17, 205, 239, 0.16), rgba(130, 94, 228, 0.12));
    color: rgba(31, 41, 55, 0.92);
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease,
        filter 160ms ease;
    cursor: pointer;
    white-space: nowrap;
}

.invite-icon-btn i {
    font-size: 13px;
}

.invite-on-avatar {
    position: absolute;
    top: 16px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    padding: 0;
    justify-content: center;
    background: linear-gradient(135deg, rgba(17, 205, 239, 0.36), rgba(130, 94, 228, 0.28));
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 2;
}

.invite-on-avatar i {
    font-size: 14px;
    color: rgba(31, 41, 55, 0.88);
}

.employee-photo img {
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(17, 205, 239, 0.10), 0 0 0 7px rgba(130, 94, 228, 0.08);
}

.employee-card:hover .invite-icon-btn {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
    transform: translateY(-1px);
    filter: saturate(1.05);
}

.invite-icon-btn:active {
    transform: translateY(0px);
}

.badge-row {
    margin-top: 6px;
}

.badge-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.employee-badge {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Department badge (light theme) */

/* Project badge (white text, bold, premium look) */
.badge-project {
    background: linear-gradient(135deg, #6c63ff, #3f3d56);
    color: #fff;
}

.reset-btn {
    padding: 8px 14px;
    background: #e0e0e0;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

.reset-btn:hover {
    background: #d5d5d5;
}

.sidenav {
    background-color: #344767 !important;
}

.table-hover tbody tr:hover {
    background: #f8f9fa;
}

.table thead th {
    letter-spacing: 0.5px;
}

.badge {
    padding: 6px 10px;
    font-size: 0.75rem;
}

.table {
    font-size: 0.75rem;
    /* smaller text */
}

.table th,
.table td {
    padding: 4px 6px !important;
    /* tighter spacing */
    white-space: nowrap;
    /* prevent wrapping */
}

.table img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
}

.badge {
    font-size: 0.65rem;
    padding: 4px 6px;
}

.table-responsive {
    overflow-x: visible !important;
    /* remove scroll */
}
.controls{
    margin-left:10%;
}

/* --- Technician KPI pages (scoped; overrides global .table rules below) --- */
.kpi-page {
    --kpi-accent-1: #2563eb;
    --kpi-accent-2: #7c3aed;
    --kpi-accent-3: #db2777;
    --kpi-accent-4: #ea580c;
    --kpi-accent-5: #059669;
    --kpi-accent-6: #0891b2;
    width: 100%;
}

.kpi-stat-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 1.1rem 1.15rem 1.2rem;
    border: 1px solid #e4e4e7;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    height: 100%;
    overflow: hidden;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.kpi-stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--kpi-accent, #2563eb);
    border-radius: 14px 0 0 14px;
}

.kpi-stat-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.kpi-stat-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.35rem;
}

.kpi-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--kpi-accent, #2563eb) 12%, white);
    color: var(--kpi-accent, #2563eb);
}

.kpi-stat-icon .material-icons {
    font-size: 1.25rem;
}

.kpi-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #71717a;
    margin-bottom: 0.25rem;
}

.kpi-stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #09090b;
    line-height: 1.2;
}

.kpi-table-scope {
    overflow-x: auto;
}

.kpi-table-scope .kpi-table {
    font-size: 0.875rem !important;
}

.kpi-table-scope .kpi-table thead th {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #71717a !important;
    background: #fafafa !important;
    border-bottom: 2px solid #e4e4e7 !important;
    padding: 12px 16px !important;
    white-space: nowrap;
}

.kpi-table-scope .kpi-table tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f4f4f5 !important;
    vertical-align: middle;
    white-space: normal !important;
}

.kpi-table-scope .kpi-table tbody tr:last-child td {
    border-bottom: none !important;
}

.kpi-cell-name {
    font-weight: 600;
    color: #18181b;
    white-space: normal;
    max-width: 14rem;
}

.kpi-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.7rem !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
}

.kpi-pill-success {
    background: #dcfce7;
    color: #166534;
}

.kpi-pill-warn {
    background: #ffedd5;
    color: #9a3412;
}
