/* team-management.css - Add this to your existing CSS or create as separate file */

/* Team Management Container */
.team-management-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}
.team-memnber-avtar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}
/* Team Header */
.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    background: white;
    padding: 10px 12px;
    border-radius: 6px;
}

.team-header-content h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
    /* color: white; */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.team-subtitle {
    color: #666;
    margin: 0.5rem 0 0 0;
}

.team-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.team-selector {
    padding: 0.625rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 200px;
    background: white;
}

/* Metrics Grid */
.team-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #f0f7ff;
    color: #0066cc;
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Tabs */
.team-tabs {
    display: flex;
    gap: 0.5rem;
    /* border-bottom: 2px solid #e5e7eb; */
    margin-bottom: 1rem;
    overflow-x: auto;
    background: white;
    padding: 4px 0px;
    border-radius: 4px;
}

.team-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.team-tab:hover {
    color: #0066cc;
}

.team-tab.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
}

/* Tab Content */
.team-tab-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tab-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: #1a1a1a;
}

.tab-actions {
    display: flex;
    gap: 0.75rem;
}

/* Members Toolbar */
.members-toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.625rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

/* Members Table */
.members-table-container {
    overflow-x: auto;
}

.members-table {
    width: 100%;
    border-collapse: collapse;
}

.members-table thead {
    background: #f8f9fa;
}

.members-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.members-table td {
    padding: 1rem;
    border-top: 1px solid #9dbdfe;
    color: #667eea;
    font-size: 0.8rem;
}

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

.member-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.member-name {
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.member-email {
    font-size: 0.85rem;
    color: #666;
}

/* Badges */
.role-badge,
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    text-transform: capitalize;
}

.role-badge {
    background: #e0e7ff;
    color: #4338ca;
}

.role-super_admin {
    background: #fef3c7;
    color: #92400e;
}

.role-admin {
    background: #dbeafe;
    color: #1e40af;
}

.role-manager {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f0f7ff;
    color: #0066cc;
}

.btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-preview {
    height: 120px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-preview img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.card-info {
    padding: 1rem;
}

.card-info h4 {
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    color: #1a1a1a;
}

.card-info p {
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 0.75rem 0;
}

.card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.card-stats i {
    margin-right: 0.25rem;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4338ca;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-content {
    flex: 1;
}

.activity-text {
    color: #1a1a1a;
    margin-bottom: 0.25rem;
    text-transform: capitalize;
}

.activity-time {
    font-size: 0.85rem;
    color: #666;
}

/* Settings Form */
.settings-form {
    max-width: 600px;
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    color: #1a1a1a;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    /* display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem; */
}

.form-control {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.checkbox-label {
    /* display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer; */
}

.checkbox-label input[type="checkbox"] {
    /* width: 18px;
    height: 18px;
    cursor: pointer; */
}

.settings-actions {
    margin-top: 2rem;
}

/* Buttons */
/* .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
} */

/* .btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    background: white;
    color: #666;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #ccc;
} */

/* Modal */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    max-width: 500px;
    width: 100%;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: #0066cc;
    background: #f0f7ff;
}

.upload-area i {
    font-size: 2.5rem;
    color: #999;
    margin-bottom: 1rem;
}

.upload-area p {
    color: #666;
    margin: 0.5rem 0 1rem;
}

.import-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
}

.import-info p {
    margin: 0 0 0.5rem 0;
    color: #666;
}

.import-info a {
    color: #0066cc;
    text-decoration: none;
}

.import-info a:hover {
    text-decoration: underline;
}

/* Loading & Empty States */
.loading-spinner,
.loading-cell,
.empty-cell,
.error-cell,
.empty-state,
.error-message {
    text-align: center;
    /* padding: 2rem; */
    /* color: #666; */
    color: rgb(255 121 72 / 99%);
}

.empty-state i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}


/* ============================================
   INVITATION STATUS STYLES
   ============================================ */

   .status-invited {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    display: inline-block;
}

.status-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.status-badge.status-pending {
    background: #cfe2ff;
    color: #084298;
    border: 1px solid #0d6efd;
}

.status-badge.status-suspended {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #dc3545;
}

/* Info Box for Add Member Modal */
.info-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #1976d2;
}

.info-box i {
    margin-right: 8px;
    color: #1976d2;
}

/* Invitation Actions in Table */
.action-btns .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btns .btn-icon:hover {
    background: #f0f7ff;
    color: #0066cc;
}

.action-btns .btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Member Avatar Styles */
.team-memnber-avtar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.team-memnber-avtar:not(img) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
    display: block;
}

/* Loading State */
.loading-cell {
    text-align: center;
    padding: 2rem;
    color: #667eea;
}

.loading-cell i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .action-btns {
        display: flex;
        gap: 0.25rem;
    }
    
    .action-btns .btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}


/* Responsive */
@media (max-width: 768px) {
    .team-management-wrapper {
        padding: 1rem;
    }

    .team-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .team-header-actions {
        width: 100%;
        flex-direction: column;
    }

    .team-selector {
        width: 100%;
    }

    .team-metrics {
        grid-template-columns: 1fr;
    }

    .team-tabs {
        flex-wrap: nowrap;
        overflow-x: scroll;
    }

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tab-actions {
        width: 100%;
        flex-direction: column;
    }

    .members-toolbar {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}