/* Tab Navigation Styling */
.tab-navigation {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tab-button:hover {
    color: #374151;
    background: #f9fafb;
}

.tab-button.active {
    color: #111827;
    border-bottom-color: #111827;
    background: #fafbfc;
}

.tab-content {
    display: none;
}

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

/* Status Badge Styling */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-completed {
    background: #f0fdf4;
    color: #15803d;
}

.status-badge.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.active {
    background: #f0fdf4;
    color: #15803d;
}

.status-badge.inactive {
    background: #fef2f2;
    color: #dc2626;
}

/* Reset Request Modal Styling */
.reset-request-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.reset-request-info p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #374151;
}

.reset-request-info strong {
    color: #111827;
    font-weight: 600;
}

/* Enhanced modal sizing for larger content */
.modal-content[style*="max-width: 1000px"] {
    max-width: 95vw !important;
    width: 95vw;
}

@media (min-width: 1400px) {
    .modal-content[style*="max-width: 1000px"] {
        max-width: 1200px !important;
        width: 1200px;
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .modal-content[style*="max-width: 1000px"] {
        max-width: 1000px !important;
        width: 1000px;
    }
}

/* User Management Table Improvements */
.user-management .questions-table th,
.user-management .questions-table td {
    padding: 1rem 0.75rem;
    font-size: 0.875rem;
    vertical-align: middle;
}

.user-management .questions-table th {
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Compact table styling for user management */
#userModal .questions-table {
    font-size: 0.875rem;
}

#userModal .questions-table th {
    padding: 0.875rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

#userModal .questions-table td {
    padding: 0.875rem 0.5rem;
    vertical-align: middle;
}

/* Action buttons in tables */
#userModal .btn-edit,
#userModal .btn-password,
#userModal .btn-danger {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    margin: 0 0.25rem;
    white-space: nowrap;
}

/* Reset requests table */
#resetRequestsTableBody .btn-edit {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile card layout for user management */
@media (max-width: 768px) {
    /* Hide desktop table on mobile */
    #userModal .questions-table {
        display: none;
    }
    
    /* Show mobile cards */
    .mobile-users-list,
    .mobile-reset-requests-list {
        display: block;
        padding: 0;
    }
    
    .user-card,
    .reset-request-card {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin: 1rem 0;
        padding: 1.5rem;
    }
    
    .user-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .user-id-role {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    
    .user-id {
        background: #111827;
        color: white;
        padding: 0.375rem 0.75rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
        min-width: 2rem;
        text-align: center;
    }
    
    .user-role-badge {
        padding: 0.375rem 0.75rem;
        border-radius: 4px;
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .user-status {
        display: flex;
        align-items: center;
    }
    
    .user-name {
        font-size: 1.125rem;
        font-weight: 600;
        color: #111827;
        margin-bottom: 0.5rem;
    }
    
    .user-email {
        color: #6b7280;
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .user-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .user-meta-item {
        background: #fafbfc;
        padding: 0.75rem;
        border-radius: 6px;
    }
    
    .user-meta-label {
        font-weight: 600;
        margin-bottom: 0.25rem;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #6b7280;
    }
    
    .user-meta-value {
        color: #111827;
        font-weight: 400;
        font-size: 0.875rem;
    }
    
    .user-actions {
        display: flex;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .user-actions .btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Reset request cards */
    .reset-request-meta {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .reset-status-badge {
        align-self: flex-start;
    }
}

/* Show desktop table, hide mobile cards on larger screens */
@media (min-width: 769px) {
    .mobile-users-list,
    .mobile-reset-requests-list {
        display: none;
    }
    
    #userModal .questions-table {
        display: table;
    }
    
    /* Hide less important columns on smaller desktop screens */
    @media (max-width: 1200px) {
        .hide-on-medium {
            display: none;
        }
    }
    
    @media (max-width: 900px) {
        .hide-on-small {
            display: none;
        }
    }
}
