/* AI Staff Page Styles */

.ai-staff-page {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    flex: 1;
    overflow-y: auto;
}

.ai-page-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-page-title {
    font-size: 30px;
    font-weight: 700;
    color: #101828;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin: 0;
}

.ai-page-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #4A5565;
    line-height: 1.5;
    margin: 0;
}

/* Two Column Layout */
.ai-staff-layout {
    display: flex;
    gap: 24px;
    flex: 1;
}

.ai-staff-list-column {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-staff-detail-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Staff Cards */
.ai-staff-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 19px;
    box-shadow: 0px 1px 2px -1px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.ai-staff-card:hover {
    border-color: #D1D5DC;
}

.ai-staff-card-selected {
    border-color: #AD46FF;
    border-width: 2px;
    padding: 18px;
}

.ai-staff-card-content {
    display: flex;
    gap: 16px;
}

.ai-staff-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.ai-staff-avatar img {
    width: 48px;
    height: 48px;
}

.ai-staff-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-staff-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-staff-name {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    line-height: 1.5;
    margin: 0;
}

.ai-staff-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00C950;
}

.ai-staff-role {
    font-size: 14px;
    font-weight: 400;
    color: #4A5565;
    line-height: 1.43;
    margin: 0;
}

.ai-staff-channels {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.ai-channel-badge {
    width: 24px;
    height: 24px;
    background: #F3F4F6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-channel-badge svg,
.ai-channel-badge img {
    width: 14px;
    height: 14px;
}

/* Add Staff Button */
.ai-add-staff-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    background: linear-gradient(90deg, #9810FA 0%, #2B7FFF 100%);
    border: none;
    border-radius: 14px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.ai-add-staff-btn:hover {
    opacity: 0.9;
}

/* Detail Cards */
.ai-detail-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0px 1px 2px -1px rgba(0, 0, 0, 0.1), 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
}

.ai-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ai-detail-title {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0;
}

.ai-detail-period {
    font-size: 14px;
    font-weight: 400;
    color: #6A7282;
}

.ai-detail-link {
    font-size: 14px;
    font-weight: 500;
    color: #155DFC;
    text-decoration: none;
}

.ai-detail-link:hover {
    text-decoration: underline;
}

.ai-edit-btn {
    font-size: 14px;
    font-weight: 500;
    color: #155DFC;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.ai-edit-btn:hover {
    text-decoration: underline;
}

/* Performance Stats */
.ai-performance-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.ai-perf-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-perf-value {
    font-size: 24px;
    font-weight: 700;
    color: #101828;
}

.ai-perf-label {
    font-size: 14px;
    font-weight: 400;
    color: #6A7282;
}

/* Activity Timeline */
.ai-activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-timeline-item {
    display: flex;
    gap: 12px;
}

.ai-timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #155DFC;
    margin-top: 6px;
    flex-shrink: 0;
}

.ai-timeline-content {
    flex: 1;
}

.ai-timeline-text {
    font-size: 14px;
    font-weight: 400;
    color: #101828;
    margin: 0 0 4px;
}

.ai-timeline-time {
    font-size: 12px;
    font-weight: 400;
    color: #6A7282;
}

/* Configuration List */
.ai-config-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #E5E7EB;
}

.ai-config-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ai-config-label {
    font-size: 14px;
    font-weight: 500;
    color: #364153;
}

.ai-config-value {
    font-size: 14px;
    font-weight: 400;
    color: #6A7282;
}

/* Profile Card */
.ai-profile-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ai-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-profile-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ai-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.ai-profile-avatar img {
    width: 64px;
    height: 64px;
}

.ai-profile-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #101828;
    line-height: 1.33;
    margin: 0;
}

.ai-profile-role {
    font-size: 16px;
    font-weight: 400;
    color: #4A5565;
    line-height: 1.5;
    margin: 0;
}

.ai-configure-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #FFFFFF;
    border: 1px solid #D1D5DC;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    color: #0A0A0A;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ai-configure-btn:hover {
    background-color: #F9FAFB;
}

.ai-configure-btn img {
    width: 16px;
    height: 16px;
}

/* Stats Grid */
.ai-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.ai-stat-box {
    background: #F9FAFB;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-stat-icon {
    width: 20px;
    height: 20px;
}

.ai-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #101828;
    line-height: 1.33;
}

.ai-stat-label {
    font-size: 14px;
    font-weight: 400;
    color: #4A5565;
    line-height: 1.43;
}

