.staff-hub { max-width: 1200px; }
.staff-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 12px;
}
.staff-tab-btn {
    border: none;
    background: transparent;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}
.staff-tab-btn:hover { background: #fff; color: #4338ca; }
.staff-tab-btn.active {
    background: #fff;
    color: #4338ca;
    box-shadow: var(--shadow-sm);
}
.staff-tab-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.staff-tab-badge.alert { background: #fee2e2; color: #b91c1c; }
.staff-tab-panel { display: none; }
.staff-tab-panel.active { display: block; }

.staff-modal-section-title {
    font-size: 13px;
    font-weight: 700;
    margin: 16px 0 8px;
}
.staff-tasks-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}
.staff-task-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 12px;
}
.staff-task-title { font-weight: 600; color: var(--text-primary); }
.staff-task-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.staff-tasks-empty {
    font-size: 12px;
    color: var(--text-muted);
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
}

.staff-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.staff-emp-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    min-height: 280px;
}
.staff-emp-card:hover {
    transform: translateY(-2px);
    border-color: #c4b5fd;
    box-shadow: var(--shadow-md);
}
.staff-emp-photo-wrap {
    display: flex;
    flex-direction: column;
}
.staff-emp-photo {
    height: 120px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a78bfa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.staff-emp-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.staff-emp-photo .staff-emp-initials {
    font-size: 36px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 1px;
}
.staff-emp-role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
    min-height: 44px;
    align-items: center;
}
.staff-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    line-height: 1.2;
}
.staff-role-chip.staff-role-dev { background: #ecfdf5; color: #047857; }
.staff-role-chip.staff-role-service { background: #fff7ed; color: #c2410c; }
.staff-role-chip.staff-role-admin { background: #fef3c7; color: #92400e; }
.staff-role-chip-remove {
    border: none;
    background: transparent;
    color: inherit;
    opacity: 0.65;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
}
.staff-role-chip-remove:hover { opacity: 1; }
.staff-emp-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.staff-emp-name { font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.staff-emp-meta { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.staff-emp-meta strong { color: var(--text-secondary); font-weight: 600; }
.staff-emp-footer { margin-top: auto; padding-top: 8px; font-size: 11px; color: #16a34a; font-weight: 600; }
.staff-emp-owner-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
    vertical-align: middle;
}
.staff-modal.active,
#staffCreateSlotModal.active,
#staffCreateManualModal.active,
#staffEmployeeModal.active {
    display: flex !important;
    z-index: 2000;
}

.staff-modal .modal-content { width: min(720px, 96vw); max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; }
.staff-modal-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; min-height: 320px; }
@media (max-width: 640px) { .staff-modal-layout { grid-template-columns: 1fr; } }
.staff-modal-side { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.staff-photo-upload-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin: 0 auto;
}
.staff-modal-roles {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}
.staff-modal-roles-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.staff-modal-roles-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.35;
}
.staff-modal-role-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.staff-modal-role-add {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.staff-modal-role-add select {
    flex: 1;
    min-width: 120px;
    padding: 6px 8px;
    border: 1px solid #dbe1ea;
    border-radius: 8px;
    font-size: 12px;
}
.staff-modal-photo-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.staff-modal-photo {
    width: 100%;
    aspect-ratio: 3/4;
    max-height: 240px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.staff-modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.staff-modal-chat {
    margin-top: 16px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    background: #f8fafc;
    font-size: 13px;
}
.staff-modal-chat .chat-msg { margin-bottom: 8px; }
.staff-modal-chat .chat-msg .author { font-weight: 600; font-size: 11px; color: #4338ca; }
.staff-claim-card, .staff-slot-row {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.staff-emp-modal.active { display: flex !important; }
.staff-emp-modal-content {
    max-width: 920px;
    width: min(96vw, 920px);
    max-height: 90vh;
    overflow: auto;
}
.staff-emp-modal-body { padding: 0 20px 20px; }
.staff-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
}