/* Responsive */
@media (max-width: 1200px) {
    .ai-staff-layout {
        flex-direction: column;
    }

    .ai-staff-list-column {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ai-staff-card {
        flex: 1;
        min-width: 280px;
    }

    .ai-add-staff-btn {
        flex: 1;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .ai-staff-page {
        padding: 24px 16px;
    }

    .ai-performance-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* Modal Styles */
.ai-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ai-modal {
    display: block !important;
    position: relative;
    z-index: 100000 !important;
    background: #FFFFFF;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ai-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.ai-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0;
}

.ai-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6A7282;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ai-modal-close:hover {
    color: #101828;
}

.ai-modal-content {
    padding: 24px;
}

/* Form Styles */
.ai-modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ai-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #364153;
}

.ai-form-group input,
.ai-form-group select,
.ai-form-group textarea {
    padding: 10px 14px;
    border: 1px solid #D1D5DC;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #101828;
    background: #FFFFFF;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-form-group input:focus,
.ai-form-group select:focus,
.ai-form-group textarea:focus {
    outline: none;
    border-color: #9810FA;
    box-shadow: 0 0 0 3px rgba(152, 16, 250, 0.1);
}

.ai-form-group input::placeholder,
.ai-form-group textarea::placeholder {
    color: #9CA3AF;
}

.ai-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.ai-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.ai-form-actions-right {
    display: flex;
    gap: 12px;
}

/* Buttons */
.ai-btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.ai-btn-primary {
    background: linear-gradient(90deg, #9810FA 0%, #2B7FFF 100%);
    color: #FFFFFF;
}

.ai-btn-primary:hover {
    opacity: 0.9;
}

.ai-btn-secondary {
    background: #FFFFFF;
    color: #364153;
    border: 1px solid #D1D5DC;
}

.ai-btn-secondary:hover {
    background: #F9FAFB;
}

.ai-btn-danger {
    background: #FFFFFF;
    color: #DC2626;
    border: 1px solid #DC2626;
}

.ai-btn-danger:hover {
    background: #FEF2F2;
}

.ai-btn-danger-filled {
    background: #DC2626;
    color: #FFFFFF;
    border: 1px solid #DC2626;
}

.ai-btn-danger-filled:hover {
    background: #B91C1C;
    border-color: #B91C1C;
}

/* Confirmation Dialog */
.ai-confirm-modal {
    max-width: 420px;
}

.ai-confirm-message {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.5;
    margin: 0;
}

.ai-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
    border-radius: 0 0 12px 12px;
}

/* Capabilities Checkboxes */
.ai-capabilities-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding: 8px;
    background: #F9FAFB;
    border-radius: 8px;
}

.ai-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #364153;
    cursor: pointer;
}

.ai-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #9810FA;
}

/* Toast Notifications */
.ai-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
    z-index: 1001;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.ai-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.ai-toast-success {
    background: #059669;
}

.ai-toast-error {
    background: #DC2626;
}

/* Empty and Error States */
.ai-empty-state,
.ai-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
}

.ai-empty-state h3,
.ai-error-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 8px;
}

.ai-empty-state p,
.ai-error-state p {
    font-size: 14px;
    color: #6A7282;
    margin: 0 0 16px;
}

/* Inactive status dot */
.ai-staff-status-dot.inactive {
    background: #D1D5DC;
}

/* No channels text */
.ai-no-channels {
    font-size: 12px;
    color: #9CA3AF;
    font-style: italic;
}

/* No activity text */
.ai-no-activity {
    font-size: 14px;
    color: #6A7282;
    text-align: center;
    padding: 20px;
}

/* Capabilities List */
.ai-capabilities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-capability-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #364153;
}

.ai-capability-item svg {
    flex-shrink: 0;
}

/* Channels List */
.ai-channels-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-channel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #F9FAFB;
    border-radius: 10px;
    border: 1px solid transparent;
}

.ai-channel-item.active {
    background: #ECFDF5;
    border-color: #10B981;
}

.ai-channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-channel-type {
    font-size: 14px;
    font-weight: 500;
    color: #101828;
}

.ai-channel-identifier {
    font-size: 13px;
    color: #6A7282;
}

.ai-channel-item .ai-channel-status {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 12px;
}

.ai-channel-item.active .ai-channel-status {
    background: #D1FAE5;
    color: #059669;
}

.ai-channel-item.inactive .ai-channel-status {
    background: #F3F4F6;
    color: #6B7280;
}
